Skip to content

Commit 8b78a08

Browse files
Fix efr32 build using provision flash storage
1 parent 980119e commit 8b78a08

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

examples/platform/silabs/provision/BUILD.gn

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020 Project CHIP Authors
1+
# Copyright (c) 2024 Project CHIP Authors
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -22,10 +22,6 @@ if (wifi_soc) {
2222
import("${efr32_sdk_build_root}/efr32_sdk.gni")
2323
}
2424

25-
declare_args() {
26-
use_flash_storage = wifi_soc
27-
}
28-
2925
source_set("provision-storage") {
3026
sources = [ "ProvisionStorageCustom.cpp" ]
3127

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

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@
8787
#define PSA_WANT_ALG_SOME_PAKE
8888
#endif // SL_USE_COAP_CONFIG
8989

90+
#if SL_PROVISION_FLASH
91+
#define MBEDTLS_SHA256_C
92+
#define MBEDTLS_HMAC_DRBG_C
93+
#define MBEDTLS_ECDSA_DETERMINISTIC
94+
#endif
95+
9096
#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf
9197

9298
#define MBEDTLS_AES_ROM_TABLES

third_party/silabs/SiWx917_sdk.gni

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ declare_args() {
3838

3939
# enable 917 SoC M4 sleep wakeup
4040
si917_m4_sleep_enabled = false
41+
42+
# Factory Provision storage
43+
use_flash_storage = true
4144
}
4245

4346
# Defines an siwx917 SDK build target.

third_party/silabs/efr32_sdk.gni

+9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ declare_args() {
8282
chip_enable_multi_ota_requestor = false
8383
chip_enable_multi_ota_encryption = false
8484
chip_enable_ota_custom_tlv_testing = false
85+
86+
# Factory Provision storage
87+
use_flash_storage = false
8588
}
8689

8790
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
@@ -469,6 +472,12 @@ template("efr32_sdk") {
469472
defines += [ "SL_USE_COAP_CONFIG=0" ]
470473
}
471474

475+
if (use_flash_storage) {
476+
defines += [ "SL_PROVISION_FLASH=1" ]
477+
} else {
478+
defines += [ "SL_PROVISION_FLASH=0" ]
479+
}
480+
472481
if (chip_enable_ble_rs911x) {
473482
defines += [
474483
"RSI_BLE_ENABLE=1",

0 commit comments

Comments
 (0)