[Silabs] Removing the warning flags for 917SoC (#40003)
* removing the warning flags for 917SoC
* removing the cflags and updating the matter_support
* removing the unused code
* including the required include path
diff --git a/examples/platform/silabs/uart.cpp b/examples/platform/silabs/uart.cpp
index bea51f4..ed2c23a 100644
--- a/examples/platform/silabs/uart.cpp
+++ b/examples/platform/silabs/uart.cpp
@@ -497,8 +497,6 @@
*/
int16_t uartConsoleRead(char * Buf, uint16_t NbBytesToRead)
{
- uint8_t * data;
-
#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT
EUSART_INT_ENABLE(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, EUSART_IF_RXFL);
#endif
@@ -508,6 +506,7 @@
return UART_CONSOLE_ERR;
}
#if SLI_SI91X_MCU_INTERFACE == 0
+ uint8_t * data;
if (NbBytesToRead > AvailableDataCount(&sReceiveFifo))
{
UARTDRV_Count_t count, remaining;
diff --git a/src/platform/silabs/ConfigurationManagerImpl.cpp b/src/platform/silabs/ConfigurationManagerImpl.cpp
index 639beb3..0381a7d 100644
--- a/src/platform/silabs/ConfigurationManagerImpl.cpp
+++ b/src/platform/silabs/ConfigurationManagerImpl.cpp
@@ -93,7 +93,7 @@
{
// rebootCause is obtained at bootup.
BootReasonType matterBootCause;
- uint32_t rebootCause = Silabs::GetPlatform().GetRebootCause();
+ [[maybe_unused]] uint32_t rebootCause = Silabs::GetPlatform().GetRebootCause();
#if defined(_RMU_RSTCAUSE_MASK)
if (rebootCause & RMU_RSTCAUSE_PORST || rebootCause & RMU_RSTCAUSE_EXTRST) // PowerOn or External pin reset
diff --git a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp
index ddc3cff..d0fa1b7 100644
--- a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp
+++ b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp
@@ -106,8 +106,6 @@
uint8_t public_key[2 * NUM_ECC_BYTES];
} mbedtls_uecc_keypair;
-static EntropyContext gsEntropyContext;
-
void _log_mbedTLS_error(int error_code)
{
if (error_code != 0 && error_code != UECC_SUCCESS)
@@ -434,41 +432,7 @@
return error;
}
-#if !(SLI_SI91X_MCU_INTERFACE)
-static EntropyContext * get_entropy_context()
-{
- if (!gsEntropyContext.mInitialized)
- {
- mbedtls_entropy_init(&gsEntropyContext.mEntropy);
- mbedtls_ctr_drbg_init(&gsEntropyContext.mDRBGCtxt);
- gsEntropyContext.mInitialized = true;
- }
-
- return &gsEntropyContext;
-}
-
-static mbedtls_ctr_drbg_context * get_drbg_context()
-{
- EntropyContext * const context = get_entropy_context();
-
- mbedtls_ctr_drbg_context * const drbgCtxt = &context->mDRBGCtxt;
-
- if (!context->mDRBGSeeded)
- {
- const int status = mbedtls_ctr_drbg_seed(drbgCtxt, mbedtls_entropy_func, &context->mEntropy, nullptr, 0);
- if (status != 0)
- {
- _log_mbedTLS_error(status);
- return nullptr;
- }
-
- context->mDRBGSeeded = true;
- }
-
- return drbgCtxt;
-}
-#endif // !SLI_SI91X_MCU_INTERFACE
CHIP_ERROR add_entropy_source(entropy_source fn_source, void * p_source, size_t threshold)
{
#if SLI_SI91X_MCU_INTERFACE
diff --git a/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp b/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp
index 5854c2c..a61b36f 100644
--- a/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp
+++ b/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp
@@ -139,7 +139,6 @@
void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context)
{
- int32_t status = SL_STATUS_OK;
auto * imageProcessor = reinterpret_cast<OTAImageProcessorImpl *>(context);
if (imageProcessor == nullptr)
@@ -212,8 +211,6 @@
void OTAImageProcessorImpl::HandleApply(intptr_t context)
{
- int32_t status = SL_STATUS_OK;
-
ChipLogProgress(SoftwareUpdate, "OTAImageProcessorImpl::HandleApply()");
// Force KVS to store pending keys such as data from StoreCurrentUpdateInfo()
@@ -256,7 +253,6 @@
void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context)
{
int32_t status = SL_STATUS_OK;
- int32_t content_block = 0;
auto * imageProcessor = reinterpret_cast<OTAImageProcessorImpl *>(context);
if (imageProcessor == nullptr)
{
diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni
index 5a84dc3..50e11f3 100644
--- a/third_party/silabs/SiWx917_sdk.gni
+++ b/third_party/silabs/SiWx917_sdk.gni
@@ -340,11 +340,7 @@
defines += [ "ENABLE_AWS_OTA_FEAT=1" ]
}
- cflags += [
- "-Wno-shadow",
- "-Wno-unknown-warning-option",
- "-Wno-unused-variable",
- ]
+ cflags += [ "-Wno-shadow" ]
foreach(include_dir, _include_dirs) {
cflags += [ "-isystem" + rebase_path(include_dir, root_build_dir) ]
@@ -392,6 +388,7 @@
"${sl_si91x_psa_crypto_path}/gcm/inc",
"${sl_si91x_psa_crypto_path}/sha/inc",
"${sl_si91x_psa_crypto_path}/trng/inc",
+ "${sl_si91x_psa_crypto_path}/wrap/config",
"${sl_si91x_psa_crypto_path}/wrap/inc",
"${sl_si91x_psa_crypto_path}/multithread/inc",
diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support
index d8e473f..0f6500c 160000
--- a/third_party/silabs/matter_support
+++ b/third_party/silabs/matter_support
@@ -1 +1 @@
-Subproject commit d8e473ff0d236492b5fc2ce539caeb93e08671a0
+Subproject commit 0f6500c0b9a8473ac094cfbaf3a6c05b33318d4c