diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index 0bddafd96506f9..053b30cc8619f4 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -46,6 +46,10 @@ void soc_pll_config(void); #include "SEGGER_SYSVIEW.h" #endif +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL +#include "uart.h" +#endif + namespace chip { namespace DeviceLayer { namespace Silabs { @@ -75,6 +79,10 @@ CHIP_ERROR SilabsPlatform::Init(void) silabsInitLog(); #endif +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL + uartConsoleInit(); +#endif + #ifdef SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT SEGGER_SYSVIEW_Conf(); #endif diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index ea9d6beaefd970..30e1595493c60c 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -248,13 +248,6 @@ template("siwx917_sdk") { defines += [ "SILABS_LOG_ENABLED=0" ] } - if (chip_build_libshell) { - defines += [ - "ENABLE_CHIP_SHELL", - "SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1", - ] - } - defines += [ "LWIP_NETIF_API=1" ] if (chip_enable_wifi_ipv4) { defines += [ @@ -329,6 +322,9 @@ template("siwx917_sdk") { defines += [ "ENABLE_CHIP_SHELL" ] } + if (chip_build_libshell || sl_uart_log_output) { + defines += [ "SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1" ] + } if (enable_dic) { defines += [ "DIC_ENABLE=1" ] } diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index 7c1d77d036a41f..087ccc9d892916 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -43,9 +43,6 @@ declare_args() { # Disable AWS SDK OTA by default aws_sdk_ota = false - # Disable UART log forwarding by default - sl_uart_log_output = false - # Self-provision enabled use_provision_channel = false } @@ -165,6 +162,10 @@ declare_args() { # User can set this arg to false to skip the rps creation for WiFi SoCs. # e.g. for CI use_rps_extension = wifi_soc + + # UART log forwarding + # Default true for the wifi soc and false for EFR32 boards + sl_uart_log_output = wifi_soc } # qr code cannot be true if lcd is disabled