Skip to content

Commit 19e2b36

Browse files
[Silabs] Add support for new gsdk 4.4.0 (project-chip#31264)
* BLE changes in upcomming new gsdk version 23q4 * Update gsdk submodule and .gitmodules. add new libs and needed files in efr32_sdk.gni. add a define for mbedtls in cryptopal * MG12 BRD4304A leds and button pin conflicts. only use buttons remove leds * Updated linker scripts for mg12 and mgm24. add/remove needed files for MG12 * Update the docker image version used for ci * update matter_support submodule * add missing mbedtls define for thread COAPI support/ JPAKE
1 parent 3a8b789 commit 19e2b36

File tree

13 files changed

+120
-17
lines changed

13 files changed

+120
-17
lines changed

.github/workflows/examples-efr32.yaml

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

4040
container:
41-
image: ghcr.io/project-chip/chip-build-efr32:26
41+
image: ghcr.io/project-chip/chip-build-efr32:31
4242
volumes:
4343
- "/tmp/bloat_reports:/tmp/bloat_reports"
4444
steps:

.github/workflows/release_artifacts.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
runs-on: ubuntu-latest
6969

7070
container:
71-
image: ghcr.io/project-chip/chip-build-efr32:26
71+
image: ghcr.io/project-chip/chip-build-efr32:31
7272
steps:
7373
- name: Checkout
7474
uses: actions/checkout@v4

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
[submodule "third_party/silabs/gecko_sdk"]
240240
path = third_party/silabs/gecko_sdk
241241
url = https://github.com/SiliconLabs/gecko_sdk.git
242-
branch = v4.3.2
242+
branch = v4.4.0
243243
platforms = silabs
244244
[submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"]
245245
path = third_party/silabs/wiseconnect-wifi-bt-sdk

examples/platform/silabs/ldscripts/efr32mg12.ld

+26-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ SECTIONS
108108
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
109109
*(SORT(.dtors.*))
110110
*(.dtors)
111-
111+
112+
__code_classification_validator_start__ = .;
113+
. = . + 0x20;
114+
*(code_classification_validator)
115+
. = ALIGN(32);
116+
__code_classification_validator_end__ = .;
112117
*(.rodata*)
113118

114119
KEEP(*(.eh_frame*))
@@ -194,6 +199,26 @@ SECTIONS
194199
. = ALIGN(4);
195200
__bss_end__ = .;
196201
} > RAM
202+
__ramfuncs_start__ = .;
203+
204+
__vma_ramfuncs_start__ = .;
205+
__lma_ramfuncs_start__ = __etext + SIZEOF(.data);
206+
207+
__text_application_ram_offset__ = . - __vma_ramfuncs_start__;
208+
text_application_ram . : AT(__lma_ramfuncs_start__ + __text_application_ram_offset__)
209+
{
210+
. = ALIGN(4);
211+
__text_application_ram_start__ = .;
212+
*(text_application_ram)
213+
. = ALIGN(4);
214+
__text_application_ram_end__ = .;
215+
} > RAM
216+
217+
. = ALIGN(4);
218+
__vma_ramfuncs_end__ = .;
219+
__lma_ramfuncs_end__ = __lma_ramfuncs_start__ + __text_application_ram_offset__ + SIZEOF(text_application_ram);
220+
221+
__ramfuncs_end__ = .;
197222

198223
.heap (COPY) :
199224
{

examples/platform/silabs/ldscripts/efr32mg24.ld

+28-2
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,14 @@ SECTIONS
111111
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
112112
*(SORT(.dtors.*))
113113
*(.dtors)
114-
114+
115+
__code_classification_validator_start__ = .;
116+
. = . + 0x20;
117+
*(code_classification_validator)
118+
. = ALIGN(32);
119+
__code_classification_validator_end__ = .;
115120
*(.rodata*)
116-
121+
117122
KEEP(*(.eh_frame*))
118123
} > FLASH
119124
.ARM.extab :
@@ -196,6 +201,27 @@ SECTIONS
196201
__bss_end__ = .;
197202
} > RAM AT > RAM
198203

204+
__ramfuncs_start__ = .;
205+
206+
__vma_ramfuncs_start__ = .;
207+
__lma_ramfuncs_start__ = __etext + SIZEOF(.data);
208+
209+
__text_application_ram_offset__ = . - __vma_ramfuncs_start__;
210+
text_application_ram . : AT(__lma_ramfuncs_start__ + __text_application_ram_offset__)
211+
{
212+
. = ALIGN(4);
213+
__text_application_ram_start__ = .;
214+
*(text_application_ram)
215+
. = ALIGN(4);
216+
__text_application_ram_end__ = .;
217+
} > RAM
218+
219+
. = ALIGN(4);
220+
__vma_ramfuncs_end__ = .;
221+
__lma_ramfuncs_end__ = __lma_ramfuncs_start__ + __text_application_ram_offset__ + SIZEOF(text_application_ram);
222+
223+
__ramfuncs_end__ = .;
224+
199225
.heap (COPY):
200226
{
201227
__HeapBase = .;

examples/platform/silabs/ldscripts/mgm24.ld

+27-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ SECTIONS
111111
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
112112
*(SORT(.dtors.*))
113113
*(.dtors)
114-
114+
115+
__code_classification_validator_start__ = .;
116+
. = . + 0x20;
117+
*(code_classification_validator)
118+
. = ALIGN(32);
119+
__code_classification_validator_end__ = .;
115120
*(.rodata*)
116121

117122
KEEP(*(.eh_frame*))
@@ -196,6 +201,27 @@ SECTIONS
196201
__bss_end__ = .;
197202
} > RAM AT > RAM
198203

