Skip to content

Commit

Permalink
[Silabs] Enabling Uart logs for 917soc by default (#35426)
Browse files Browse the repository at this point in the history
* Enabling Uart logs for 917soc by default

* adding the define for the uart

* adding the uart flag in silabs_board.gni

* Restyled by gn

* making the uart variable configurable

* updating the comment for the uart logs variable

---------

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Nov 15, 2024
1 parent 9bc5ed9 commit 3ce5d7f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
8 changes: 8 additions & 0 deletions src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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 += [
Expand Down Expand Up @@ -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" ]
}
Expand Down
7 changes: 4 additions & 3 deletions third_party/silabs/silabs_board.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3ce5d7f

Please sign in to comment.