Skip to content

Commit be5bbf8

Browse files
chirag-silabsandy31415restyled-commits
authored
[Silabs] Enabling Uart logs for 917soc by default (project-chip#35426)
* 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 <andy314@gmail.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 927724c commit be5bbf8

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ void soc_pll_config(void);
4646
#include "SEGGER_SYSVIEW.h"
4747
#endif
4848

49+
#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL
50+
#include "uart.h"
51+
#endif
52+
4953
namespace chip {
5054
namespace DeviceLayer {
5155
namespace Silabs {
@@ -75,6 +79,10 @@ CHIP_ERROR SilabsPlatform::Init(void)
7579
silabsInitLog();
7680
#endif
7781

82+
#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL
83+
uartConsoleInit();
84+
#endif
85+
7886
#ifdef SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT
7987
SEGGER_SYSVIEW_Conf();
8088
#endif

third_party/silabs/SiWx917_sdk.gni

+3-7
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,6 @@ template("siwx917_sdk") {
248248
defines += [ "SILABS_LOG_ENABLED=0" ]
249249
}
250250

251-
if (chip_build_libshell) {
252-
defines += [
253-
"ENABLE_CHIP_SHELL",
254-
"SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1",
255-
]
256-
}
257-
258251
defines += [ "LWIP_NETIF_API=1" ]
259252
if (chip_enable_wifi_ipv4) {
260253
defines += [
@@ -329,6 +322,9 @@ template("siwx917_sdk") {
329322
defines += [ "ENABLE_CHIP_SHELL" ]
330323
}
331324

325+
if (chip_build_libshell || sl_uart_log_output) {
326+
defines += [ "SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1" ]
327+
}
332328
if (enable_dic) {
333329
defines += [ "DIC_ENABLE=1" ]
334330
}

third_party/silabs/silabs_board.gni

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ declare_args() {
4343
# Disable AWS SDK OTA by default
4444
aws_sdk_ota = false
4545

46-
# Disable UART log forwarding by default
47-
sl_uart_log_output = false
48-
4946
# Self-provision enabled
5047
use_provision_channel = false
5148
}
@@ -165,6 +162,10 @@ declare_args() {
165162
# User can set this arg to false to skip the rps creation for WiFi SoCs.
166163
# e.g. for CI
167164
use_rps_extension = wifi_soc
165+
166+
# UART log forwarding
167+
# Default true for the wifi soc and false for EFR32 boards
168+
sl_uart_log_output = wifi_soc
168169
}
169170

170171
# qr code cannot be true if lcd is disabled

0 commit comments

Comments
 (0)