Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs ]Update to GSDK 4.2.3 #27618

Merged
merged 5 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/platform/silabs/efr32/wf200/host_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,15 +602,15 @@ static void wfx_events_task(void * p_arg)
retryJoin = 0;
retryInterval = WLAN_MIN_RETRY_TIMER_MS;
wfx_lwip_set_sta_link_up();
#ifdef SLEEP_ENABLED
#if CHIP_DEVICE_CONFIG_ENABLE_SED
if (!(wfx_get_wifi_state() & SL_WFX_AP_INTERFACE_UP))
{
// Enable the power save
SILABS_LOG("WF200 going to DTIM based sleep");
sl_wfx_set_power_mode(WFM_PM_MODE_DTIM, WFM_PM_POLL_FAST_PS, BEACON_1);
sl_wfx_enable_device_power_save();
}
#endif // SLEEP_ENABLED
#endif /* CHIP_DEVICE_CONFIG_ENABLE_SED */
}

if (flags & SL_WFX_DISCONNECT)
Expand Down
40 changes: 40 additions & 0 deletions src/platform/silabs/efr32/psa_crypto_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,43 @@

#define MBEDTLS_PSA_KEY_SLOT_COUNT (15 + 1 + SL_PSA_KEY_USER_SLOT_COUNT)
#define SL_PSA_ITS_MAX_FILES (1 + SL_PSA_ITS_USER_MAX_FILES)

#if defined(TFM_CONFIG_SL_SECURE_LIBRARY)
// Asymmetric Crypt module (RSA is not supported)
#define TFM_CRYPTO_ASYM_ENCRYPT_MODULE_DISABLED

// HASH module
#if !defined(PSA_WANT_ALG_SHA_1) && !defined(PSA_WANT_ALG_SHA_224) && !defined(PSA_WANT_ALG_SHA_256) && \
!defined(PSA_WANT_ALG_SHA_384) && !defined(PSA_WANT_ALG_SHA_512) && !defined(PSA_WANT_ALG_MD5)
#define TFM_CRYPTO_HASH_MODULE_DISABLED
#endif

// AEAD module
#if !defined(PSA_WANT_ALG_CCM) && !defined(PSA_WANT_ALG_GCM) && !defined(PSA_WANT_ALG_CHACHA20_POLY1305)
#define TFM_CRYPTO_AEAD_MODULE_DISABLED
#endif

// Asymmetric Sign module
#if !defined(PSA_WANT_ALG_ECDSA) && !defined(PSA_WANT_ALG_EDDSA) && !defined(PSA_WANT_ALG_DETERMINISTIC_ECDSA)
#define TFM_CRYPTO_ASYM_SIGN_MODULE_DISABLED
#endif

// Cipher module
#if !defined(PSA_WANT_ALG_CFB) && !defined(PSA_WANT_ALG_CTR) && !defined(PSA_WANT_ALG_CBC_NO_PADDING) && \
!defined(PSA_WANT_ALG_CBC_PKCS7) && !defined(PSA_WANT_ALG_ECB_NO_PADDING) && !defined(PSA_WANT_ALG_XTS) && \
!defined(PSA_WANT_ALG_OFB) && !defined(PSA_WANT_ALG_STREAM_CIPHER)
#define TFM_CRYPTO_CIPHER_MODULE_DISABLED
#endif

// MAC module
#if !defined(PSA_WANT_ALG_HMAC) && !defined(PSA_WANT_ALG_CMAC) && !defined(PSA_WANT_ALG_CBC_MAC)
#define TFM_CRYPTO_MAC_MODULE_DISABLED
#endif

// Key derivation module
#if !defined(PSA_WANT_ALG_PBKDF2_HMAC) && !defined(PSA_WANT_ALG_HKDF) && !defined(PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128) && \
!defined(PSA_WANT_ALG_TLS12_PRF) && !defined(PSA_WANT_ALG_TLS12_PSK_TO_MS) && !defined(PSA_WANT_ALG_ECDH)
#define TFM_CRYPTO_KEY_DERIVATION_MODULE_DISABLED
#endif

#endif // TFM_CONFIG_SL_SECURE_LIBRARY
60 changes: 17 additions & 43 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/hardware/board/inc",
"${efr32_sdk_root}/hardware/driver/memlcd/inc",
"${efr32_sdk_root}/hardware/driver/memlcd/src/ls013b7dh03",
"${efr32_sdk_root}/hardware/driver/configuration_over_swo/inc/",
"${efr32_sdk_root}/platform/bootloader",
"${efr32_sdk_root}/platform/bootloader/config",
"${efr32_sdk_root}/platform/bootloader/config/s2/btl_interface",
Expand Down Expand Up @@ -179,11 +180,6 @@ template("efr32_sdk") {
"${silabs_gen_folder}/autogen",
]

if (slc_generate || slc_reuse_files || silabs_family == "mgm24") {
_include_dirs +=
[ "${efr32_sdk_root}/hardware/driver/configuration_over_swo/inc/" ]
}

