Skip to content

[Silabs] [WiFi] Added changes for the 917 Wi-Fi multi-ota feature #37611

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

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
e795ea4
Added changes for the multi ota 917 soc
shgutte Mar 26, 2024
4e01104
Added changes for the build errores
shgutte Mar 27, 2024
f1a1c48
Added changes for 917 soc
shgutte Apr 7, 2024
d1a9481
Added changes for the name for 917 NCP
shgutte Apr 8, 2024
3d80103
Deleted the 917 NCP file
shgutte Apr 10, 2024
895b60b
Added fixed for 917 SoC build changes
shgutte Apr 10, 2024
6bd95c1
Added changes for 917 SOC
shgutte Apr 11, 2024
d389920
Added changes for the 917 SOC build error
shgutte Apr 11, 2024
8c35d72
Added changes for the 917 SoC ota reset
shgutte Apr 11, 2024
778998b
Added changes for OTA 917 SoC script
shgutte Apr 11, 2024
d7b5393
Added changes for 917 build
shgutte Apr 11, 2024
f623d18
Added debugging logs for the files
shgutte Apr 14, 2024
b54a584
Removed the duplicate code
shgutte Apr 14, 2024
1ca4b6f
Added changes for the SoC Application
shgutte Apr 15, 2024
4a13cd6
Added changes for builkd issue with EFR32 multi OTA
shgutte Apr 16, 2024
036d156
Added changes for the OTA 917 NCP
shgutte Apr 16, 2024
f4fcc3a
Added changes for the OTA tlv
shgutte Apr 16, 2024
747f655
Added changes for the comment
shgutte Apr 17, 2024
9fd9768
Added changes for the process block for WIfi
shgutte Apr 17, 2024
74aa301
Removed the mWriteOffset in firmware processor
shgutte Apr 17, 2024
f33fa4c
Removed unessory comment
shgutte Apr 17, 2024
0b9fbd3
Added changes for the ProcessInternal OTA WiFi
shgutte Apr 17, 2024
e30f171
Added changes for WiFi OTA processor
shgutte Apr 19, 2024
0055e53
Removed the unwanted line
shgutte Apr 19, 2024
5b40aeb
Cleanup of the code
shgutte Apr 19, 2024
3e9e447
Corrected #ifdef comments
shgutte Apr 19, 2024
a4204ea
Removed unwanted comment
shgutte Apr 19, 2024
86960be
Added back the set_logger function
shgutte Apr 19, 2024
48a304c
Applied suggestion
selissia Apr 19, 2024
ed40c6f
Added changes realted to comment
shgutte Apr 22, 2024
31f2318
Discription for input command is updated
shgutte Apr 22, 2024
5e86a77
Added changes for build file of 917 SoC
shgutte Apr 24, 2024
4fd92e3
Added changes for encryption
shgutte Apr 24, 2024
5745617
Adds changes for the multi-ota updated
shgutte Feb 24, 2025
6a9978c
Adds changes for the customProcessor
shgutte Feb 24, 2025
5ece5b1
Refacred the code and removed the not required code
shgutte Feb 25, 2025
78e7e8a
Adds change for script
shgutte Feb 25, 2025
7da7811
Adds changes for the 917 NCP
shgutte Feb 28, 2025
54e7413
Restyle done
shgutte Mar 4, 2025
0fc0120
Adds OTA_ENCRYPTION_ENABLE commnet
shgutte Mar 4, 2025
5af72d1
Added SL_STATUS_SI91X_FW_UPDATE_DONE directly
shgutte Mar 4, 2025
2d54d19
Removed the OTAImageTypex
shgutte Mar 4, 2025
6f49043
Added comment for 917 NCP
shgutte Mar 4, 2025
5926361
Removed the comment
shgutte Mar 4, 2025
695c1ac
Changed the comment for SLI_SI91X_MCU_INTERFACE
shgutte Mar 4, 2025
4008b30
Restyled by clang-format
restyled-commits Apr 21, 2025
a1d432c
917 SoC reset has been moved to HandleApply instead of applyaction
bhmanda-silabs May 2, 2025
232c99e
Resolved review comments
bhmanda-silabs May 5, 2025
cf21bc5
Reverted multi-ota/build.gn changes
bhmanda-silabs May 6, 2025
4a991cf
Remove commented code
bhmanda-silabs May 6, 2025
223c484
Removed commented code
bhmanda-silabs May 6, 2025
6c50085
Cleanup the code
bhmanda-silabs May 6, 2025
9c6fb07
sl_si91x_soc_nvic_reset(); removed and added platform abstract reset API
bhmanda-silabs May 6, 2025
d19de61
Resolved CI build error
bhmanda-silabs May 7, 2025
483b2f0
Cleanedup code
bhmanda-silabs May 7, 2025
0288c98
Removed iWx917/OTAWiFiFirmwareProcessor.h in multiimageprocessor as i…
bhmanda-silabs May 7, 2025
7742d50
Update src/platform/silabs/multi-ota/OTATlvProcessor.h
bhmanda-silabs May 8, 2025
e6f9c41
Update src/platform/silabs/efr32/BUILD.gn
bhmanda-silabs May 8, 2025
4ea22e1
Update src/platform/silabs/multi-ota/SiWx917/OTAWiFiFirmwareProcessor…
bhmanda-silabs May 8, 2025
dd9de8d
Update src/platform/silabs/multi-ota/SiWx917/OTAWiFiFirmwareProcessor…
bhmanda-silabs May 8, 2025
5f5df98
Removed extra logs and resolved review comments
bhmanda-silabs May 8, 2025
2f3cb94
Addressed review comments
bhmanda-silabs May 14, 2025
a75347b
Addressed review comments
bhmanda-silabs May 14, 2025
6e3925b
Moved DataAccumulator Data and getthreashhold to protected block
bhmanda-silabs May 14, 2025
f59148e
Resolved review comments
bhmanda-silabs May 14, 2025
2a33a37
Added BUILD.gn for multi-ota directory
bhmanda-silabs May 15, 2025
853dd05
Resolved re-review comments
bhmanda-silabs May 20, 2025
56157bf
Resolve merge conflicts
bhmanda-silabs May 21, 2025
c6d08a7
Resolve merge conflicts
bhmanda-silabs May 21, 2025
482f12c
Restored examples BUILD.gn changes as it is not required
bhmanda-silabs May 21, 2025
633c8a1
Restored examples BUILD.gn changes as it is not required
bhmanda-silabs May 21, 2025
c8b2913
Restored windows app BUILD.gn changes
bhmanda-silabs May 21, 2025
2f07aae
Resolved merge conflicts due to ldscripts and matter-platform.slcp
bhmanda-silabs May 21, 2025
4266030
Resolved review comments
bhmanda-silabs May 21, 2025
9f4da8e
Resolved build errors
bhmanda-silabs May 21, 2025
5162afc
Added wifi_sdk firmware_upgrade path in efr32_sdk.gni
bhmanda-silabs May 21, 2025
0a0697a
Corrected naming schema in factorydata and fimware processors
bhmanda-silabs May 21, 2025
0bc0a0c
Resolved review comments
bhmanda-silabs May 22, 2025
785b8e9
Reverted the changes in OTADataAccumulator class
bhmanda-silabs May 22, 2025
07c5011
Reverted change in OTADataAccumulator class
bhmanda-silabs May 22, 2025
8a97e04
Bring changes from matter_sdk
bhmanda-silabs Jun 20, 2025
a0a0838
Bring changes from matter_sdk
bhmanda-silabs Jun 20, 2025
c97496f
Restyled by clang-format
restyled-commits Jun 23, 2025
791253a
Added custom TLV macros
bhmanda-silabs Jun 23, 2025
dfd9040
Added refactored build.gn and added encrption changes also from matte…
bhmanda-silabs Jun 26, 2025
cf41f98
Modifie add arg for wifi input file as tai for --wifi_ta_input_file
bhmanda-silabs Jun 26, 2025
d754ae6
Resolved merge conflicts
bhmanda-silabs Jun 27, 2025
81740f6
Resolved merge conflicts
bhmanda-silabs Jun 27, 2025
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
2 changes: 1 addition & 1 deletion examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

