Skip to content

Commit

Permalink
[Silabs] Update silabs sdks versions (project-chip#37034)
Browse files Browse the repository at this point in the history
* 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 (project-chip#132)

* [SL-UP] Add BRD4338A support for Wiseconnect 3.4 in GN (project-chip#104)

* Update for siwx917

* Changes for wifi sdk 3.4.0 (project-chip#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>
  • Loading branch information
5 people authored Jan 15, 2025
1 parent c4b3825 commit 11a6571
Show file tree
Hide file tree
Showing 27 changed files with 291 additions and 158 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-efr32:94
image: ghcr.io/project-chip/chip-build-efr32:95
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void BaseApplicationDelegate::OnCommissioningWindowClosed()
#if CHIP_CONFIG_ENABLE_ICD_SERVER && SLI_SI917
if (!BaseApplication::GetProvisionStatus() && !isComissioningStarted)
{
int32_t status = wfx_power_save(RSI_SLEEP_MODE_8, STANDBY_POWER_SAVE_WITH_RAM_RETENTION);
int32_t status = wfx_power_save(RSI_SLEEP_MODE_8, DEEP_SLEEP_WITH_RAM_RETENTION);
if (status != SL_STATUS_OK)
{
ChipLogError(AppServer, "Failed to enable the TA Deep Sleep");
Expand Down
3 changes: 3 additions & 0 deletions examples/platform/silabs/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#define configENABLE_FPU 1
#define configENABLE_MPU 0
/* FreeRTOS Secure Side Only and TrustZone Security Extension */
#ifndef configRUN_FREERTOS_SECURE_ONLY
// prevent redefinition with Series 3
#define configRUN_FREERTOS_SECURE_ONLY 1
#endif
#define configENABLE_TRUSTZONE 0
/* FreeRTOS MPU specific definitions. */
#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS (0)
Expand Down
5 changes: 4 additions & 1 deletion examples/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ config("efr32-common-config") {
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_MULTI_OTA_REQUESTOR=1" ]
}

ldflags = [ "-Wl,--no-warn-rwx-segment" ]
ldflags = [
"-Wl,--no-warn-rwx-segment",
"-fno-lto",
]
}

source_set("efr32-common") {
Expand Down
3 changes: 3 additions & 0 deletions examples/platform/silabs/ldscripts/SiWx917-common.ld
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ SECTIONS
*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 = .);
Expand Down
40 changes: 29 additions & 11 deletions examples/platform/silabs/ldscripts/efr32mg24.ld
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
MEMORY
{
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x178000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x3fffc
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
}

ENTRY(Reset_Handler)
Expand All @@ -48,6 +49,13 @@ SECTIONS
__Vectors_Size = __Vectors_End - __Vectors;
__lma_ramfuncs_start__ = .;
} > FLASH
.bootloader_reset_section (NOLOAD):
{
__ResetReasonStart__ = .;
. = . + 4;
. = ALIGN(4);
__ResetReasonEnd__ = .;
} > BOOTLOADER_RESET_REGION

.stack (NOLOAD):
{
Expand All @@ -59,31 +67,33 @@ SECTIONS
PROVIDE(__stack = __StackTop);
} > RAM


.noinit (NOLOAD):
{
*(.noinit*);
} > RAM

.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)
. = ALIGN(4);
. = ALIGN(32);
__bss_end__ = .;
} > RAM


.noinit (NOLOAD):
{
*(.noinit*);
. = ALIGN(32);
} > RAM


text_application_ram :
{
. = ALIGN(4);
. = ALIGN(32);
__vma_ramfuncs_start__ = .;
__text_application_ram_start__ = .;

*(text_application_ram)

. = ALIGN(4);
. = ALIGN(32);
__vma_ramfuncs_end__ = .;
__text_application_ram_end__ = .;
} > RAM AT > FLASH
Expand Down Expand Up @@ -196,16 +206,24 @@ SECTIONS
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
*(SEGGER_RTT)

. = ALIGN(4);
/* All data end */
__data_end__ = .;

} > RAM AT > FLASH


/* Calculate heap size based on RAM limits. */
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
heap_size = heap_limit - __HeapBase;
.memory_manager_heap (NOLOAD):
{
. = ALIGN(8);
__HeapBase = .;
. += heap_size;
__end__ = .;
end = __end__;
_end = __end__;
Expand All @@ -214,7 +232,7 @@ SECTIONS
} > RAM

__heap_size = __HeapLimit - __HeapBase;
__ram_end__ = 0x20000000 + 0x40000;
__ram_end__ = 0x20000004 + 0x3fffc;
__main_flash_end__ = 0x8006000 + 0x178000;

/* This is where we handle flash storage blocks. We use dummy sections for finding the configured
Expand Down
40 changes: 29 additions & 11 deletions examples/platform/silabs/ldscripts/efr32mg26.ld
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
MEMORY
{
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x318000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x80000
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x7fffc
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
}

ENTRY(Reset_Handler)
Expand All @@ -48,6 +49,13 @@ SECTIONS
__Vectors_Size = __Vectors_End - __Vectors;
__lma_ramfuncs_start__ = .;
} > FLASH
.bootloader_reset_section (NOLOAD):
{
__ResetReasonStart__ = .;
. = . + 4;
. = ALIGN(4);
__ResetReasonEnd__ = .;
} > BOOTLOADER_RESET_REGION

.stack (NOLOAD):
{
Expand All @@ -59,31 +67,33 @@ SECTIONS
PROVIDE(__stack = __StackTop);
} > RAM


.noinit (NOLOAD):
{
*(.noinit*);
} > RAM

.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)
. = ALIGN(4);
. = ALIGN(32);
__bss_end__ = .;
} > RAM


.noinit (NOLOAD):
{
*(.noinit*);
. = ALIGN(32);
} > RAM


text_application_ram :
{
. = ALIGN(4);
. = ALIGN(32);
__vma_ramfuncs_start__ = .;
__text_application_ram_start__ = .;

*(text_application_ram)

. = ALIGN(4);
. = ALIGN(32);
__vma_ramfuncs_end__ = .;
__text_application_ram_end__ = .;
} > RAM AT > FLASH
Expand Down Expand Up @@ -196,16 +206,24 @@ SECTIONS
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
*(SEGGER_RTT)

. = ALIGN(4);
/* All data end */
__data_end__ = .;

} > RAM AT > FLASH


