diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 83c66dcf6e7bfe..f10377e4bc63db 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:26 + image: ghcr.io/project-chip/chip-build-efr32:31 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 903c8d0acf0051..e3251e074f4ad1 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -68,7 +68,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:26 + image: ghcr.io/project-chip/chip-build-efr32:31 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.gitmodules b/.gitmodules index fdfac588c0eb35..7e82068156fbe5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -239,7 +239,7 @@ [submodule "third_party/silabs/gecko_sdk"] path = third_party/silabs/gecko_sdk url = https://github.com/SiliconLabs/gecko_sdk.git - branch = v4.3.2 + branch = v4.4.0 platforms = silabs [submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] path = third_party/silabs/wiseconnect-wifi-bt-sdk diff --git a/examples/platform/silabs/ldscripts/efr32mg12.ld b/examples/platform/silabs/ldscripts/efr32mg12.ld index f9f4f55f8b9a73..c4ef0e2ec1c6c9 100644 --- a/examples/platform/silabs/ldscripts/efr32mg12.ld +++ b/examples/platform/silabs/ldscripts/efr32mg12.ld @@ -108,7 +108,12 @@ SECTIONS *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) *(SORT(.dtors.*)) *(.dtors) - + + __code_classification_validator_start__ = .; + . = . + 0x20; + *(code_classification_validator) + . = ALIGN(32); + __code_classification_validator_end__ = .; *(.rodata*) KEEP(*(.eh_frame*)) @@ -194,6 +199,26 @@ SECTIONS . = ALIGN(4); __bss_end__ = .; } > RAM + __ramfuncs_start__ = .; + + __vma_ramfuncs_start__ = .; + __lma_ramfuncs_start__ = __etext + SIZEOF(.data); + + __text_application_ram_offset__ = . - __vma_ramfuncs_start__; + text_application_ram . : AT(__lma_ramfuncs_start__ + __text_application_ram_offset__) + { + . = ALIGN(4); + __text_application_ram_start__ = .; + *(text_application_ram) + . = ALIGN(4); + __text_application_ram_end__ = .; + } > RAM + + . = ALIGN(4); + __vma_ramfuncs_end__ = .; + __lma_ramfuncs_end__ = __lma_ramfuncs_start__ + __text_application_ram_offset__ + SIZEOF(text_application_ram); + + __ramfuncs_end__ = .; .heap (COPY) : { diff --git a/examples/platform/silabs/ldscripts/efr32mg24.ld b/examples/platform/silabs/ldscripts/efr32mg24.ld index b057a9af720a7a..b911b1339741d4 100644 --- a/examples/platform/silabs/ldscripts/efr32mg24.ld +++ b/examples/platform/silabs/ldscripts/efr32mg24.ld @@ -111,9 +111,14 @@ SECTIONS *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) *(SORT(.dtors.*)) *(.dtors) - + + __code_classification_validator_start__ = .; + . = . + 0x20; + *(code_classification_validator) + . = ALIGN(32); + __code_classification_validator_end__ = .; *(.rodata*) - + KEEP(*(.eh_frame*)) } > FLASH .ARM.extab : @@ -196,6 +201,27 @@ SECTIONS __bss_end__ = .; } > RAM AT > RAM + __ramfuncs_start__ = .; + + __vma_ramfuncs_start__ = .; + __lma_ramfuncs_start__ = __etext + SIZEOF(.data); + + __text_application_ram_offset__ = . - __vma_ramfuncs_start__; + text_application_ram . : AT(__lma_ramfuncs_start__ + __text_application_ram_offset__) + { + . = ALIGN(4); + __text_application_ram_start__ = .; + *(text_application_ram) + . = ALIGN(4); + __text_application_ram_end__ = .; + } > RAM + + . = ALIGN(4); + __vma_ramfuncs_end__ = .; + __lma_ramfuncs_end__ = __lma_ramfuncs_start__ + __text_application_ram_offset__ + SIZEOF(text_application_ram); + + __ramfuncs_end__ = .; + .heap (COPY): { __HeapBase = .; diff --git a/examples/platform/silabs/ldscripts/mgm24.ld b/examples/platform/silabs/ldscripts/mgm24.ld index b057a9af720a7a..a38794bbd7973d 100644 --- a/examples/platform/silabs/ldscripts/mgm24.ld +++ b/examples/platform/silabs/ldscripts/mgm24.ld @@ -111,7 +111,12 @@ SECTIONS *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) *(SORT(.dtors.*)) *(.dtors) - + + __code_classification_validator_start__ = .; + . = . + 0x20; + *(code_classification_validator) + . = ALIGN(32); + __code_classification_validator_end__ = .; *(.rodata*) KEEP(*(.eh_frame*)) @@ -196,6 +201,27 @@ SECTIONS __bss_end__ = .; } > RAM AT > RAM + __ramfuncs_start__ = .; + + __vma_ramfuncs_start__ = .; + __lma_ramfuncs_start__ = __etext + SIZEOF(.data); + + __text_application_ram_offset__ = . - __vma_ramfuncs_start__; + text_application_ram . : AT(__lma_ramfuncs_start__ + __text_application_ram_offset__) + { + . = ALIGN(4); + __text_application_ram_start__ = .; + *(text_application_ram) + . = ALIGN(4); + __text_application_ram_end__ = .; + } > RAM + + . = ALIGN(4); + __vma_ramfuncs_end__ = .; + __lma_ramfuncs_end__ = __lma_ramfuncs_start__ + __text_application_ram_offset__ + SIZEOF(text_application_ram); + + __ramfuncs_end__ = .; + .heap (COPY): { __HeapBase = .; diff --git a/src/platform/silabs/efr32/BLEManagerImpl.cpp b/src/platform/silabs/efr32/BLEManagerImpl.cpp index f8130df8b89fdf..fe8acb3ad02fcb 100644 --- a/src/platform/silabs/efr32/BLEManagerImpl.cpp +++ b/src/platform/silabs/efr32/BLEManagerImpl.cpp @@ -1053,7 +1053,7 @@ extern "C" void sl_bt_on_event(sl_bt_msg_t * evt) evt->data.evt_gatt_server_characteristic_status.connection); } else if ((evt->data.evt_gatt_server_characteristic_status.characteristic == gattdb_CHIPoBLEChar_Tx) && - (evt->data.evt_gatt_server_characteristic_status.status_flags == gatt_server_client_config)) + (evt->data.evt_gatt_server_characteristic_status.status_flags == sl_bt_gatt_server_client_config)) { chip::DeviceLayer::Internal::BLEMgrImpl().HandleTXCharCCCDWrite(evt); } diff --git a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp index 479730be30332d..6989e3a2c67945 100644 --- a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp +++ b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp @@ -20,6 +20,10 @@ * PSA Crypto API based implementation of CHIP crypto primitives * with Silicon Labs SDK modifications */ +// The psa_driver_wrappers.h file that we're including here assumes that it has +// access to private struct members. Define this here in order to avoid +// compilation errors. +#define MBEDTLS_ALLOW_PRIVATE_ACCESS #include diff --git a/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h b/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h index 536cba392c578a..6ecfae7d3e4476 100644 --- a/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h +++ b/src/platform/silabs/efr32/efr32-chip-mbedtls-config.h @@ -54,6 +54,9 @@ #define MBEDTLS_CCM_C #define MBEDTLS_ECJPAKE_C #define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED +#define MBEDTLS_PK_HAVE_CURVE_SECP256R1 +#define MBEDTLS_PK_HAVE_JPAKE +#define PSA_WANT_ALG_SOME_PAKE #define MBEDTLS_SSL_MAX_CONTENT_LEN 768 /** @@ -79,6 +82,9 @@ #define MBEDTLS_CCM_C #define MBEDTLS_ECJPAKE_C #define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED +#define MBEDTLS_PK_HAVE_CURVE_SECP256R1 +#define MBEDTLS_PK_HAVE_JPAKE +#define PSA_WANT_ALG_SOME_PAKE #endif // SL_USE_COAP_CONFIG #define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 789b9723ccbd48..0741a06f9d3507 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -465,10 +465,11 @@ template("efr32_sdk") { _include_dirs += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Include", "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg1x", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg1x/config", "${efr32_sdk_root}/platform/service/device_init/config/s1/", "${efr32_sdk_root}/platform/emdrv/spidrv/inc", + "${efr32_sdk_root}/protocol/bluetooth/bgcommon/inc", + "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F", ] if (silabs_board == "BRD4304A") { @@ -483,7 +484,11 @@ template("efr32_sdk") { ] if (!chip_enable_ble_rs911x) { - libs += [ "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG12/GCC/libbluetooth.a" ] + libs += [ + "${sdk_support_root}/protocol/bluetooth/bgcommon/lib/libbgcommon_efr32xg12_gcc_release.a", + "${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg12_gcc_release.a", + "${sdk_support_root}/protocol/bluetooth/lib/libbluetooth_host_efr32xg12_gcc_release.a", + ] } defines += [ "EFR32MG12" ] @@ -505,7 +510,11 @@ template("efr32_sdk") { ] if (!chip_enable_ble_rs911x) { - libs += [ "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG24/GCC/libbluetooth.a" ] + libs += [ + "${sdk_support_root}/protocol/bluetooth/bgcommon/lib/libbgcommon_efr32xg24_gcc_release.a", + "${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a", + "${sdk_support_root}/protocol/bluetooth/lib/libbluetooth_host_efr32xg24_gcc_release.a", + ] } defines += [ @@ -526,7 +535,9 @@ template("efr32_sdk") { ] libs += [ - "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG24/GCC/libbluetooth.a", + "${sdk_support_root}/protocol/bluetooth/bgcommon/lib/libbgcommon_efr32xg24_gcc_release.a", + "${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a", + "${sdk_support_root}/protocol/bluetooth/lib/libbluetooth_host_efr32xg24_gcc_release.a", "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_module_efr32xg24_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", "${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a", @@ -650,7 +661,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_hal_s2.c", "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer.c", "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_rtcc.c", - "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_init.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_kernel.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay.c", @@ -672,6 +682,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/mbedtls/library/asn1write.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/base64.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/bignum.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/bignum_core.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ccm.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/cipher.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/cipher_wrap.c", @@ -697,7 +708,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_aead.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_cipher.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_client.c", - "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers_no_static.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_ecp.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_hash.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_mac.c", @@ -705,6 +716,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_se.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_slot_management.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_storage.c", + "${efr32_sdk_root}/util/third_party/mbedtls/library/psa_util.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/sha256.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_cache.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_ciphersuites.c", @@ -775,7 +787,6 @@ template("efr32_sdk") { } } else { sources += [ - "${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_mbedtls_context.c", "${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_rtos_adaptation.c", "${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_stack_init.c", "${efr32_sdk_root}/protocol/bluetooth/src/sli_bt_advertiser_config.c", @@ -886,6 +897,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s1.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s1.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s1.c", + "${efr32_sdk_root}/protocol/bluetooth/bgcommon/src/sl_bt_mbedtls_context.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F/port.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/ctr_drbg.c", "${efr32_sdk_root}/util/third_party/mbedtls/library/entropy.c", @@ -948,6 +960,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", + "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", ] diff --git a/third_party/silabs/gecko_sdk b/third_party/silabs/gecko_sdk index 1228a95262ee09..124fa19de8c8b3 160000 --- a/third_party/silabs/gecko_sdk +++ b/third_party/silabs/gecko_sdk @@ -1 +1 @@ -Subproject commit 1228a95262ee099a21c6be4d35224479c8e4dde2 +Subproject commit 124fa19de8c8b3961d21c20857f7df32239786da diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 93d60d5ae471ef..60b66906dbece4 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 93d60d5ae471efe650235daff8767a9ff6d1b268 +Subproject commit 60b66906dbece464753e7059c901714bececc630 diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index c052ef5037c013..725f05815c1a9f 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -81,6 +81,9 @@ if (silabs_board == "BRD4304A") { silabs_family = "efr32mg12" silabs_mcu = "EFR32MG12P432F1024GM48" enable_fem = true + + # Board does not support LEDs and Buttons at the same time + use_wstk_leds = false board_defines += [ "PAL_RTCC_CLOCK_LFRCO" ] } else if (silabs_board == "BRD4161A") { silabs_family = "efr32mg12"