#ifdef SL_WIFI
#include <platform/silabs/NetworkCommissioningWiFiDriver.h>
#include <platform/silabs/wifi/WifiInterface.h>
#include <platform/silabs/wifi/WifiInterface.h> // nogncheck

#if CHIP_CONFIG_ENABLE_ICD_SERVER
#include <platform/silabs/wifi/icd/WifiSleepManager.h> // nogncheck
Expand Down
3 changes: 1 addition & 2 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#include <mbedtls/platform.h>

#ifdef SL_WIFI
#include <platform/silabs/NetworkCommissioningWiFiDriver.h>
#include <platform/silabs/wifi/WifiInterface.h>
#include <platform/silabs/wifi/WifiInterface.h> // nogncheck

#if CHIP_CONFIG_ENABLE_ICD_SERVER
#include <platform/silabs/wifi/icd/WifiSleepManager.h> // nogncheck
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/OTAConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void OTAConfig::Init()
// Periodic query timeout must be set prior to requestor being initialized
gRequestorUser.SetPeriodicQueryTimeout(OTA_PERIODIC_TIMEOUT);

#if CHIP_DEVICE_CONFIG_ENABLE_MULTI_OTA_REQUESTOR
#if SL_MATTER_ENABLE_MULTI_OTA_REQUESTOR
auto & imageProcessor = chip::OTAMultiImageProcessorImpl::GetDefaultInstance();
#else
auto & imageProcessor = chip::OTAImageProcessorImpl::GetDefaultInstance();
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/OTAConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>

