Skip to content

Commit

Permalink
[Silabs] Fix enable_openthread_cli/uart build configuration (#25835)
Browse files Browse the repository at this point in the history
* This fix an issue where openthread cli was defined and uart files compiled when if not needed mostly on the wifi builds

* The conditional default does work in the declare args. put it there
  • Loading branch information
jmartinez-silabs authored and pull[bot] committed Nov 14, 2023
1 parent d8ef264 commit 5654609
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions examples/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ assert(!(use_wf200 && chip_enable_openthread))

if (chip_enable_wifi) {
assert(use_rs9116 || use_wf200 || use_SiWx917)
enable_openthread_cli = false
import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni")

if (use_rs9116) {
Expand Down Expand Up @@ -293,8 +292,7 @@ source_set("efr32-common") {
sources += [ "LEDWidget.cpp" ]
}

if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli ||
use_wf200 || use_rs9116) {
if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) {
sources += [ "uart.cpp" ]
}

Expand Down
5 changes: 1 addition & 4 deletions src/test_driver/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,10 @@ silabs_executable("efr32_device_tests") {
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/heap_4_silabs.c",
"${examples_plat_dir}/init_efrPlatform.cpp",
"${examples_plat_dir}/uart.cpp",
"src/main.cpp",
]

if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) {
sources += [ "${examples_plat_dir}/uart.cpp" ]
}

deps = [
":nl_test_service.nanopb_rpc",
":sdk",
Expand Down
3 changes: 2 additions & 1 deletion third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ declare_args() {

# Build openthread with prebuilt silabs lib
use_silabs_thread_lib = false
enable_openthread_cli = true

# enable by default for thread/non-wifi-ncp builds
enable_openthread_cli = !(use_rs9116 || use_wf200 || use_SiWx917)
kvs_max_entries = 255

# Use Silabs factory data provider example.
Expand Down

0 comments on commit 5654609

Please sign in to comment.