From 887bffdb02d193f6f6a6ce0b89bbd06a75012b34 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Fri, 25 Apr 2025 13:58:36 -0400 Subject: [PATCH 1/7] bump silabs sdks submodules --- .gitmodules | 6 +++--- third_party/silabs/simplicity_sdk | 2 +- third_party/silabs/wifi_sdk | 2 +- third_party/silabs/wiseconnect-wifi-bt-sdk | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 9a6a79ffe5f43d..5b96172b135b42 100644 --- a/.gitmodules +++ b/.gitmodules @@ -213,17 +213,17 @@ [submodule "third_party/silabs/simplicity_sdk"] path = third_party/silabs/simplicity_sdk url = https://github.com/SiliconLabs/simplicity_sdk.git - branch = v2024.12.1-0 + branch = v2024.12.2 platforms = silabs [submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] path = third_party/silabs/wiseconnect-wifi-bt-sdk url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git - branch = 2.11.2 + branch = 2.11.4 platforms = silabs [submodule "third_party/silabs/wifi_sdk"] path = third_party/silabs/wifi_sdk url = https://github.com/SiliconLabs/wiseconnect.git - branch = v3.4.1 + branch = v3.4.2 platforms = silabs [submodule "editline"] path = third_party/editline/repo diff --git a/third_party/silabs/simplicity_sdk b/third_party/silabs/simplicity_sdk index da661283f301b5..1f19b3719cc750 160000 --- a/third_party/silabs/simplicity_sdk +++ b/third_party/silabs/simplicity_sdk @@ -1 +1 @@ -Subproject commit da661283f301b53eec04d1016009e60bc7e34a1f +Subproject commit 1f19b3719cc750efd6ffa6604dc1c13a94eb9f11 diff --git a/third_party/silabs/wifi_sdk b/third_party/silabs/wifi_sdk index f675628eefa1ac..2f93cc44966f65 160000 --- a/third_party/silabs/wifi_sdk +++ b/third_party/silabs/wifi_sdk @@ -1 +1 @@ -Subproject commit f675628eefa1ac4990e94146abb75dd08b522571 +Subproject commit 2f93cc44966f651c51cdd3d4b779d850fbf03d22 diff --git a/third_party/silabs/wiseconnect-wifi-bt-sdk b/third_party/silabs/wiseconnect-wifi-bt-sdk index 3dbc243390a993..bf6b6001e3d1b4 160000 --- a/third_party/silabs/wiseconnect-wifi-bt-sdk +++ b/third_party/silabs/wiseconnect-wifi-bt-sdk @@ -1 +1 @@ -Subproject commit 3dbc243390a99311968b4d39fe0339b7c8a201ec +Subproject commit bf6b6001e3d1b4310a83fed4cd36ba38c8b2dd90 From a8c588d162f48edf5aa5c28499ba88598b04cf4d Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Mon, 5 May 2025 11:07:23 -0400 Subject: [PATCH 2/7] WIP - Add gn support for new sdk versions. Bump docker image for ci --- .github/workflows/examples-efr32.yaml | 2 +- .../silabs/ldscripts/SiWx917-common.ld | 330 ++++++++---------- examples/platform/silabs/matter-platform.slcp | 2 +- third_party/silabs/SiWx917_sdk.gni | 2 +- third_party/silabs/matter_support | 2 +- 5 files changed, 144 insertions(+), 194 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 175ef74fe37a3e..a2b4d77e95af25 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:127 + image: ghcr.io/project-chip/chip-build-efr32:129 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/examples/platform/silabs/ldscripts/SiWx917-common.ld b/examples/platform/silabs/ldscripts/SiWx917-common.ld index 0c25fb579c99ed..94c18ad3352c22 100644 --- a/examples/platform/silabs/ldscripts/SiWx917-common.ld +++ b/examples/platform/silabs/ldscripts/SiWx917-common.ld @@ -29,236 +29,186 @@ MEMORY { rom (rx) : ORIGIN = 0x8202000, LENGTH = 0x1fe000 - ram (rwx) : ORIGIN = 0x400, LENGTH = 0x4fc00 + + ram (rwx) : ORIGIN = 0xc, LENGTH = 0x4fbf4 + } + MEMORY + { + udma0 (rwx) : ORIGIN = 0x4fc00, LENGTH = 0x400 + udma1 (rwx) : ORIGIN = 0x24061c00, LENGTH = 0x400 } ENTRY(Reset_Handler) - + SECTIONS { .text : { KEEP(*(.isr_vector)) - . = ALIGN(32); - KEEP(*(.reset_handler)) - *(EXCLUDE_FILE(*sl_si91x_bus.c.o *sl_si91x_driver.c.o *sli_si91x_multithreaded.c.o *rsi_hal_mcu_m4_ram.c.o *rsi_hal_mcu_m4_rom.c.o *rsi_deepsleep_soc.c.o *croutine.c.o *event_groups.c.o *list.c.o *queue.c.o *stream_buffer.c.o *tasks.c.o *timers.c.o *cmsis_os2.c.o *freertos_umm_malloc_host.c.o *malloc_buffers.c.o *sl_rsi_utility.c.o *port.c.o *sl_sleeptimer.c.o *sl_sleeptimer_hal_si91x_sysrtc.c.o *rsi_sysrtc.c.o *sl_si91x_low_power_tickless_mode.c.o *heap_*.c.o *sl_core_cortexm.c.o) .text*) + KEEP(*(.reset_handler)) + *(EXCLUDE_FILE(*sl_si91x_bus.o *sl_si91x_driver.o *sli_si91x_multithreaded.o *rsi_deepsleep_soc.o *rsi_hal_mcu_m4_ram.o *rsi_hal_mcu_m4_rom.o *UDMA.o *sl_sleeptimer.o *sl_sleeptimer_hal_si91x_sysrtc.o *rsi_sysrtc.o *sl_si91x_low_power_tickless_mode.o *croutine.o *event_groups.o *list.o *queue.o *stream_buffer.o *tasks.o *timers.o *cmsis_os2.o *freertos_umm_malloc_host.o *malloc_buffers.o *sl_rsi_utility.o *port.o *heap_*.o) .text*) - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - *(.eh_frame*) - } > rom - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > rom - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > rom - __exidx_end = .; - - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - - LONG (__etext) - LONG (__data_start__) - LONG ((__data_end__ - __data_start__) / 4) - - /* Add each additional data section here */ -/* - LONG (__etext2) - LONG (__data2_start__) - LONG ((__data2_end__ - __data2_start__) / 4) -*/ - __copy_table_end__ = .; - } > rom - - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - /* Add each additional bss section here */ -/* - LONG (__bss2_start__) - LONG ((__bss2_end__ - __bss2_start__) / 4) -*/ - __zero_table_end__ = .; - } > rom - + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + *(.rodata*) + + KEEP(*(.eh_fram e*)) + } > rom + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > rom + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > rom __exidx_end = .; __etext = .; - - /* _sidata is used in coide startup code */ - _sidata = __etext; - /* Start placing output sections which are loaded into RAM */ - . = ORIGIN(ram); - - .noinit . (NOLOAD): - { - *(.noinit*); - } > ram + /* _sidata is used in code startup code */ + _sidata = __etext; + + .data : - .data . : AT (__etext) - { - . = ALIGN(4); - __data_start__ = .; - _sdata = __data_start__; - KEEP(*(.ramVector)) + { + __data_start__ = .; + + /* _sdata is used in startup code */ + _sdata = __data_start__; + KEEP(*(.ramVector)) KEEP(*(.init)) KEEP(*(.fini)) - *(.rodata*) - *(vtable) *(.data*) - *sl_si91x_bus.c.o(.text*) - *sl_si91x_driver.c.o(.text*) - *sli_si91x_multithreaded.c.o(.text*) - *rsi_hal_mcu_m4_ram.c.o(.text*) - *rsi_hal_mcu_m4_rom.c.o(.text*) - *rsi_deepsleep_soc.c.o(.text*) - *croutine.c.o(.text*) - *event_groups.c.o(.text*) - *list.c.o(.text*) - *queue.c.o(.text*) - *cmsis_os2.c.o(.text*) - *stream_buffer.c.o(.text*) - *tasks.c.o(.text*) - *timers.c.o(.text*) - *freertos_umm_malloc_host.c.o(.text*) - *malloc_buffers.c.o(.text*) - *sl_rsi_utility.c.o(.text*) - *port.c.o(.text*) - *heap_*.c.o(.text*) - *sl_sleeptimer.c.o(.text*) - *sl_sleeptimer_hal_si91x_sysrtc.c.o(.text*) - *rsi_sysrtc.c.o(.text*) - *sl_si91x_low_power_tickless_mode.c.o(.text*) - *sl_core_cortexm.c.o(.text*) - - /* ipmu calibration data */ - *(.common_ipmu_ram*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - . = ALIGN(4); - /* All data end */ - __data_end__ = .; - - /* _edata is used in coide startup code */ - _edata = __data_end__; - - } > ram - - .bss . : - { - . = ALIGN(4); - __bss_start__ = .; - _sbss = __bss_start__; - *(SORT_BY_ALIGNMENT(.bss*)) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - _ebss = __bss_end__; - } > ram - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - Co_Stack_Size = 0x3000; - .co_stack ALIGN(8) (NOLOAD): + *rsi_hal_mcu_m4_ram.o(.text*) + *rsi_hal_mcu_m4_rom.o(.text*) + *sl_si91x_driver.o(.text*) + *sl_si91x_bus.o(.text*) + *UDMA.o(.text*) + *sl_sleeptimer.o(.text*) + *sl_sleeptimer_hal_si91x_sysrtc.o(.text*) + *rsi_sysrtc.o(.text*) + *sl_si91x_low_power_tickless_mode.o(.text*) + *sli_si91x_multithreaded.o(.text*) + *rsi_deepsleep_soc.o(.text*) + *croutine.o(.text*) + *event_groups.o(.text*) + *list.o(.text*) + *queue.o(.text*) + *cmsis_os2.o(.text*) + *stream_buffer.o(.text*) + *tasks.o(.text*) + *timers.o(.text*) + *freertos_umm_malloc_host.o(.text*) + *malloc_buffers.o(.text*) + *sl_rsi_utility.o(.text*) + *port.o(.text*) + *heap_*.o(.text*) + + /* ipmu calibration data */ + *(.common_ipmu_ram*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + + /* _edata is used in startup code */ + _edata = __data_end__; + } > ram AT> rom + + .bss (NOLOAD) : { - __co_stackLimit = .; - KEEP(*(.co_stack*)) . = ALIGN(4); - . += Co_Stack_Size; - __co_stackTop = .; - } > ram + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > ram - StackSize = 0x1400; - .stack ALIGN(8) (NOLOAD): + + .stack (NOLOAD): { __StackLimit = .; KEEP(*(.stack*)) . = ALIGN(4); - . += StackSize; __StackTop = .; PROVIDE(__stack = __StackTop); } > ram - - .heap (COPY): - { + .heap (COPY): + { __HeapBase = .; __end__ = .; end = __end__; _end = __end__; - KEEP(*(.heap*)) + KEEP(*(.heap*)) . = ORIGIN(ram) + LENGTH(ram); - __HeapLimit = .; - } > ram - + } > ram + __heap_size = __HeapLimit - __HeapBase; - __ram_end__ = 0x400 + 0x4fc00; - __main_flash_end__ = 0x8202000 + 0x1fe000; - + .udma_addr0 : + { + *(.udma_addr0*) + } > udma0 AT> rom + + .udma_addr1 : + { + *(.udma_addr1*) + } > udma1 AT> rom + + __ram_end__ = 0xc + 0x4fbf4; + __main_flash_end__ = 0x8202000 + 0x1fe000; /* This is where we handle flash storage blocks. We use dummy sections for finding the configured * block sizes and then "place" them at the end of flash when the size is known. */ - .internal_storage (DSECT) : { - KEEP(*(.internal_storage*)) + .internal_storage1 (DSECT) : { + KEEP(*(.internal_storage1*)) } > rom - - .nvm (DSECT) : { KEEP(*(.simee*)) } > rom - - /* Last page of flash is reserved for the manufacturing token space */ + linker_nvm_end = __main_flash_end__ - 4096; linker_nvm_begin = linker_nvm_end - SIZEOF(.nvm); linker_nvm_size = SIZEOF(.nvm); linker_storage_end = linker_nvm_begin; - __nvm3Base = linker_nvm_begin; - - linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage); - linker_storage_size = SIZEOF(.internal_storage); - ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !") - - app_flash_end = 0x8202000 + 0x1fe000; - ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= app_flash_end, "NVM3 is excessing the flash size !") -} + __nvm3Base = linker_nvm_begin; + linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage1); + linker_storage_size = SIZEOF(.internal_storage1); + ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !") +} \ No newline at end of file diff --git a/examples/platform/silabs/matter-platform.slcp b/examples/platform/silabs/matter-platform.slcp index 07117d7cb640bd..3be0cc8d41a484 100644 --- a/examples/platform/silabs/matter-platform.slcp +++ b/examples/platform/silabs/matter-platform.slcp @@ -27,7 +27,7 @@ include: file_list: - {path: app.h} - {path: reset_util.h} -sdk: {id: simplicity_sdk, version: 2024.6.0} +sdk: {id: simplicity_sdk, version: 2024.12.2} toolchain_settings: [] component: diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index 7dcece0748a610..a6282f4749d39c 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -768,7 +768,7 @@ template("siwx917_sdk") { # STARTUP FILES "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream.c", "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream_rtt.c", - "${matter_support_root}/board-support/si91x/support/src/startup_common_RS1xxxx.c", + "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/nvm3/src/sl_si91x_common_flash_intf.c", # OTA diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 8548a549cab7e6..d0088a2043eb98 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 8548a549cab7e6102c524ef45a2ebb17f20c954c +Subproject commit d0088a2043eb98eb6cca822cf33bf48fc7e35745 From 457da4b6c2e070c88523727fde6c9d8c2e432d0b Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Mon, 5 May 2025 23:50:02 -0400 Subject: [PATCH 3/7] Revert to using older linker file and tartup_common_RS1xxxx --- .../silabs/ldscripts/SiWx917-common.ld | 330 ++++++++++-------- third_party/silabs/SiWx917_sdk.gni | 15 +- 2 files changed, 201 insertions(+), 144 deletions(-) diff --git a/examples/platform/silabs/ldscripts/SiWx917-common.ld b/examples/platform/silabs/ldscripts/SiWx917-common.ld index 94c18ad3352c22..0c25fb579c99ed 100644 --- a/examples/platform/silabs/ldscripts/SiWx917-common.ld +++ b/examples/platform/silabs/ldscripts/SiWx917-common.ld @@ -29,186 +29,236 @@ MEMORY { rom (rx) : ORIGIN = 0x8202000, LENGTH = 0x1fe000 - - ram (rwx) : ORIGIN = 0xc, LENGTH = 0x4fbf4 - } - MEMORY - { - udma0 (rwx) : ORIGIN = 0x4fc00, LENGTH = 0x400 - udma1 (rwx) : ORIGIN = 0x24061c00, LENGTH = 0x400 + ram (rwx) : ORIGIN = 0x400, LENGTH = 0x4fc00 } ENTRY(Reset_Handler) - + SECTIONS { .text : { KEEP(*(.isr_vector)) - KEEP(*(.reset_handler)) - *(EXCLUDE_FILE(*sl_si91x_bus.o *sl_si91x_driver.o *sli_si91x_multithreaded.o *rsi_deepsleep_soc.o *rsi_hal_mcu_m4_ram.o *rsi_hal_mcu_m4_rom.o *UDMA.o *sl_sleeptimer.o *sl_sleeptimer_hal_si91x_sysrtc.o *rsi_sysrtc.o *sl_si91x_low_power_tickless_mode.o *croutine.o *event_groups.o *list.o *queue.o *stream_buffer.o *tasks.o *timers.o *cmsis_os2.o *freertos_umm_malloc_host.o *malloc_buffers.o *sl_rsi_utility.o *port.o *heap_*.o) .text*) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - *(.rodata*) + . = ALIGN(32); + KEEP(*(.reset_handler)) + *(EXCLUDE_FILE(*sl_si91x_bus.c.o *sl_si91x_driver.c.o *sli_si91x_multithreaded.c.o *rsi_hal_mcu_m4_ram.c.o *rsi_hal_mcu_m4_rom.c.o *rsi_deepsleep_soc.c.o *croutine.c.o *event_groups.c.o *list.c.o *queue.c.o *stream_buffer.c.o *tasks.c.o *timers.c.o *cmsis_os2.c.o *freertos_umm_malloc_host.c.o *malloc_buffers.c.o *sl_rsi_utility.c.o *port.c.o *sl_sleeptimer.c.o *sl_sleeptimer_hal_si91x_sysrtc.c.o *rsi_sysrtc.c.o *sl_si91x_low_power_tickless_mode.c.o *heap_*.c.o *sl_core_cortexm.c.o) .text*) - KEEP(*(.eh_fram e*)) - } > rom - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > rom - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > rom + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + *(.eh_frame*) + } > rom + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > rom + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > rom + __exidx_end = .; + + .copy.table : + { + . = ALIGN(4); + __copy_table_start__ = .; + + LONG (__etext) + LONG (__data_start__) + LONG ((__data_end__ - __data_start__) / 4) + + /* Add each additional data section here */ +/* + LONG (__etext2) + LONG (__data2_start__) + LONG ((__data2_end__ - __data2_start__) / 4) +*/ + __copy_table_end__ = .; + } > rom + + .zero.table : + { + . = ALIGN(4); + __zero_table_start__ = .; + /* Add each additional bss section here */ +/* + LONG (__bss2_start__) + LONG ((__bss2_end__ - __bss2_start__) / 4) +*/ + __zero_table_end__ = .; + } > rom + __exidx_end = .; __etext = .; + + /* _sidata is used in coide startup code */ + _sidata = __etext; - /* _sidata is used in code startup code */ - _sidata = __etext; - - .data : + /* Start placing output sections which are loaded into RAM */ + . = ORIGIN(ram); + + .noinit . (NOLOAD): + { + *(.noinit*); + } > ram - { - __data_start__ = .; - - /* _sdata is used in startup code */ - _sdata = __data_start__; - KEEP(*(.ramVector)) + .data . : AT (__etext) + { + . = ALIGN(4); + __data_start__ = .; + _sdata = __data_start__; + KEEP(*(.ramVector)) KEEP(*(.init)) KEEP(*(.fini)) + *(.rodata*) + *(vtable) *(.data*) - *rsi_hal_mcu_m4_ram.o(.text*) - *rsi_hal_mcu_m4_rom.o(.text*) - *sl_si91x_driver.o(.text*) - *sl_si91x_bus.o(.text*) - *UDMA.o(.text*) - *sl_sleeptimer.o(.text*) - *sl_sleeptimer_hal_si91x_sysrtc.o(.text*) - *rsi_sysrtc.o(.text*) - *sl_si91x_low_power_tickless_mode.o(.text*) - *sli_si91x_multithreaded.o(.text*) - *rsi_deepsleep_soc.o(.text*) - *croutine.o(.text*) - *event_groups.o(.text*) - *list.o(.text*) - *queue.o(.text*) - *cmsis_os2.o(.text*) - *stream_buffer.o(.text*) - *tasks.o(.text*) - *timers.o(.text*) - *freertos_umm_malloc_host.o(.text*) - *malloc_buffers.o(.text*) - *sl_rsi_utility.o(.text*) - *port.o(.text*) - *heap_*.o(.text*) - - /* ipmu calibration data */ - *(.common_ipmu_ram*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - . = ALIGN(4); - /* All data end */ - __data_end__ = .; - - /* _edata is used in startup code */ - _edata = __data_end__; - } > ram AT> rom - - .bss (NOLOAD) : + *sl_si91x_bus.c.o(.text*) + *sl_si91x_driver.c.o(.text*) + *sli_si91x_multithreaded.c.o(.text*) + *rsi_hal_mcu_m4_ram.c.o(.text*) + *rsi_hal_mcu_m4_rom.c.o(.text*) + *rsi_deepsleep_soc.c.o(.text*) + *croutine.c.o(.text*) + *event_groups.c.o(.text*) + *list.c.o(.text*) + *queue.c.o(.text*) + *cmsis_os2.c.o(.text*) + *stream_buffer.c.o(.text*) + *tasks.c.o(.text*) + *timers.c.o(.text*) + *freertos_umm_malloc_host.c.o(.text*) + *malloc_buffers.c.o(.text*) + *sl_rsi_utility.c.o(.text*) + *port.c.o(.text*) + *heap_*.c.o(.text*) + *sl_sleeptimer.c.o(.text*) + *sl_sleeptimer_hal_si91x_sysrtc.c.o(.text*) + *rsi_sysrtc.c.o(.text*) + *sl_si91x_low_power_tickless_mode.c.o(.text*) + *sl_core_cortexm.c.o(.text*) + + /* ipmu calibration data */ + *(.common_ipmu_ram*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + + /* _edata is used in coide startup code */ + _edata = __data_end__; + + } > ram + + .bss . : + { + . = ALIGN(4); + __bss_start__ = .; + _sbss = __bss_start__; + *(SORT_BY_ALIGNMENT(.bss*)) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + _ebss = __bss_end__; + } > ram + + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + Co_Stack_Size = 0x3000; + .co_stack ALIGN(8) (NOLOAD): { + __co_stackLimit = .; + KEEP(*(.co_stack*)) . = ALIGN(4); - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - } > ram + . += Co_Stack_Size; + __co_stackTop = .; + } > ram - - .stack (NOLOAD): + StackSize = 0x1400; + .stack ALIGN(8) (NOLOAD): { __StackLimit = .; KEEP(*(.stack*)) . = ALIGN(4); + . += StackSize; __StackTop = .; PROVIDE(__stack = __StackTop); } > ram - .heap (COPY): - { + + .heap (COPY): + { __HeapBase = .; __end__ = .; end = __end__; _end = __end__; - KEEP(*(.heap*)) + KEEP(*(.heap*)) . = ORIGIN(ram) + LENGTH(ram); + __HeapLimit = .; - } > ram - + } > ram + __heap_size = __HeapLimit - __HeapBase; - .udma_addr0 : - { - *(.udma_addr0*) - } > udma0 AT> rom - - .udma_addr1 : - { - *(.udma_addr1*) - } > udma1 AT> rom - - __ram_end__ = 0xc + 0x4fbf4; - __main_flash_end__ = 0x8202000 + 0x1fe000; + __ram_end__ = 0x400 + 0x4fc00; + __main_flash_end__ = 0x8202000 + 0x1fe000; + /* This is where we handle flash storage blocks. We use dummy sections for finding the configured * block sizes and then "place" them at the end of flash when the size is known. */ - .internal_storage1 (DSECT) : { - KEEP(*(.internal_storage1*)) + .internal_storage (DSECT) : { + KEEP(*(.internal_storage*)) } > rom + + .nvm (DSECT) : { KEEP(*(.simee*)) } > rom - + + /* Last page of flash is reserved for the manufacturing token space */ linker_nvm_end = __main_flash_end__ - 4096; linker_nvm_begin = linker_nvm_end - SIZEOF(.nvm); linker_nvm_size = SIZEOF(.nvm); linker_storage_end = linker_nvm_begin; - __nvm3Base = linker_nvm_begin; - linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage1); - linker_storage_size = SIZEOF(.internal_storage1); - ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !") -} \ No newline at end of file + __nvm3Base = linker_nvm_begin; + + linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage); + linker_storage_size = SIZEOF(.internal_storage); + ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !") + + app_flash_end = 0x8202000 + 0x1fe000; + ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= app_flash_end, "NVM3 is excessing the flash size !") +} diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index a6282f4749d39c..b50f7a09fbd24e 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -186,7 +186,7 @@ template("siwx917_sdk") { # To fix this, these files are also manually depended upon in the source set # declared in siwx917_mbedtls_config further down this file. defines += [ - "__STARTUP_CLEAR_BSS", + "__STARTUP_CLEAR_BSS=1", "HARD_FAULT_LOG_ENABLE", "SL_HEAP_SIZE=32768", "SL_WIFI=1", @@ -243,6 +243,8 @@ template("siwx917_sdk") { "NVM3_LOCK_OVERRIDE=1", "SL_MEMORY_POOL_LIGHT=1", "SL_CODE_COMPONENT_CORE=core", + "SL_CODE_COMPONENT_SLEEPTIMER=sleeptimer", + "SL_CODE_COMPONENT_PSEC_OSAL=psec_osal", "SLI_SI91X_MCU_EXTERNAL_LDO_FOR_PSRAM=1", "CLOCK_ROMDRIVER_PRESENT=1", "ULPSS_CLOCK_ROMDRIVER_PRESENT=1", @@ -308,7 +310,7 @@ template("siwx917_sdk") { "SI917_MEMLCD=1", "SYSCALLS_WRITE", "SPI_MULTI_SLAVE", - "SL_ULP_TIMER", + "SL_ULP_TIMER=1", ] } @@ -685,6 +687,7 @@ template("siwx917_sdk") { "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/src/rsi_system_config.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/src/system_si91x.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/common/src/rsi_debug.c", + "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/common/src/sl_si91x_stack_object_declare.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/config/src/rsi_nvic_priorities_config.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/UDMA.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/USART.c", @@ -765,10 +768,14 @@ template("siwx917_sdk") { "${efr32_sdk_root}/platform/service/memory_manager/src/sl_memory_manager_retarget.c", "${efr32_sdk_root}/platform/service/memory_manager/src/sli_memory_manager_common.c", - # STARTUP FILES + # iostream "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream.c", "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream_rtt.c", - "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c", + + # STARTUP FILES + # TODO swap to startup_si91x and new linkerfile once Board_Debug_Init is fixed. + #"${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c", + "${matter_support_root}/board-support/si91x/support/src/startup_common_RS1xxxx.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/nvm3/src/sl_si91x_common_flash_intf.c", # OTA From b59cc2039a09c2dca42ace9637b8d5003b0150b5 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Mon, 5 May 2025 23:51:34 -0400 Subject: [PATCH 4/7] used merged matter_support sha --- third_party/silabs/matter_support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index d0088a2043eb98..c17e40d0b0024b 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit d0088a2043eb98eb6cca822cf33bf48fc7e35745 +Subproject commit c17e40d0b0024b4ab26820fe67b8391ff292e32e From 63a8cac5f1e8e5f1e2a97631622de03eb25ca90f Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 6 May 2025 12:13:52 -0400 Subject: [PATCH 5/7] Use new startup code for si917 --- .../silabs/ldscripts/SiWx917-common.ld | 330 ++++++++---------- third_party/silabs/SiWx917_sdk.gni | 7 +- 2 files changed, 143 insertions(+), 194 deletions(-) diff --git a/examples/platform/silabs/ldscripts/SiWx917-common.ld b/examples/platform/silabs/ldscripts/SiWx917-common.ld index 0c25fb579c99ed..94c18ad3352c22 100644 --- a/examples/platform/silabs/ldscripts/SiWx917-common.ld +++ b/examples/platform/silabs/ldscripts/SiWx917-common.ld @@ -29,236 +29,186 @@ MEMORY { rom (rx) : ORIGIN = 0x8202000, LENGTH = 0x1fe000 - ram (rwx) : ORIGIN = 0x400, LENGTH = 0x4fc00 + + ram (rwx) : ORIGIN = 0xc, LENGTH = 0x4fbf4 + } + MEMORY + { + udma0 (rwx) : ORIGIN = 0x4fc00, LENGTH = 0x400 + udma1 (rwx) : ORIGIN = 0x24061c00, LENGTH = 0x400 } ENTRY(Reset_Handler) - + SECTIONS { .text : { KEEP(*(.isr_vector)) - . = ALIGN(32); - KEEP(*(.reset_handler)) - *(EXCLUDE_FILE(*sl_si91x_bus.c.o *sl_si91x_driver.c.o *sli_si91x_multithreaded.c.o *rsi_hal_mcu_m4_ram.c.o *rsi_hal_mcu_m4_rom.c.o *rsi_deepsleep_soc.c.o *croutine.c.o *event_groups.c.o *list.c.o *queue.c.o *stream_buffer.c.o *tasks.c.o *timers.c.o *cmsis_os2.c.o *freertos_umm_malloc_host.c.o *malloc_buffers.c.o *sl_rsi_utility.c.o *port.c.o *sl_sleeptimer.c.o *sl_sleeptimer_hal_si91x_sysrtc.c.o *rsi_sysrtc.c.o *sl_si91x_low_power_tickless_mode.c.o *heap_*.c.o *sl_core_cortexm.c.o) .text*) + KEEP(*(.reset_handler)) + *(EXCLUDE_FILE(*sl_si91x_bus.o *sl_si91x_driver.o *sli_si91x_multithreaded.o *rsi_deepsleep_soc.o *rsi_hal_mcu_m4_ram.o *rsi_hal_mcu_m4_rom.o *UDMA.o *sl_sleeptimer.o *sl_sleeptimer_hal_si91x_sysrtc.o *rsi_sysrtc.o *sl_si91x_low_power_tickless_mode.o *croutine.o *event_groups.o *list.o *queue.o *stream_buffer.o *tasks.o *timers.o *cmsis_os2.o *freertos_umm_malloc_host.o *malloc_buffers.o *sl_rsi_utility.o *port.o *heap_*.o) .text*) - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - *(.eh_frame*) - } > rom - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > rom - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > rom - __exidx_end = .; - - .copy.table : - { - . = ALIGN(4); - __copy_table_start__ = .; - - LONG (__etext) - LONG (__data_start__) - LONG ((__data_end__ - __data_start__) / 4) - - /* Add each additional data section here */ -/* - LONG (__etext2) - LONG (__data2_start__) - LONG ((__data2_end__ - __data2_start__) / 4) -*/ - __copy_table_end__ = .; - } > rom - - .zero.table : - { - . = ALIGN(4); - __zero_table_start__ = .; - /* Add each additional bss section here */ -/* - LONG (__bss2_start__) - LONG ((__bss2_end__ - __bss2_start__) / 4) -*/ - __zero_table_end__ = .; - } > rom - + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + *(.rodata*) + + KEEP(*(.eh_fram e*)) + } > rom + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > rom + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > rom __exidx_end = .; __etext = .; - - /* _sidata is used in coide startup code */ - _sidata = __etext; - /* Start placing output sections which are loaded into RAM */ - . = ORIGIN(ram); - - .noinit . (NOLOAD): - { - *(.noinit*); - } > ram + /* _sidata is used in code startup code */ + _sidata = __etext; + + .data : - .data . : AT (__etext) - { - . = ALIGN(4); - __data_start__ = .; - _sdata = __data_start__; - KEEP(*(.ramVector)) + { + __data_start__ = .; + + /* _sdata is used in startup code */ + _sdata = __data_start__; + KEEP(*(.ramVector)) KEEP(*(.init)) KEEP(*(.fini)) - *(.rodata*) - *(vtable) *(.data*) - *sl_si91x_bus.c.o(.text*) - *sl_si91x_driver.c.o(.text*) - *sli_si91x_multithreaded.c.o(.text*) - *rsi_hal_mcu_m4_ram.c.o(.text*) - *rsi_hal_mcu_m4_rom.c.o(.text*) - *rsi_deepsleep_soc.c.o(.text*) - *croutine.c.o(.text*) - *event_groups.c.o(.text*) - *list.c.o(.text*) - *queue.c.o(.text*) - *cmsis_os2.c.o(.text*) - *stream_buffer.c.o(.text*) - *tasks.c.o(.text*) - *timers.c.o(.text*) - *freertos_umm_malloc_host.c.o(.text*) - *malloc_buffers.c.o(.text*) - *sl_rsi_utility.c.o(.text*) - *port.c.o(.text*) - *heap_*.c.o(.text*) - *sl_sleeptimer.c.o(.text*) - *sl_sleeptimer_hal_si91x_sysrtc.c.o(.text*) - *rsi_sysrtc.c.o(.text*) - *sl_si91x_low_power_tickless_mode.c.o(.text*) - *sl_core_cortexm.c.o(.text*) - - /* ipmu calibration data */ - *(.common_ipmu_ram*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - . = ALIGN(4); - /* All data end */ - __data_end__ = .; - - /* _edata is used in coide startup code */ - _edata = __data_end__; - - } > ram - - .bss . : - { - . = ALIGN(4); - __bss_start__ = .; - _sbss = __bss_start__; - *(SORT_BY_ALIGNMENT(.bss*)) - *(COMMON) - . = ALIGN(4); - __bss_end__ = .; - _ebss = __bss_end__; - } > ram - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - Co_Stack_Size = 0x3000; - .co_stack ALIGN(8) (NOLOAD): + *rsi_hal_mcu_m4_ram.o(.text*) + *rsi_hal_mcu_m4_rom.o(.text*) + *sl_si91x_driver.o(.text*) + *sl_si91x_bus.o(.text*) + *UDMA.o(.text*) + *sl_sleeptimer.o(.text*) + *sl_sleeptimer_hal_si91x_sysrtc.o(.text*) + *rsi_sysrtc.o(.text*) + *sl_si91x_low_power_tickless_mode.o(.text*) + *sli_si91x_multithreaded.o(.text*) + *rsi_deepsleep_soc.o(.text*) + *croutine.o(.text*) + *event_groups.o(.text*) + *list.o(.text*) + *queue.o(.text*) + *cmsis_os2.o(.text*) + *stream_buffer.o(.text*) + *tasks.o(.text*) + *timers.o(.text*) + *freertos_umm_malloc_host.o(.text*) + *malloc_buffers.o(.text*) + *sl_rsi_utility.o(.text*) + *port.o(.text*) + *heap_*.o(.text*) + + /* ipmu calibration data */ + *(.common_ipmu_ram*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + KEEP(*(.jcr*)) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + + /* _edata is used in startup code */ + _edata = __data_end__; + } > ram AT> rom + + .bss (NOLOAD) : { - __co_stackLimit = .; - KEEP(*(.co_stack*)) . = ALIGN(4); - . += Co_Stack_Size; - __co_stackTop = .; - } > ram + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > ram - StackSize = 0x1400; - .stack ALIGN(8) (NOLOAD): + + .stack (NOLOAD): { __StackLimit = .; KEEP(*(.stack*)) . = ALIGN(4); - . += StackSize; __StackTop = .; PROVIDE(__stack = __StackTop); } > ram - - .heap (COPY): - { + .heap (COPY): + { __HeapBase = .; __end__ = .; end = __end__; _end = __end__; - KEEP(*(.heap*)) + KEEP(*(.heap*)) . = ORIGIN(ram) + LENGTH(ram); - __HeapLimit = .; - } > ram - + } > ram + __heap_size = __HeapLimit - __HeapBase; - __ram_end__ = 0x400 + 0x4fc00; - __main_flash_end__ = 0x8202000 + 0x1fe000; - + .udma_addr0 : + { + *(.udma_addr0*) + } > udma0 AT> rom + + .udma_addr1 : + { + *(.udma_addr1*) + } > udma1 AT> rom + + __ram_end__ = 0xc + 0x4fbf4; + __main_flash_end__ = 0x8202000 + 0x1fe000; /* This is where we handle flash storage blocks. We use dummy sections for finding the configured * block sizes and then "place" them at the end of flash when the size is known. */ - .internal_storage (DSECT) : { - KEEP(*(.internal_storage*)) + .internal_storage1 (DSECT) : { + KEEP(*(.internal_storage1*)) } > rom - - .nvm (DSECT) : { KEEP(*(.simee*)) } > rom - - /* Last page of flash is reserved for the manufacturing token space */ + linker_nvm_end = __main_flash_end__ - 4096; linker_nvm_begin = linker_nvm_end - SIZEOF(.nvm); linker_nvm_size = SIZEOF(.nvm); linker_storage_end = linker_nvm_begin; - __nvm3Base = linker_nvm_begin; - - linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage); - linker_storage_size = SIZEOF(.internal_storage); - ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !") - - app_flash_end = 0x8202000 + 0x1fe000; - ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= app_flash_end, "NVM3 is excessing the flash size !") -} + __nvm3Base = linker_nvm_begin; + linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage1); + linker_storage_size = SIZEOF(.internal_storage1); + ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !") +} \ No newline at end of file diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index b50f7a09fbd24e..f3219db27a9ac5 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -257,6 +257,7 @@ template("siwx917_sdk") { "SLI_CODE_CLASSIFICATION_DISABLE=1", "SL_MATTER_GN_BUILD=1", "SILABS_LOG_OUT_UART=${sl_uart_log_output}", + "SUPPORT_CPLUSPLUS=1", ] if (silabs_log_enabled && chip_logging) { @@ -772,10 +773,8 @@ template("siwx917_sdk") { "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream.c", "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream_rtt.c", - # STARTUP FILES - # TODO swap to startup_si91x and new linkerfile once Board_Debug_Init is fixed. - #"${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c", - "${matter_support_root}/board-support/si91x/support/src/startup_common_RS1xxxx.c", + # STARTUP FILES. + "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/src/startup_si91x.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/nvm3/src/sl_si91x_common_flash_intf.c", # OTA From bc016e2f7a2e40a97b1f396994b5a2e40a2c29cc Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Tue, 6 May 2025 15:36:46 -0400 Subject: [PATCH 6/7] Bump matter_support with provision lib fix. Remove unused files --- third_party/silabs/SiWx917_sdk.gni | 1 - third_party/silabs/matter_support | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index f3219db27a9ac5..e74c96037b1400 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -132,7 +132,6 @@ template("siwx917_sdk") { "${efr32_sdk_root}/platform/service/sleeptimer/inc", "${efr32_sdk_root}/platform/service/sleeptimer/config", "${efr32_sdk_root}/platform/service/sleeptimer/src", - "${matter_support_root}/board-support/si91x/support/inc", "${efr32_sdk_root}/platform/service/iostream/inc", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/inc", diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index c17e40d0b0024b..cb96049dbd1559 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit c17e40d0b0024b4ab26820fe67b8391ff292e32e +Subproject commit cb96049dbd1559dd51e1450093713e88fdde93e0 From acdc3d34b48a22b80160ef29147a28d961be6ee5 Mon Sep 17 00:00:00 2001 From: Junior Martinez Date: Wed, 7 May 2025 07:45:53 -0400 Subject: [PATCH 7/7] Add missing include path for 917 ncp builds --- third_party/silabs/efr32_sdk.gni | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index dc93f7a3083065..4925d76539517b 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -363,6 +363,7 @@ template("efr32_sdk") { "${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/config", "${wifi_sdk_root}/components/device/silabs/si91x/wireless/inc", "${wifi_sdk_root}/components/device/silabs/si91x/wireless/ble/inc", + "${wifi_sdk_root}/components/device/silabs/si91x/wireless/firmware_upgrade", # wifi component "${wifi_sdk_root}/components/protocol/wifi/inc",