Skip to content

Commit 11a6571

Browse files
jmartinez-silabsrcasallas-silabsrosahay-silabsmkardous-silabsbhmanda-silabs
authored
[Silabs] Update silabs sdks versions (project-chip#37034)
* Bump submodule for sdk updates and docker image version * Update files and libs pulled from sisdk. add -fno-lto ld flag. update mg24 linkerfile * Bring PSA crypto changes from sisdk Co-authored-by: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> * fixup merge conflict on CHIPCryptoPALPsaEfr32.cpp * Update mgm24 linkerfile. add no-lto to test-driver * update mg26 linkerfile * Adds mbedTLS 3.x support with tinycrypt uECC APIs (#132) * [SL-UP] Add BRD4338A support for Wiseconnect 3.4 in GN (#104) * Update for siwx917 * Changes for wifi sdk 3.4.0 (#89) * fix slc-gen build * fix wifi ncp build * Fixup nxp submodule desync * Fix ot_lib builds * Fix linking issue with coapi lib. address comments * Cleanup commented lines and bump merged matter_support sha * move some psa define from coap config to the right header * Add segger_rtt reference in linkerfile * fix rebase to master conflict issue --------- Co-authored-by: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com> Co-authored-by: Rohan Sahay <103027015+rosahay-silabs@users.noreply.github.com> Co-authored-by: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com> Co-authored-by: bhmanda-silabs <107180296+bhmanda-silabs@users.noreply.github.com>
1 parent c4b3825 commit 11a6571

27 files changed

+291
-158
lines changed

.github/workflows/examples-efr32.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
if: github.actor != 'restyled-io[bot]'
4242

4343
container:
44-
image: ghcr.io/project-chip/chip-build-efr32:94
44+
image: ghcr.io/project-chip/chip-build-efr32:95
4545
volumes:
4646
- "/tmp/bloat_reports:/tmp/bloat_reports"
4747
steps:

examples/platform/silabs/BaseApplication.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void BaseApplicationDelegate::OnCommissioningWindowClosed()
187187
#if CHIP_CONFIG_ENABLE_ICD_SERVER && SLI_SI917
188188
if (!BaseApplication::GetProvisionStatus() && !isComissioningStarted)
189189
{
190-
int32_t status = wfx_power_save(RSI_SLEEP_MODE_8, STANDBY_POWER_SAVE_WITH_RAM_RETENTION);
190+
int32_t status = wfx_power_save(RSI_SLEEP_MODE_8, DEEP_SLEEP_WITH_RAM_RETENTION);
191191
if (status != SL_STATUS_OK)
192192
{
193193
ChipLogError(AppServer, "Failed to enable the TA Deep Sleep");

examples/platform/silabs/FreeRTOSConfig.h

+3
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
203203
#define configENABLE_FPU 1
204204
#define configENABLE_MPU 0
205205
/* FreeRTOS Secure Side Only and TrustZone Security Extension */
206+
#ifndef configRUN_FREERTOS_SECURE_ONLY
207+
// prevent redefinition with Series 3
206208
#define configRUN_FREERTOS_SECURE_ONLY 1
209+
#endif
207210
#define configENABLE_TRUSTZONE 0
208211
/* FreeRTOS MPU specific definitions. */
209212
#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS (0)

examples/platform/silabs/efr32/BUILD.gn

+4-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ config("efr32-common-config") {
137137
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_MULTI_OTA_REQUESTOR=1" ]
138138
}
139139

140-
ldflags = [ "-Wl,--no-warn-rwx-segment" ]
140+
ldflags = [
141+
"-Wl,--no-warn-rwx-segment",
142+
"-fno-lto",
143+
]
141144
}
142145

143146
source_set("efr32-common") {

examples/platform/silabs/ldscripts/SiWx917-common.ld

+3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ SECTIONS
152152
*sl_si91x_low_power_tickless_mode.c.o(.text*)
153153
*sl_core_cortexm.c.o(.text*)
154154

155+
/* ipmu calibration data */
156+
*(.common_ipmu_ram*)
157+
155158
. = ALIGN(4);
156159
/* preinit data */
157160
PROVIDE_HIDDEN (__preinit_array_start = .);

examples/platform/silabs/ldscripts/efr32mg24.ld

+29-11
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
MEMORY
3131
{
3232
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x178000
33-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000
33+
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x3fffc
34+
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
3435
}
3536

3637
ENTRY(Reset_Handler)
@@ -48,6 +49,13 @@ SECTIONS
4849
__Vectors_Size = __Vectors_End - __Vectors;
4950
__lma_ramfuncs_start__ = .;
5051
} > FLASH
52+
.bootloader_reset_section (NOLOAD):
53+
{
54+
__ResetReasonStart__ = .;
55+
. = . + 4;
56+
. = ALIGN(4);
57+
__ResetReasonEnd__ = .;
58+
} > BOOTLOADER_RESET_REGION
5159

5260
.stack (NOLOAD):
5361
{
@@ -59,31 +67,33 @@ SECTIONS
5967
PROVIDE(__stack = __StackTop);
6068
} > RAM
6169

62-
63-
.noinit (NOLOAD):
64-
{
65-
*(.noinit*);
66-
} > RAM
67-
6870
.bss :
6971
{
7072
. = ALIGN(4);
7173
__bss_start__ = .;
7274
*(SORT_BY_ALIGNMENT(.bss*))
7375
*(COMMON)
74-
. = ALIGN(4);
76+
. = ALIGN(32);
7577
__bss_end__ = .;
7678
} > RAM
7779

80+
81+
.noinit (NOLOAD):
82+
{
83+
*(.noinit*);
84+
. = ALIGN(32);
85+
} > RAM
86+
87+
7888
text_application_ram :
7989
{
80-
. = ALIGN(4);
90+
. = ALIGN(32);
8191
__vma_ramfuncs_start__ = .;
8292
__text_application_ram_start__ = .;
8393

8494
*(text_application_ram)
8595

86-
. = ALIGN(4);
96+
. = ALIGN(32);
8797
__vma_ramfuncs_end__ = .;
8898
__text_application_ram_end__ = .;
8999
} > RAM AT > FLASH
@@ -196,16 +206,24 @@ SECTIONS
196206
KEEP(*(SORT(.fini_array.*)))
197207
KEEP(*(.fini_array))
198208
PROVIDE_HIDDEN (__fini_array_end = .);
209+
. = ALIGN(4);
210+
*(SEGGER_RTT)
199211

200212
. = ALIGN(4);
201213
/* All data end */
202214
__data_end__ = .;
203215

204216
} > RAM AT > FLASH
217+
218+
219+
/* Calculate heap size based on RAM limits. */
220+
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
221+
heap_size = heap_limit - __HeapBase;
205222
.memory_manager_heap (NOLOAD):
206223
{
207224
. = ALIGN(8);
208225
__HeapBase = .;
226+
. += heap_size;
209227
__end__ = .;
210228
end = __end__;
211229
_end = __end__;
@@ -214,7 +232,7 @@ SECTIONS
214232
} > RAM
215233

216234
__heap_size = __HeapLimit - __HeapBase;
217-
__ram_end__ = 0x20000000 + 0x40000;
235+
__ram_end__ = 0x20000004 + 0x3fffc;
218236
__main_flash_end__ = 0x8006000 + 0x178000;
219237

220238
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured

examples/platform/silabs/ldscripts/efr32mg26.ld

+29-11
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
MEMORY
3131
{
3232
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x318000
33-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x80000
33+
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x7fffc
34+
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
3435
}
3536

3637
ENTRY(Reset_Handler)
@@ -48,6 +49,13 @@ SECTIONS
4849
__Vectors_Size = __Vectors_End - __Vectors;
4950
__lma_ramfuncs_start__ = .;
5051
} > FLASH
52+
.bootloader_reset_section (NOLOAD):
53+
{
54+
__ResetReasonStart__ = .;
55+
. = . + 4;
56+
. = ALIGN(4);
57+
__ResetReasonEnd__ = .;
58+
} > BOOTLOADER_RESET_REGION
5159

5260
.stack (NOLOAD):
5361
{
@@ -59,31 +67,33 @@ SECTIONS
5967
PROVIDE(__stack = __StackTop);
6068
} > RAM
6169

62-
63-
.noinit (NOLOAD):
64-
{
65-
*(.noinit*);
66-
} > RAM
67-
6870
.bss :
6971
{
7072
. = ALIGN(4);
7173
__bss_start__ = .;
7274
*(SORT_BY_ALIGNMENT(.bss*))
7375
*(COMMON)
74-
. = ALIGN(4);
76+
. = ALIGN(32);
7577
__bss_end__ = .;
7678
} > RAM
7779

80+
81+
.noinit (NOLOAD):
82+
{
83+
*(.noinit*);
84+
. = ALIGN(32);
85+
} > RAM
86+
87+
7888
text_application_ram :
7989
{
80-
. = ALIGN(4);
90+
. = ALIGN(32);
8191
__vma_ramfuncs_start__ = .;
8292
__text_application_ram_start__ = .;
8393

8494
*(text_application_ram)
8595

86-
. = ALIGN(4);
96+
. = ALIGN(32);
8797
__vma_ramfuncs_end__ = .;
8898
__text_application_ram_end__ = .;
8999
} > RAM AT > FLASH
@@ -196,16 +206,24 @@ SECTIONS
196206
KEEP(*(SORT(.fini_array.*)))
197207
KEEP(*(.fini_array))
198208
PROVIDE_HIDDEN (__fini_array_end = .);
209+
. = ALIGN(4);
210+
*(SEGGER_RTT)
199211

200212
. = ALIGN(4);
201213
/* All data end */
202214
__data_end__ = .;
203215

204216
} > RAM AT > FLASH
217+
218+
219+
/* Calculate heap size based on RAM limits. */
220+
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
221+
heap_size = heap_limit - __HeapBase;
205222
.memory_manager_heap (NOLOAD):
206223
{
207224
. = ALIGN(8);
208225
__HeapBase = .;
226+
. += heap_size;
209227
__end__ = .;
210228
end = __end__;
211229
_end = __end__;
@@ -214,7 +232,7 @@ SECTIONS
214232
} > RAM
215233