if (silabs_family != "mgm24") {
_include_dirs += [
"${efr32_sdk_root}/platform/radio/rail_lib/hal",
Expand Down Expand Up @@ -227,6 +223,8 @@ template("efr32_sdk") {
"SL_COMPONENT_CATALOG_PRESENT=1",
"PLATFORM_HEADER=\"platform-header.h\"",
"USE_NVM3=1",
"SL_CATALOG_POWER_MANAGER_PRESENT",
"SL_CATALOG_SLEEPTIMER_PRESENT",

#"__STACK_SIZE=0",
]
Expand Down Expand Up @@ -308,22 +306,14 @@ template("efr32_sdk") {
if (use_system_view) {
_include_dirs += [
"${efr32_sdk_root}/util/third_party/segger/systemview/SEGGER",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10/Config/Cortex-M",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10",
"${efr32_sdk_root}/util/third_party/segger/systemview/Config/",
"${efr32_sdk_root}/util/third_party/segger/systemview/init/",
"${efr32_sdk_root}/util/third_party/segger/systemview/profiles/freertos_v10/",
]

defines += [ "SL_SYSTEM_VIEW=1" ]
}

if (silabs_board == "BRD2704A" || silabs_board == "BRD4318A") {
_include_dirs += [
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/",
"${efr32_sdk_root}/platform/driver/debug/inc/",
]
}

defines += board_defines

if (use_wstk_leds) {
Expand All @@ -339,8 +329,6 @@ template("efr32_sdk") {
if (enable_sleepy_device) {
defines += [
"CHIP_DEVICE_CONFIG_ENABLE_SED=1",
"SL_CATALOG_POWER_MANAGER_PRESENT",
"SL_CATALOG_SLEEPTIMER_PRESENT",
"SL_OT_IDLE_INTERVAL=${sl_ot_idle_interval_ms}",
"SL_OT_ACTIVE_INTERVAL=${sl_ot_active_interval_ms}",
"SL_ACTIVE_MODE_THRESHOLD=${sl_active_mode_threshold}",
Expand Down Expand Up @@ -453,10 +441,13 @@ template("efr32_sdk") {
} else if (silabs_family == "mgm24") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Include",
"${efr32_sdk_root}/platform/driver/debug/inc/",
"${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x",
"${efr32_sdk_root}/platform/radio/rail_lib/protocol/ble",
"${efr32_sdk_root}/platform/radio/rail_lib/protocol/ieee802154",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24/config",
"${efr32_sdk_root}/platform/service/device_init/config/s2/",
Expand Down Expand Up @@ -549,11 +540,13 @@ template("efr32_sdk") {
"${chip_root}/third_party/mbedtls/repo/include/mbedtls/platform.h",
"${efr32_sdk_root}/hardware/board/src/sl_board_control_gpio.c",
"${efr32_sdk_root}/hardware/board/src/sl_board_init.c",
"${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c",
"${efr32_sdk_root}/platform/CMSIS/RTOS2/Source/os_systick.c",
"${efr32_sdk_root}/platform/bootloader/api/btl_interface.c",
"${efr32_sdk_root}/platform/bootloader/api/btl_interface_storage.c",
"${efr32_sdk_root}/platform/bootloader/security/sha/crypto_sha.c",
"${efr32_sdk_root}/platform/common/src/sl_slist.c",
"${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c",
"${efr32_sdk_root}/platform/emdrv/dmadrv/src/dmadrv.c",
"${efr32_sdk_root}/platform/emdrv/gpiointerrupt/src/gpiointerrupt.c",
"${efr32_sdk_root}/platform/emdrv/nvm3/src/nvm3_default.c",
Expand Down Expand Up @@ -627,6 +620,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/util/third_party/freertos/kernel/croutine.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/event_groups.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/list.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/SiliconLabs/tick_power_manager.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/queue.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/stream_buffer.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/tasks.c",
Expand Down Expand Up @@ -723,13 +717,6 @@ template("efr32_sdk") {
]
}

if (slc_generate || slc_reuse_files || silabs_family == "mgm24") {
sources += [
"${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c",
"${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c",
]
}

if (silabs_family != "mgm24") {
sources +=
[ "${efr32_sdk_root}/platform/radio/rail_lib/hal/efr32/hal_efr.c" ]
Expand Down Expand Up @@ -763,8 +750,8 @@ template("efr32_sdk") {
if (use_system_view) {
sources += [
"${efr32_sdk_root}/util/third_party/segger/systemview/SEGGER/SEGGER_SYSVIEW.c",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.c",
"${efr32_sdk_root}/util/third_party/segger/systemview/init/SEGGER_SYSVIEW_Init.c",
"${efr32_sdk_root}/util/third_party/segger/systemview/profiles/freertos_v10/SEGGER_SYSVIEW_FreeRTOS.c",
]
}

Expand All @@ -786,10 +773,6 @@ template("efr32_sdk") {
]
}

if (enable_sleepy_device) {
sources += [ "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/SiliconLabs/tick_power_manager.c" ]
}

if (defined(enable_fem)) {
sources += [
"${efr32_sdk_root}/util/plugin/plugin-common/fem-control/fem-control.c",
Expand Down Expand Up @@ -924,6 +907,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c",
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c",
"${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_hfxo_s2.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c",
Expand All @@ -935,6 +919,8 @@ template("efr32_sdk") {
sources += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Source/startup_mgm24.c",
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Source/system_mgm24.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c",
"${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c",
"${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c",
"${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c",
Expand Down Expand Up @@ -962,6 +948,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c",
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c",
"${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_hfxo_mgm24.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c",
Expand All @@ -971,19 +958,6 @@ template("efr32_sdk") {
]
}

if (silabs_board == "BRD4186A" || silabs_board == "BRD4186C" ||
silabs_board == "BRD4187A" || silabs_board == "BRD4187C" ||
silabs_board == "BRD2704A") {
sources += [ "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c" ]
}

if (silabs_board == "BRD2704A" || silabs_board == "BRD4318A") {
sources += [
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c",
]
}

public_deps = [
":efr32_mbedtls_config",
"${segger_rtt_root}:segger_rtt",
Expand Down
2 changes: 1 addition & 1 deletion third_party/silabs/gecko_sdk
Submodule gecko_sdk updated 9039 files
2 changes: 1 addition & 1 deletion third_party/silabs/matter_support
Submodule matter_support updated 717 files