204+
__ramfuncs_start__ = .;
205+
206+
__vma_ramfuncs_start__ = .;
207+
__lma_ramfuncs_start__ = __etext + SIZEOF(.data);
208+
209+
__text_application_ram_offset__ = . - __vma_ramfuncs_start__;
210+
text_application_ram . : AT(__lma_ramfuncs_start__ + __text_application_ram_offset__)
211+
{
212+
. = ALIGN(4);
213+
__text_application_ram_start__ = .;
214+
*(text_application_ram)
215+
. = ALIGN(4);
216+
__text_application_ram_end__ = .;
217+
} > RAM
218+
219+
. = ALIGN(4);
220+
__vma_ramfuncs_end__ = .;
221+
__lma_ramfuncs_end__ = __lma_ramfuncs_start__ + __text_application_ram_offset__ + SIZEOF(text_application_ram);
222+
223+
__ramfuncs_end__ = .;
224+
199225
.heap (COPY):
200226
{
201227
__HeapBase = .;

src/platform/silabs/efr32/BLEManagerImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ extern "C" void sl_bt_on_event(sl_bt_msg_t * evt)
10531053
evt->data.evt_gatt_server_characteristic_status.connection);
10541054
}
10551055
else if ((evt->data.evt_gatt_server_characteristic_status.characteristic == gattdb_CHIPoBLEChar_Tx) &&
1056-
(evt->data.evt_gatt_server_characteristic_status.status_flags == gatt_server_client_config))
1056+
(evt->data.evt_gatt_server_characteristic_status.status_flags == sl_bt_gatt_server_client_config))
10571057
{
10581058
chip::DeviceLayer::Internal::BLEMgrImpl().HandleTXCharCCCDWrite(evt);
10591059
}

src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* PSA Crypto API based implementation of CHIP crypto primitives
2121
* with Silicon Labs SDK modifications
2222
*/
23+
// The psa_driver_wrappers.h file that we're including here assumes that it has
24+
// access to private struct members. Define this here in order to avoid
25+
// compilation errors.
26+
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
2327

2428
#include <crypto/CHIPCryptoPAL.h>
2529

src/platform/silabs/efr32/efr32-chip-mbedtls-config.h

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
#define MBEDTLS_CCM_C
5555
#define MBEDTLS_ECJPAKE_C
5656
#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
57+
#define MBEDTLS_PK_HAVE_CURVE_SECP256R1
58+
#define MBEDTLS_PK_HAVE_JPAKE
59+
#define PSA_WANT_ALG_SOME_PAKE
5760
#define MBEDTLS_SSL_MAX_CONTENT_LEN 768
5861