216234
__heap_size = __HeapLimit - __HeapBase;
217-
__ram_end__ = 0x20000000 + 0x80000;
235+
__ram_end__ = 0x20000004 + 0x7fffc;
218236
__main_flash_end__ = 0x8006000 + 0x318000;
219237

220238
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured

examples/platform/silabs/ldscripts/mgm24.ld

+29-11
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
MEMORY
3131
{
3232
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x178000
33-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000
33+
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x3fffc
34+
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
3435
}
3536

3637
ENTRY(Reset_Handler)
@@ -48,6 +49,13 @@ SECTIONS
4849
__Vectors_Size = __Vectors_End - __Vectors;
4950
__lma_ramfuncs_start__ = .;
5051
} > FLASH
52+
.bootloader_reset_section (NOLOAD):
53+
{
54+
__ResetReasonStart__ = .;
55+
. = . + 4;
56+
. = ALIGN(4);
57+
__ResetReasonEnd__ = .;
58+
} > BOOTLOADER_RESET_REGION
5159

5260
.stack (NOLOAD):
5361
{
@@ -59,31 +67,33 @@ SECTIONS
5967
PROVIDE(__stack = __StackTop);
6068
} > RAM
6169

62-
63-
.noinit (NOLOAD):
64-
{
65-
*(.noinit*);
66-
} > RAM
67-
6870
.bss :
6971
{
7072
. = ALIGN(4);
7173
__bss_start__ = .;
7274
*(SORT_BY_ALIGNMENT(.bss*))
7375
*(COMMON)
74-
. = ALIGN(4);
76+
. = ALIGN(32);
7577
__bss_end__ = .;
7678
} > RAM
7779

