Skip to content

Commit

Permalink
Pull request project-chip#898: Update submodules for gecko_sdk 4.2.3 …
Browse files Browse the repository at this point in the history
…and matter_support for generated board configs, update efr32_sdk.gni to match gen files.

Merge in WMN_TOOLS/matter from Gsdk4.2.3_update_2.1.0-1.1 to RC_2.1.0-1.1

Squashed commit of the following:

commit bbbb38f3913607e3b171cff35c933f515cf096e1
Author: Junior Martinez <[email protected]>
Date:   Mon Jun 19 22:34:42 2023 -0400

    fem util cleanup

commit f9b8ebb61cd3f6a56e44b3e0b31ecd34b51aa25f
Author: Junior Martinez <[email protected]>
Date:   Mon Jun 19 20:53:34 2023 -0400

    matter_support points to new main commit

commit 2e292e959b4c23eaf9635680599b5d8eb4215456
Author: Junior Martinez <[email protected]>
Date:   Mon Jun 19 20:20:49 2023 -0400

    fix brd4319A

... and 7 more commits
  • Loading branch information
jmartinez-silabs committed Jul 5, 2023
1 parent fcf37c2 commit 779db26
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 32 deletions.
59 changes: 59 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,62 @@

#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
42 changes: 10 additions & 32 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 @@ -316,14 +312,6 @@ template("efr32_sdk") {
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 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 @@ -723,13 +716,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 @@ -924,6 +910,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 +922,7 @@ 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/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,25 +950,15 @@ 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",
"${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.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",
]
}

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",
#"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c",
]
}

Expand Down

0 comments on commit 779db26

Please sign in to comment.