5962
/**
@@ -79,6 +82,9 @@
7982
#define MBEDTLS_CCM_C
8083
#define MBEDTLS_ECJPAKE_C
8184
#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
85+
#define MBEDTLS_PK_HAVE_CURVE_SECP256R1
86+
#define MBEDTLS_PK_HAVE_JPAKE
87+
#define PSA_WANT_ALG_SOME_PAKE
8288
#endif // SL_USE_COAP_CONFIG
8389

8490
#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf

third_party/silabs/efr32_sdk.gni

+20-7
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,11 @@ template("efr32_sdk") {
465465
_include_dirs += [
466466
"${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Include",
467467
"${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg1x",
468-
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F",
469468
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg1x/config",
470469
"${efr32_sdk_root}/platform/service/device_init/config/s1/",
471470
"${efr32_sdk_root}/platform/emdrv/spidrv/inc",
471+
"${efr32_sdk_root}/protocol/bluetooth/bgcommon/inc",
472+
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F",
472473
]
473474

474475
if (silabs_board == "BRD4304A") {
@@ -483,7 +484,11 @@ template("efr32_sdk") {
483484
]
484485

485486
if (!chip_enable_ble_rs911x) {
486-
libs += [ "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG12/GCC/libbluetooth.a" ]
487+
libs += [
488+
"${sdk_support_root}/protocol/bluetooth/bgcommon/lib/libbgcommon_efr32xg12_gcc_release.a",
489+
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg12_gcc_release.a",
490+
"${sdk_support_root}/protocol/bluetooth/lib/libbluetooth_host_efr32xg12_gcc_release.a",
491+
]
487492
}
488493

489494
defines += [ "EFR32MG12" ]
@@ -505,7 +510,11 @@ template("efr32_sdk") {
505510
]
506511

507512
if (!chip_enable_ble_rs911x) {
508-
libs += [ "${sdk_support_root}/protocol/bluetooth/lib/EFR32XG24/GCC/libbluetooth.a" ]
513+
libs += [
514+
"${sdk_support_root}/protocol/bluetooth/bgcommon/lib/libbgcommon_efr32xg24_gcc_release.a",
515+
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a",
516+
"${sdk_support_root}/protocol/bluetooth/lib/libbluetooth_host_efr32xg24_gcc_release.a",
517+
]
509518
}
510519

511520
defines += [
@@ -526,7 +535,9 @@ template("efr32_sdk") {
526535
]
527536

528537
libs += [
529-
"${sdk_support_root}/protocol/bluetooth/lib/EFR32XG24/GCC/libbluetooth.a",
538+
"${sdk_support_root}/protocol/bluetooth/bgcommon/lib/libbgcommon_efr32xg24_gcc_release.a",
539+
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a",
540+
"${sdk_support_root}/protocol/bluetooth/lib/libbluetooth_host_efr32xg24_gcc_release.a",
530541
"${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_module_efr32xg24_gcc_release.a",
531542
"${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a",
532543
"${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a",
@@ -650,7 +661,6 @@ template("efr32_sdk") {
650661
"${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_hal_s2.c",
651662
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer.c",
652663
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_rtcc.c",
653-
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c",
654664
"${efr32_sdk_root}/platform/service/system/src/sl_system_init.c",
655665
"${efr32_sdk_root}/platform/service/system/src/sl_system_kernel.c",
656666
"${efr32_sdk_root}/platform/service/udelay/src/sl_udelay.c",
@@ -672,6 +682,7 @@ template("efr32_sdk") {
672682
"${efr32_sdk_root}/util/third_party/mbedtls/library/asn1write.c",
673683
"${efr32_sdk_root}/util/third_party/mbedtls/library/base64.c",
674684
"${efr32_sdk_root}/util/third_party/mbedtls/library/bignum.c",
685+
"${efr32_sdk_root}/util/third_party/mbedtls/library/bignum_core.c",
675686
"${efr32_sdk_root}/util/third_party/mbedtls/library/ccm.c",
676687
"${efr32_sdk_root}/util/third_party/mbedtls/library/cipher.c",
677688
"${efr32_sdk_root}/util/third_party/mbedtls/library/cipher_wrap.c",
@@ -697,14 +708,15 @@ template("efr32_sdk") {
697708
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_aead.c",
698709
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_cipher.c",
699710
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_client.c",
700-
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers.c",
711+
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers_no_static.c",
701712
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_ecp.c",
702713
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_hash.c",
703714
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_mac.c",
704715
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_rsa.c",
705716
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_se.c",
706717
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_slot_management.c",
707718
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_storage.c",
719+
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_util.c",
708720
"${efr32_sdk_root}/util/third_party/mbedtls/library/sha256.c",
709721
"${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_cache.c",
710722
"${efr32_sdk_root}/util/third_party/mbedtls/library/ssl_ciphersuites.c",
@@ -775,7 +787,6 @@ template("efr32_sdk") {
775787
}
776788
} else {
777789
sources += [
778-
"${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_mbedtls_context.c",
779790
"${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_rtos_adaptation.c",
780791
"${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_stack_init.c",
781792
"${efr32_sdk_root}/protocol/bluetooth/src/sli_bt_advertiser_config.c",
@@ -886,6 +897,7 @@ template("efr32_sdk") {
886897
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s1.c",
887898
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s1.c",
888899
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s1.c",
900+
"${efr32_sdk_root}/protocol/bluetooth/bgcommon/src/sl_bt_mbedtls_context.c",
889901
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F/port.c",
890902
"${efr32_sdk_root}/util/third_party/mbedtls/library/ctr_drbg.c",
891903
"${efr32_sdk_root}/util/third_party/mbedtls/library/entropy.c",
@@ -948,6 +960,7 @@ template("efr32_sdk") {
948960
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c",
949961
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c",
950962
"${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c",
963+
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c",
951964
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c",
952965
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c",
953966
]

third_party/silabs/gecko_sdk

Submodule gecko_sdk updated 15097 files

third_party/silabs/matter_support

Submodule matter_support updated 317 files

third_party/silabs/silabs_board.gni

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ if (silabs_board == "BRD4304A") {
8181
silabs_family = "efr32mg12"
8282
silabs_mcu = "EFR32MG12P432F1024GM48"
8383
enable_fem = true
84+
85+
# Board does not support LEDs and Buttons at the same time
86+
use_wstk_leds = false
8487
board_defines += [ "PAL_RTCC_CLOCK_LFRCO" ]
8588
} else if (silabs_board == "BRD4161A") {
8689
silabs_family = "efr32mg12"

0 commit comments

Comments
 (0)