80+
81+
.noinit (NOLOAD):
82+
{
83+
*(.noinit*);
84+
. = ALIGN(32);
85+
} > RAM
86+
87+
7888
text_application_ram :
7989
{
80-
. = ALIGN(4);
90+
. = ALIGN(32);
8191
__vma_ramfuncs_start__ = .;
8292
__text_application_ram_start__ = .;
8393

8494
*(text_application_ram)
8595

86-
. = ALIGN(4);
96+
. = ALIGN(32);
8797
__vma_ramfuncs_end__ = .;
8898
__text_application_ram_end__ = .;
8999
} > RAM AT > FLASH
@@ -196,16 +206,24 @@ SECTIONS
196206
KEEP(*(SORT(.fini_array.*)))
197207
KEEP(*(.fini_array))
198208
PROVIDE_HIDDEN (__fini_array_end = .);
209+
. = ALIGN(4);
210+
*(SEGGER_RTT)
199211

200212
. = ALIGN(4);
201213
/* All data end */
202214
__data_end__ = .;
203215

204216
} > RAM AT > FLASH
217+
218+
219+
/* Calculate heap size based on RAM limits. */
220+
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
221+
heap_size = heap_limit - __HeapBase;
205222
.memory_manager_heap (NOLOAD):
206223
{
207224
. = ALIGN(8);
208225
__HeapBase = .;
226+
. += heap_size;
209227
__end__ = .;
210228
end = __end__;
211229
_end = __end__;
@@ -214,7 +232,7 @@ SECTIONS
214232
} > RAM
215233

216234
__heap_size = __HeapLimit - __HeapBase;
217-
__ram_end__ = 0x20000000 + 0x40000;
235+
__ram_end__ = 0x20000004 + 0x3fffc;
218236
__main_flash_end__ = 0x8006000 + 0x178000;
219237

220238
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured

examples/platform/silabs/matter-platform.slcp

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ component:
7373
- {id: mbedtls_base64}
7474
- {id: ot_psa_crypto}
7575
- {id: ot_platform_abstraction}
76-
- {id: ot_rtos_wrappers_real}
7776
- {id: sl_ot_custom_cli}
7877
# Necessary componenets for ot coap cert lib
7978
# - {id: mbedtls_dtls} # Requried by COAP lib

examples/platform/silabs/provision/ProvisionStorageCustom.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
#include <ProvisionStorage.h>
1817
#include <algorithm>
1918
#include <lib/support/CodeUtils.h>
19+
#include <platform/silabs/provision/ProvisionStorage.h>
2020
#include <string.h>
2121

2222
namespace chip {

src/platform/silabs/SiWx917/BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ static_library("SiWx917") {
101101

102102
public_deps += [
103103
"${chip_root}/src/crypto",
104-
"${mbedtls_root}:mbedtls",
105104
"${silabs_platform_dir}/wifi:wifi-platform",
106105
]
107106
}

0 commit comments

Comments
 (0)