Skip to content

Commit

Permalink
Went back to if condition on gn args since while true evaluates as a …
Browse files Browse the repository at this point in the history
…boolean in gn, define +=VAR=true will have the preprocessor define it as a string
  • Loading branch information
lpbeliveau-silabs committed Nov 28, 2024
1 parent 583900c commit 415730d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ template("siwx917_sdk") {
"UDMA_ROMDRIVER_PRESENT=1",
"PLL_ROMDRIVER_PRESENT=1",
"SL_MATTER_GN_BUILD=1",
"SILABS_LOG_OUT_UART=${sl_uart_log_output}",
]

if (silabs_log_enabled && chip_logging) {
Expand Down Expand Up @@ -334,6 +333,12 @@ template("siwx917_sdk") {
]
}

if (sl_uart_log_output) {
defines += [ "SILABS_LOG_OUT_UART=1" ]
} else {
defines += [ "SILABS_LOG_OUT_UART=0" ]
}

if (chip_build_libshell) { # matter shell
defines += [ "ENABLE_CHIP_SHELL" ]
}
Expand Down
7 changes: 6 additions & 1 deletion third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ template("efr32_sdk") {
"SL_OPENTHREAD_STACK_FEATURES_CONFIG_FILE=\"sl_openthread_features_config.h\"",
"SL_CSL_TIMEOUT=${sl_ot_csl_timeout_sec}",
"CIRCULAR_QUEUE_USE_LOCAL_CONFIG_HEADER=1",
"SILABS_LOG_OUT_UART=${sl_uart_log_output}",
]

if (silabs_log_enabled && chip_logging) {
Expand All @@ -490,6 +489,12 @@ template("efr32_sdk") {
defines += [ "SILABS_LOG_ENABLED=0" ]
}

if (sl_uart_log_output) {
defines += [ "SILABS_LOG_OUT_UART=1" ]
} else {
defines += [ "SILABS_LOG_OUT_UART=0" ]
}

if (use_silabs_thread_lib) {
defines += [ "SL_CONFIG_OPENTHREAD_LIB=1" ]
} else {
Expand Down

0 comments on commit 415730d

Please sign in to comment.