/* Calculate heap size based on RAM limits. */
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
heap_size = heap_limit - __HeapBase;
.memory_manager_heap (NOLOAD):
{
. = ALIGN(8);
__HeapBase = .;
. += heap_size;
__end__ = .;
end = __end__;
_end = __end__;
Expand All @@ -214,7 +232,7 @@ SECTIONS
} > RAM

__heap_size = __HeapLimit - __HeapBase;
__ram_end__ = 0x20000000 + 0x80000;
__ram_end__ = 0x20000004 + 0x7fffc;
__main_flash_end__ = 0x8006000 + 0x318000;

/* This is where we handle flash storage blocks. We use dummy sections for finding the configured
Expand Down
40 changes: 29 additions & 11 deletions examples/platform/silabs/ldscripts/mgm24.ld
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
MEMORY
{
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x178000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x3fffc
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
}

ENTRY(Reset_Handler)
Expand All @@ -48,6 +49,13 @@ SECTIONS
__Vectors_Size = __Vectors_End - __Vectors;
__lma_ramfuncs_start__ = .;
} > FLASH
.bootloader_reset_section (NOLOAD):
{
__ResetReasonStart__ = .;
. = . + 4;
. = ALIGN(4);
__ResetReasonEnd__ = .;
} > BOOTLOADER_RESET_REGION

.stack (NOLOAD):
{
Expand All @@ -59,31 +67,33 @@ SECTIONS
PROVIDE(__stack = __StackTop);
} > RAM


.noinit (NOLOAD):
{
*(.noinit*);
} > RAM

.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)
. = ALIGN(4);
. = ALIGN(32);
__bss_end__ = .;
} > RAM


.noinit (NOLOAD):
{
*(.noinit*);
. = ALIGN(32);
} > RAM


text_application_ram :
{
. = ALIGN(4);
. = ALIGN(32);
__vma_ramfuncs_start__ = .;
__text_application_ram_start__ = .;

*(text_application_ram)

. = ALIGN(4);
. = ALIGN(32);
__vma_ramfuncs_end__ = .;
__text_application_ram_end__ = .;
} > RAM AT > FLASH
Expand Down Expand Up @@ -196,16 +206,24 @@ SECTIONS
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
*(SEGGER_RTT)

. = ALIGN(4);
/* All data end */
__data_end__ = .;

} > RAM AT > FLASH


/* Calculate heap size based on RAM limits. */
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
heap_size = heap_limit - __HeapBase;
.memory_manager_heap (NOLOAD):
{
. = ALIGN(8);
__HeapBase = .;
. += heap_size;
__end__ = .;
end = __end__;
_end = __end__;
Expand All @@ -214,7 +232,7 @@ SECTIONS
} > RAM

__heap_size = __HeapLimit - __HeapBase;
__ram_end__ = 0x20000000 + 0x40000;
__ram_end__ = 0x20000004 + 0x3fffc;
__main_flash_end__ = 0x8006000 + 0x178000;

/* This is where we handle flash storage blocks. We use dummy sections for finding the configured
Expand Down
1 change: 0 additions & 1 deletion examples/platform/silabs/matter-platform.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ component:
- {id: mbedtls_base64}
- {id: ot_psa_crypto}
- {id: ot_platform_abstraction}
- {id: ot_rtos_wrappers_real}
- {id: sl_ot_custom_cli}
# Necessary componenets for ot coap cert lib
# - {id: mbedtls_dtls} # Requried by COAP lib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <ProvisionStorage.h>
#include <algorithm>
#include <lib/support/CodeUtils.h>
#include <platform/silabs/provision/ProvisionStorage.h>
#include <string.h>

namespace chip {
Expand Down
1 change: 0 additions & 1 deletion src/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ static_library("SiWx917") {

public_deps += [
"${chip_root}/src/crypto",
"${mbedtls_root}:mbedtls",
"${silabs_platform_dir}/wifi:wifi-platform",
]
}
Expand Down
Loading

0 comments on commit 11a6571

Please sign in to comment.