Skip to content

Commit

Permalink
Fix 917 soc builds (#28666)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinez-silabs authored and pull[bot] committed Oct 5, 2023
1 parent 3180562 commit 4438389
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
4 changes: 4 additions & 0 deletions examples/platform/silabs/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,15 @@ extern "C" {

#include <stdint.h>

#ifdef SIWX_917
extern uint32_t SystemCoreClock;
#else // For EFR32
#include "RTE_Components.h"
#include CMSIS_device_header

#include "em_assert.h"
#include "em_device.h"
#endif

#if defined(SL_COMPONENT_CATALOG_PRESENT)
#include "sl_component_catalog.h"
Expand Down
7 changes: 4 additions & 3 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ using namespace ::chip::DeviceLayer;
#include <crypto/CHIPCryptoPAL.h>
// If building with the EFR32-provided crypto backend, we can use the
// opaque keystore
#if CHIP_CRYPTO_PLATFORM
#if CHIP_CRYPTO_PLATFORM && !(defined(SIWX_917))
#include <platform/silabs/efr32/Efr32PsaOperationalKeystore.h>
static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeystore;
#endif
Expand Down Expand Up @@ -215,7 +215,7 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName)
initParams.testEventTriggerDelegate = &testEventTriggerDelegate;
#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED

#if CHIP_CRYPTO_PLATFORM
#if CHIP_CRYPTO_PLATFORM && !(defined(SIWX_917))
// When building with EFR32 crypto, use the opaque key store
// instead of the default (insecure) one.
gOperationalKeystore.Init();
Expand Down Expand Up @@ -255,7 +255,7 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName)
}

#ifdef SL_WIFI
void SilabsMatterConfig::InitWiFi(void)
CHIP_ERROR SilabsMatterConfig::InitWiFi(void)
{
#ifdef WF200_WIFI
// Start wfx bus communication task.
Expand All @@ -271,6 +271,7 @@ void SilabsMatterConfig::InitWiFi(void)
return CHIP_ERROR_INTERNAL;
}
#endif /* WF200_WIFI */
return CHIP_NO_ERROR;
}
#endif // SL_WIFI

Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/MatterConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SilabsMatterConfig

private:
static CHIP_ERROR InitOpenThread(void);
static void InitWiFi(void);
static CHIP_ERROR InitWiFi(void);
static void ConnectivityEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg);
static void InitOTARequestorHandler(chip::System::Layer * systemLayer, void * appState);
};
7 changes: 4 additions & 3 deletions examples/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ config("siwx917-common-config") {
defines += [ "QR_CODE_ENABLED" ]
}

if (chip_enable_ota_requestor) {
defines += [ "SILABS_OTA_ENABLED" ]
}
# TODO: Renable once ota is supported
# if (chip_enable_ota_requestor) {
# defines += [ "SILABS_OTA_ENABLED" ]
# }

if (enable_heap_monitoring) {
defines += [ "HEAP_MONITORING" ]
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/SiWx917/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void ARM_USART_SignalEvent(uint32_t event)
case ARM_USART_EVENT_RECEIVE_COMPLETE:
#ifdef ENABLE_CHIP_SHELL
chip::NotifyShellProcessFromISR();
#endif;
#endif
case ARM_USART_EVENT_TRANSFER_COMPLETE:
case ARM_USART_EVENT_TX_COMPLETE:
case ARM_USART_EVENT_TX_UNDERFLOW:
Expand Down
4 changes: 4 additions & 0 deletions src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ extern "C" void RSI_Board_LED_Toggle(int);
extern "C" void RSI_Wakeupsw_config(void);
extern "C" void RSI_Wakeupsw_config_gpio0(void);

#if SILABS_LOG_ENABLED
#include "silabs_utils.h"
#endif

namespace chip {
namespace DeviceLayer {
namespace Silabs {
Expand Down

0 comments on commit 4438389

Please sign in to comment.