#if CHIP_DEVICE_CONFIG_ENABLE_MULTI_OTA_REQUESTOR
#if SL_MATTER_ENABLE_MULTI_OTA_REQUESTOR
#include <platform/silabs/multi-ota/OTAMultiImageProcessorImpl.h>
#else
#include <platform/silabs/OTAImageProcessorImpl.h>
Expand Down
5 changes: 1 addition & 4 deletions examples/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/app/icd/icd.gni")
import("${chip_root}/src/lib/lib.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/src/platform/silabs/multi-ota/args.gni")
import("${silabs_sdk_build_root}/efr32_sdk.gni")
import("${silabs_sdk_build_root}/silabs_board.gni")

Expand Down Expand Up @@ -110,10 +111,6 @@ config("efr32-common-config") {
defines += [ "HEAP_MONITORING" ]
}

if (chip_enable_multi_ota_requestor) {
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_MULTI_OTA_REQUESTOR=1" ]
}

ldflags = [
"-Wl,--no-warn-rwx-segment",
"-fno-lto",
Expand Down
37 changes: 36 additions & 1 deletion examples/platform/silabs/provision/ProvisionStorageDefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,44 @@ CHIP_ERROR Storage::GetProvisionRequest(bool & value)
#ifdef SL_MATTER_ENABLE_OTA_ENCRYPTION
CHIP_ERROR Storage::SetOtaTlvEncryptionKey(const ByteSpan & value)
{
chip::DeviceLayer::Silabs::OtaTlvEncryptionKey::OtaTlvEncryptionKey key;
#if defined(SL_MBEDTLS_USE_TINYCRYPT)
// Tinycrypt doesn't support the key ID, so we need to store the key as a binary blob
return SilabsConfig::WriteConfigValueBin(SilabsConfig::kOtaTlvEncryption_KeyId, value.data(), value.size());
#else // MBEDTLS_USE_PSA_CRYPTO
Silabs::OtaTlvEncryptionKey key;
ReturnErrorOnFailure(key.Import(value.data(), value.size()));
return SilabsConfig::WriteConfigValue(SilabsConfig::kOtaTlvEncryption_KeyId, key.GetId());
#endif // SL_MBEDTLS_USE_TINYCRYPT
}

CHIP_ERROR Storage::GetOtaTlvEncryptionKeyId(uint32_t & keyId)
{
#if defined(SL_MBEDTLS_USE_TINYCRYPT)
// Tinycrypt doesn't support the key ID
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
#else // MBEDTLS_USE_PSA_CRYPTO
// Read the key ID from the config
return SilabsConfig::ReadConfigValue(SilabsConfig::kOtaTlvEncryption_KeyId, keyId);
#endif // SL_MBEDTLS_USE_TINYCRYPT
}

CHIP_ERROR Storage::DecryptUsingOtaTlvEncryptionKey(MutableByteSpan & block, uint32_t & ivOffset)
{
#if defined(SL_MBEDTLS_USE_TINYCRYPT)
uint8_t keyBuffer[kOTAEncryptionKeyLength] = { 0 };
size_t keyLen = 0;

// Read the key from the provisioning storage
MutableByteSpan keySpan = MutableByteSpan(keyBuffer);

SilabsConfig::ReadConfigValueBin(SilabsConfig::kOtaTlvEncryption_KeyId, keySpan.data(), keySpan.size());
VerifyOrReturnError(keySpan.size() == kOTAEncryptionKeyLength, CHIP_ERROR_INVALID_ARGUMENT);

Silabs::OtaTlvEncryptionKey::Decrypt((const ByteSpan) keySpan, block, ivOffset);
return CHIP_NO_ERROR;
#else // MBEDTLS_USE_PSA_CRYPTO
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
#endif // SL_MBEDTLS_USE_TINYCRYPT
}
#endif // SL_MATTER_ENABLE_OTA_ENCRYPTION

Expand Down
40 changes: 39 additions & 1 deletion examples/platform/silabs/provision/ProvisionStorageFlash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,45 @@ CHIP_ERROR Storage::GetProvisionRequest(bool & value)
#ifdef SL_MATTER_ENABLE_OTA_ENCRYPTION
CHIP_ERROR Storage::SetOtaTlvEncryptionKey(const ByteSpan & value)
{
return CHIP_ERROR_NOT_IMPLEMENTED;
#if defined(SL_MBEDTLS_USE_TINYCRYPT)
// Tinycrypt doesn't support the key ID, so we need to store the key as a binary blob
return Flash::Set(Parameters::ID::kOtaTlvEncryptionKey, value.data(), value.size());
#else // MBEDTLS_USE_PSA_CRYPTO
Silabs::OtaTlvEncryptionKey key;
ReturnErrorOnFailure(key.Import(value.data(), value.size()));
return Flash::Set(Parameters::ID::kOtaTlvEncryptionKey, key.GetId());
#endif // SL_MBEDTLS_USE_TINYCRYPT
}

CHIP_ERROR Storage::GetOtaTlvEncryptionKeyId(uint32_t & keyId)
{
#if defined(SL_MBEDTLS_USE_TINYCRYPT)
// Tinycrypt doesn't support the key ID
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
#else // MBEDTLS_USE_PSA_CRYPTO
return Flash::Get(Parameters::ID::kOtaTlvEncryptionKey, keyId);
#endif // SL_MBEDTLS_USE_TINYCRYPT
}

CHIP_ERROR Storage::DecryptUsingOtaTlvEncryptionKey(MutableByteSpan & block, uint32_t & ivOffset)
{
#if defined(SL_MBEDTLS_USE_TINYCRYPT)
uint8_t keyBuffer[Silabs::OtaTlvEncryptionKey::kOTAEncryptionKeyLength] = { 0 };
size_t keyLen = 0;

// Read the key from the provisioning storage
MutableByteSpan keySpan = MutableByteSpan(keyBuffer);

ReturnErrorOnFailure(Flash::Get(Parameters::ID::kOtaTlvEncryptionKey, keySpan.data(), keySpan.size(), keyLen));
keySpan.reduce_size(keyLen);

VerifyOrReturnError(keySpan.size() == Silabs::OtaTlvEncryptionKey::kOTAEncryptionKeyLength, CHIP_ERROR_INVALID_ARGUMENT);

Silabs::OtaTlvEncryptionKey::Decrypt((const ByteSpan) keySpan, block, ivOffset);
return CHIP_NO_ERROR;
#else // MBEDTLS_USE_PSA_CRYPTO
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
#endif // SL_MBEDTLS_USE_TINYCRYPT
}
#endif // SL_MATTER_ENABLE_OTA_ENCRYPTION

Expand Down
40 changes: 40 additions & 0 deletions scripts/tools/silabs/ota/ota_multi_image_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
from default import InputArgument # noqa: E402 isort:skip

OTA_APP_TLV_TEMP = os.path.join(os.path.dirname(__file__), "ota_temp_app_tlv.bin")
OTA_WIFI_TA_TLV_TEMP = os.path.join(os.path.dirname(__file__), "ota_temp_wifi_ta_tlv.bin")
OTA_BOOTLOADER_TLV_TEMP = os.path.join(os.path.dirname(__file__), "ota_temp_ssbl_tlv.bin")
OTA_FACTORY_TLV_TEMP = os.path.join(os.path.dirname(__file__), "ota_temp_factory_tlv.bin")

Expand All @@ -62,6 +63,7 @@ class TAG:
APPLICATION = 1
BOOTLOADER = 2
FACTORY_DATA = 3
WIFI_TA = 4


def set_logger():
Expand Down Expand Up @@ -163,6 +165,32 @@ def generate_app(args: object):
return [OTA_APP_TLV_TEMP, args.app_input_file]


def generate_wifi_ta_image(args: object):
"""
Generate WiFi TA image payload with descriptor. If a certain option is not specified, use the default values.
"""
logging.info("WiFi TA descriptor information:")

descriptor = generate_descriptor(args.wifi_ta_version, args.wifi_ta_version_str, args.wifi_ta_build_date)
logging.info(f"WiFi TA encryption enable: {args.enc_enable}")
if args.enc_enable:
inputFile = open(args.wifi_ta_input_file, "rb")
enc_file = crypto_utils.encryptData(inputFile.read(), args.input_ota_key, INITIALIZATION_VECTOR)
enc_file1 = bytes([ord(x) for x in enc_file])
file_size = len(enc_file1)
payload = generate_header(TAG.WIFI_TA, len(descriptor) + file_size) + descriptor + enc_file1
else:
file_size = os.path.getsize(args.wifi_ta_input_file)
logging.info(f"file size: {file_size}")
payload = generate_header(TAG.WIFI_TA, len(descriptor) + file_size) + descriptor

write_to_temp(OTA_WIFI_TA_TLV_TEMP, payload)
if args.enc_enable:
return [OTA_WIFI_TA_TLV_TEMP]
else:
return [OTA_WIFI_TA_TLV_TEMP, args.wifi_ta_input_file]


def generate_bootloader(args: object):
"""
Generate SSBL payload with descriptor. If a certain option is not specified, use the default values.
Expand Down Expand Up @@ -259,6 +287,9 @@ def create_image(args: object):
if args.app_input_file:
input_files += generate_app(args)

if args.wifi_ta_input_file:
input_files += generate_wifi_ta_image(args)

if len(input_files) == 0:
print("Please specify an input option.")
sys.exit(1)
Expand Down Expand Up @@ -319,6 +350,15 @@ def any_base_int(s): return int(s, 0)
create_parser.add_argument('--app-build-date', type=str,
help='Application build date (string)')

create_parser.add_argument('-tai', "--wifi_ta_input_file",
help='Path to OTA image for 917 wifi TA')
create_parser.add_argument('--wifi-ta-version', type=any_base_int,
help='WiFi TA Software version (numeric)')
create_parser.add_argument('--wifi-ta-version-str', type=str,
help='WiFi TA Software version (string)')
create_parser.add_argument('--wifi-ta-build-date', type=str,
help='WiFi TA build date (string)')

create_parser.add_argument('-bl', '--bl-input-file',
help='Path to input bootloader image payload file')
create_parser.add_argument('--bl-version', type=any_base_int,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/CHIPDevicePlatformEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <platform/CHIPDeviceEvent.h>
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION
#include <platform/silabs/wifi/WifiInterface.h>
#include <platform/silabs/wifi/WifiInterface.h> //nogncheck
#endif

namespace chip {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <platform/silabs/platformAbstraction/SilabsPlatform.h>

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION
#include <platform/silabs/wifi/WifiInterface.h>
#include <platform/silabs/wifi/WifiInterface.h> //nogncheck
#endif

namespace chip {
Expand Down
4 changes: 2 additions & 2 deletions src/platform/silabs/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include <platform/silabs/DiagnosticDataProviderImpl.h>

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION
#include <platform/silabs/wifi/WifiInterface.h>
#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION
#include <platform/silabs/wifi/WifiInterface.h> //nogncheck
#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION

#if defined(SL_MBEDTLS_USE_TINYCRYPT)
#include "tinycrypt/ecc.h"
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/PlatformManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <platform/internal/GenericPlatformManagerImpl_CMSISOS.h>
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION
#include <platform/silabs/wifi/WifiInterface.h>
#include <platform/silabs/wifi/WifiInterface.h> //nogncheck
#endif
#include <cmsis_os2.h>

Expand Down
26 changes: 12 additions & 14 deletions src/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
# limitations under the License.

import("//build_overrides/chip.gni")

import("${chip_root}/src/platform/device.gni")

import("${chip_root}/build/chip/buildconfig_header.gni")
import("${chip_root}/src/crypto/crypto.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/src/platform/silabs/multi-ota/args.gni")
import("${chip_root}/src/platform/silabs/wifi/args.gni")
import("${chip_root}/third_party/silabs/SiWx917_sdk.gni")
import("${chip_root}/third_party/silabs/silabs_board.gni")
import("${matter_support_root}/provision/args.gni")

silabs_platform_dir = "${chip_root}/src/platform/silabs"

assert(chip_device_platform == "SiWx917")
Expand Down Expand Up @@ -65,9 +63,6 @@ static_library("SiWx917") {
"${silabs_platform_dir}/SilabsConfig.cpp",
"${silabs_platform_dir}/SilabsConfig.h",
"${silabs_platform_dir}/SystemPlatformConfig.h",
"${silabs_platform_dir}/platformAbstraction/SilabsPlatform.h",
"${silabs_platform_dir}/platformAbstraction/SilabsPlatformBase.h",
"${silabs_platform_dir}/platformAbstraction/WiseMcuSpam.cpp",
"../../FreeRTOS/SystemTimeSupport.cpp",
"../../SingletonConfigurationManager.cpp",
"../rs911x/BLEManagerImpl.cpp",
Expand All @@ -77,23 +72,26 @@ static_library("SiWx917") {
"SiWxPlatformInterface.h",
]

if (chip_enable_ota_requestor) {
sources += [
"${silabs_platform_dir}/OTAImageProcessorImpl.h",
"OTAImageProcessorImpl.cpp",
]
}

public_deps = [
"${chip_root}/src/app/icd/server:icd-server-config",
"${chip_root}/src/platform:platform_base",
"${silabs_platform_dir}/platformAbstraction:wisemcu",
]
deps = [
"${chip_root}/src/app/common:ids",
"${chip_root}/src/platform/logging:headers",
"${sl_provision_root}:headers",
]

if (chip_enable_multi_ota_requestor) {
public_deps += [ "${silabs_platform_dir}/multi-ota:multi-ota-siwx" ]
} else if (chip_enable_ota_requestor) {
sources += [
"${silabs_platform_dir}/OTAImageProcessorImpl.h",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"${silabs_platform_dir}/OTAImageProcessorImpl.h",
"OTAImageProcessorImpl.h",

"OTAImageProcessorImpl.cpp",
]
}

# Add platform crypto implementation
if (chip_crypto == "platform") {
if (sl_si91x_crypto_flavor == "tinycrypt") {
Expand Down
Loading
Loading