diff --git a/examples/chef/efr32/args.gni b/examples/chef/efr32/args.gni index af4de711ae6876..70e1fb9bd3fac3 100644 --- a/examples/chef/efr32/args.gni +++ b/examples/chef/efr32/args.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") import("${chip_root}/src/platform/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_ota_requestor = true chip_enable_openthread = true diff --git a/examples/chef/efr32/build_for_wifi_args.gni b/examples/chef/efr32/build_for_wifi_args.gni index 27e3d837658720..9394037ba0ee38 100644 --- a/examples/chef/efr32/build_for_wifi_args.gni +++ b/examples/chef/efr32/build_for_wifi_args.gni @@ -13,8 +13,8 @@ # limitations under the License. import("//build_overrides/chip.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false -import("${chip_root}/src/platform/efr32/wifi_args.gni") +import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true diff --git a/examples/chef/efr32/with_pw_rpc.gni b/examples/chef/efr32/with_pw_rpc.gni index c705b92b12f6fd..2b0cddeca8f214 100644 --- a/examples/chef/efr32/with_pw_rpc.gni +++ b/examples/chef/efr32/with_pw_rpc.gni @@ -19,7 +19,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") import("${chip_root}/examples/platform/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true diff --git a/examples/light-switch-app/silabs/SiWx917/args.gni b/examples/light-switch-app/silabs/SiWx917/args.gni index 0e0bbe544fd35a..89e0768ff5eb6a 100644 --- a/examples/light-switch-app/silabs/SiWx917/args.gni +++ b/examples/light-switch-app/silabs/SiWx917/args.gni @@ -14,9 +14,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -import("${chip_root}/src/platform/silabs/SiWx917/args.gni") +import("${chip_root}/src/platform/silabs/args.gni") -siwx917_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/light-switch-app/light-switch-common" chip_enable_ota_requestor = true diff --git a/examples/light-switch-app/silabs/efr32/.gn b/examples/light-switch-app/silabs/efr32/.gn index 4c078f6acefdcc..b05216fc9d7eae 100644 --- a/examples/light-switch-app/silabs/efr32/.gn +++ b/examples/light-switch-app/silabs/efr32/.gn @@ -25,5 +25,5 @@ default_args = { target_os = "freertos" chip_openthread_ftd = true - import("//args.gni") + import("//openthread.gni") } diff --git a/examples/light-switch-app/silabs/efr32/BUILD.gn b/examples/light-switch-app/silabs/efr32/BUILD.gn index e989008ba0efb6..4404e9941419ea 100644 --- a/examples/light-switch-app/silabs/efr32/BUILD.gn +++ b/examples/light-switch-app/silabs/efr32/BUILD.gn @@ -18,11 +18,11 @@ import("//build_overrides/efr32_sdk.gni") import("//build_overrides/pigweed.gni") import("${build_root}/config/defaults.gni") -import("${efr32_sdk_build_root}/efr32_sdk.gni") import("${efr32_sdk_build_root}/silabs_executable.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") if (chip_enable_pw_rpc) { import("//build_overrides/pigweed.gni") @@ -31,30 +31,59 @@ if (chip_enable_pw_rpc) { assert(current_os == "freertos") -efr32_project_dir = "${chip_root}/examples/light-switch-app/silabs/efr32" -examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +silabs_project_dir = "${chip_root}/examples/light-switch-app/silabs/efr32" examples_common_plat_dir = "${chip_root}/examples/platform/silabs" -if (chip_enable_ble_rs911x) { - src_plat_dir = "${chip_root}/src/platform/silabs/efr32" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" } -import("${examples_plat_dir}/args.gni") +import("${examples_common_plat_dir}/args.gni") declare_args() { # Dump memory usage at link time. chip_print_memory_usage = false } +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${silabs_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/FreeRTOSConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } +} + +} else { efr32_sdk("sdk") { sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", "${examples_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ "${chip_root}/examples/light-switch-app/silabs/common", "${chip_root}/src/platform/silabs/efr32", - "${efr32_project_dir}/include", + "${silabs_project_dir}/include", "${examples_plat_dir}", "${chip_root}/src/lib", "${examples_common_plat_dir}", @@ -68,7 +97,7 @@ efr32_sdk("sdk") { if (chip_enable_ble_rs911x) { # TODO efr32_sdk should not need a header from this location include_dirs += [ - "${src_plat_dir}/rs911x", + "${chip_root}/src/platform/silabs/efr32/rs911x", "${examples_plat_dir}/rs911x", "${examples_plat_dir}/rs911x/hal", ] @@ -82,10 +111,14 @@ efr32_sdk("sdk") { ] } } +} silabs_executable("light_switch_app") { - output_name = "chip-efr32-light-switch-example.out" - include_dirs = [ "include" ] + output_name = "chip-silabs-light-switch-example.out" + include_dirs = [ + "include", + "${chip_root}/examples/light-switch-app/silabs/common/", + ] defines = [] sources = [ @@ -98,10 +131,15 @@ silabs_executable("light_switch_app") { deps = [ ":sdk", - "${examples_plat_dir}:efr32-common", app_data_model, ] + if (wifi_soc) { + deps += ["${examples_plat_dir}:siwx917-common"] + } else { + deps += ["${examples_plat_dir}:efr32-common"] + } + if (chip_build_libshell) { sources += [ "${chip_root}/examples/light-switch-app/silabs/common/ShellCommands.cpp", @@ -134,9 +172,15 @@ silabs_executable("light_switch_app") { "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + ] + if (wifi_soc) { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917"] + } else { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32"] + } + deps += pw_build_LINK_DEPS include_dirs += [ @@ -169,10 +213,10 @@ silabs_executable("light_switch_app") { output_dir = root_out_dir } -group("efr32") { +group("silabs") { deps = [ ":light_switch_app" ] } group("default") { - deps = [ ":efr32" ] + deps = [ ":silabs" ] } diff --git a/examples/light-switch-app/silabs/efr32/build_for_wifi_args.gni b/examples/light-switch-app/silabs/efr32/build_for_wifi_args.gni index bac0164159fe10..ac70e16a8b484f 100644 --- a/examples/light-switch-app/silabs/efr32/build_for_wifi_args.gni +++ b/examples/light-switch-app/silabs/efr32/build_for_wifi_args.gni @@ -14,9 +14,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false -import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") +import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/light-switch-app/light-switch-common" diff --git a/examples/light-switch-app/silabs/efr32/openthread.gn b/examples/light-switch-app/silabs/efr32/openthread.gn new file mode 100644 index 00000000000000..b05216fc9d7eae --- /dev/null +++ b/examples/light-switch-app/silabs/efr32/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/light-switch-app/silabs/efr32/args.gni b/examples/light-switch-app/silabs/efr32/openthread.gni similarity index 93% rename from examples/light-switch-app/silabs/efr32/args.gni rename to examples/light-switch-app/silabs/efr32/openthread.gni index 779402128b46a7..344d0ea4973481 100644 --- a/examples/light-switch-app/silabs/efr32/args.gni +++ b/examples/light-switch-app/silabs/efr32/openthread.gni @@ -16,10 +16,11 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/light-switch-app/light-switch-common" chip_enable_ota_requestor = true chip_enable_openthread = true + openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/lighting-app/silabs/SiWx917/args.gni b/examples/lighting-app/silabs/SiWx917/args.gni index 3667aef09297db..7157754d68f864 100644 --- a/examples/lighting-app/silabs/SiWx917/args.gni +++ b/examples/lighting-app/silabs/SiWx917/args.gni @@ -14,8 +14,8 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -siwx917_sdk_target = get_label_info(":sdk", "label_no_toolchain") -import("${chip_root}/src/platform/silabs/SiWx917/args.gni") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") +import("${chip_root}/src/platform/silabs/args.gni") app_data_model = "${chip_root}/examples/lighting-app/silabs/SiWx917/data_model:silabs-lighting" chip_enable_ota_requestor = true diff --git a/examples/lighting-app/silabs/SiWx917/with_pw_rpc.gni b/examples/lighting-app/silabs/SiWx917/with_pw_rpc.gni index 753a655dcd7668..a2f55709d5a7c4 100644 --- a/examples/lighting-app/silabs/SiWx917/with_pw_rpc.gni +++ b/examples/lighting-app/silabs/SiWx917/with_pw_rpc.gni @@ -19,7 +19,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") import("${chip_root}/examples/platform/silabs/SiWx917/args.gni") -siwx917_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/lighting-app/lighting-common" chip_enable_pw_rpc = true diff --git a/examples/lighting-app/silabs/efr32/.gn b/examples/lighting-app/silabs/efr32/.gn index 4c078f6acefdcc..b05216fc9d7eae 100644 --- a/examples/lighting-app/silabs/efr32/.gn +++ b/examples/lighting-app/silabs/efr32/.gn @@ -25,5 +25,5 @@ default_args = { target_os = "freertos" chip_openthread_ftd = true - import("//args.gni") + import("//openthread.gni") } diff --git a/examples/lighting-app/silabs/efr32/BUILD.gn b/examples/lighting-app/silabs/efr32/BUILD.gn index 391226a9fc7bb9..b145bfb011139a 100644 --- a/examples/lighting-app/silabs/efr32/BUILD.gn +++ b/examples/lighting-app/silabs/efr32/BUILD.gn @@ -18,11 +18,11 @@ import("//build_overrides/efr32_sdk.gni") import("//build_overrides/pigweed.gni") import("${build_root}/config/defaults.gni") -import("${efr32_sdk_build_root}/efr32_sdk.gni") import("${efr32_sdk_build_root}/silabs_executable.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") if (chip_enable_pw_rpc) { import("//build_overrides/pigweed.gni") @@ -31,15 +31,18 @@ if (chip_enable_pw_rpc) { assert(current_os == "freertos") -efr32_project_dir = "${chip_root}/examples/lighting-app/silabs/efr32" -examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +silabs_project_dir = "${chip_root}/examples/lighting-app/silabs/efr32" examples_common_plat_dir = "${chip_root}/examples/platform/silabs" -if (chip_enable_ble_rs911x) { - src_plat_dir = "${chip_root}/src/platform/silabs/efr32" +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" } -import("${examples_plat_dir}/args.gni") +import("${examples_common_plat_dir}/args.gni") declare_args() { # Dump memory usage at link time. @@ -60,34 +63,21 @@ if (slc_generate) { "list lines")) } -efr32_sdk("sdk") { +if (wifi_soc) { + siwx917_sdk("sdk") { sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", "${examples_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ - "${chip_root}/src/platform/silabs/efr32", - "${efr32_project_dir}/include", + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", "${examples_plat_dir}", "${chip_root}/src/lib", "${examples_common_plat_dir}", ] - if (use_wf200) { - # TODO efr32_sdk should not need a header from this location - include_dirs += [ "${examples_plat_dir}/wf200" ] - } - - if (chip_enable_ble_rs911x) { - # TODO efr32_sdk should not need a header from this location - include_dirs += [ - "${src_plat_dir}/rs911x", - "${examples_plat_dir}/rs911x", - "${examples_plat_dir}/rs911x/hal", - ] - } - defines = [] if (chip_enable_pw_rpc) { defines += [ @@ -97,8 +87,45 @@ efr32_sdk("sdk") { } } +} else { + efr32_sdk("sdk") { + sources = [ + "${silabs_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/FreeRTOSConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/efr32", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + if (use_wf200) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ "${examples_plat_dir}/wf200" ] + } + + if (chip_enable_ble_rs911x) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ + "${examples_plat_dir}/rs911x", + "${examples_plat_dir}/rs911x/hal", + ] + } + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} silabs_executable("lighting_app") { - output_name = "chip-efr32-lighting-example.out" + output_name = "chip-silabs-lighting-example.out" include_dirs = [ "include" ] defines = [] @@ -115,10 +142,15 @@ silabs_executable("lighting_app") { deps = [ ":sdk", - "${examples_plat_dir}:efr32-common", app_data_model, ] + if (wifi_soc) { + deps += ["${examples_plat_dir}:siwx917-common"] + } else { + deps += ["${examples_plat_dir}:efr32-common"] + } + if (chip_enable_pw_rpc) { defines += [ "PW_RPC_ENABLED", @@ -153,9 +185,14 @@ silabs_executable("lighting_app") { "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", ] + if (wifi_soc) { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917"] + } else { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32"] + } + deps += pw_build_LINK_DEPS include_dirs += [ @@ -188,10 +225,10 @@ silabs_executable("lighting_app") { output_dir = root_out_dir } -group("efr32") { +group("silabs") { deps = [ ":lighting_app" ] } group("default") { - deps = [ ":efr32" ] + deps = [ ":silabs" ] } diff --git a/examples/lighting-app/silabs/efr32/build_for_wifi_args.gni b/examples/lighting-app/silabs/efr32/build_for_wifi_args.gni index c5097d7c1f5510..08cb8f35603b47 100644 --- a/examples/lighting-app/silabs/efr32/build_for_wifi_args.gni +++ b/examples/lighting-app/silabs/efr32/build_for_wifi_args.gni @@ -14,9 +14,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false -import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") +import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = diff --git a/examples/lighting-app/silabs/efr32/openthread.gn b/examples/lighting-app/silabs/efr32/openthread.gn new file mode 100644 index 00000000000000..b05216fc9d7eae --- /dev/null +++ b/examples/lighting-app/silabs/efr32/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/lighting-app/silabs/efr32/args.gni b/examples/lighting-app/silabs/efr32/openthread.gni similarity index 93% rename from examples/lighting-app/silabs/efr32/args.gni rename to examples/lighting-app/silabs/efr32/openthread.gni index cdea54a9ff90cb..e7783cb5d09727 100644 --- a/examples/lighting-app/silabs/efr32/args.gni +++ b/examples/lighting-app/silabs/efr32/openthread.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/lighting-app/silabs/efr32/data_model:silabs-lighting" diff --git a/examples/lighting-app/silabs/efr32/with_pw_rpc.gni b/examples/lighting-app/silabs/efr32/with_pw_rpc.gni index 3ee366c51ad498..bade7c7ea1f376 100644 --- a/examples/lighting-app/silabs/efr32/with_pw_rpc.gni +++ b/examples/lighting-app/silabs/efr32/with_pw_rpc.gni @@ -17,9 +17,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") -import("${chip_root}/examples/platform/silabs/efr32/args.gni") +import("${chip_root}/examples/platform/silabs/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/lighting-app/lighting-common" chip_enable_pw_rpc = true diff --git a/examples/lock-app/silabs/SiWx917/args.gni b/examples/lock-app/silabs/SiWx917/args.gni index 85b837f7ba72a3..e4bfe4d5dc7811 100644 --- a/examples/lock-app/silabs/SiWx917/args.gni +++ b/examples/lock-app/silabs/SiWx917/args.gni @@ -14,9 +14,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -import("${chip_root}/src/platform/silabs/SiWx917/args.gni") +import("${chip_root}/src/platform/silabs/args.gni") -siwx917_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/lock-app/lock-common" chip_enable_ota_requestor = true diff --git a/examples/lock-app/silabs/SiWx917/with_pw_rpc.gni b/examples/lock-app/silabs/SiWx917/with_pw_rpc.gni index ff81f847c35cdb..8a4c77792c4616 100644 --- a/examples/lock-app/silabs/SiWx917/with_pw_rpc.gni +++ b/examples/lock-app/silabs/SiWx917/with_pw_rpc.gni @@ -19,7 +19,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") import("${chip_root}/examples/platform/silabs/Siwx917/args.gni") -siwx917_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/lock-app/lock-common" chip_enable_pw_rpc = true diff --git a/examples/lock-app/silabs/efr32/.gn b/examples/lock-app/silabs/efr32/.gn index 4c078f6acefdcc..b05216fc9d7eae 100644 --- a/examples/lock-app/silabs/efr32/.gn +++ b/examples/lock-app/silabs/efr32/.gn @@ -25,5 +25,5 @@ default_args = { target_os = "freertos" chip_openthread_ftd = true - import("//args.gni") + import("//openthread.gni") } diff --git a/examples/lock-app/silabs/efr32/BUILD.gn b/examples/lock-app/silabs/efr32/BUILD.gn index d70726b29d1b70..be94380cd41564 100644 --- a/examples/lock-app/silabs/efr32/BUILD.gn +++ b/examples/lock-app/silabs/efr32/BUILD.gn @@ -18,11 +18,11 @@ import("//build_overrides/efr32_sdk.gni") import("//build_overrides/pigweed.gni") import("${build_root}/config/defaults.gni") -import("${efr32_sdk_build_root}/efr32_sdk.gni") import("${efr32_sdk_build_root}/silabs_executable.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") if (chip_enable_pw_rpc) { import("//build_overrides/pigweed.gni") @@ -31,30 +31,58 @@ if (chip_enable_pw_rpc) { assert(current_os == "freertos") -efr32_project_dir = "${chip_root}/examples/lock-app/silabs/efr32" -examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +silabs_project_dir = "${chip_root}/examples/lock-app/silabs/efr32" examples_common_plat_dir = "${chip_root}/examples/platform/silabs" -if (chip_enable_ble_rs911x) { - src_plat_dir = "${chip_root}/src/platform/silabs/efr32" +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" } -import("${examples_plat_dir}/args.gni") +import("${examples_common_plat_dir}/args.gni") declare_args() { # Dump memory usage at link time. chip_print_memory_usage = false } +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${silabs_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/FreeRTOSConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } +} + +} else { efr32_sdk("sdk") { sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", "${examples_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ "${chip_root}/src/platform/silabs/efr32", - "${efr32_project_dir}/include", + "${silabs_project_dir}/include", "${examples_plat_dir}", "${chip_root}/src/lib", "${examples_common_plat_dir}", @@ -82,9 +110,10 @@ efr32_sdk("sdk") { ] } } +} silabs_executable("lock_app") { - output_name = "chip-efr32-lock-example.out" + output_name = "chip-silabs-lock-example.out" include_dirs = [ "include" ] defines = [] @@ -101,10 +130,15 @@ silabs_executable("lock_app") { deps = [ ":sdk", - "${examples_plat_dir}:efr32-common", app_data_model, ] + if (wifi_soc) { + deps += ["${examples_plat_dir}:siwx917-common"] + } else { + deps += ["${examples_plat_dir}:efr32-common"] + } + if (chip_enable_pw_rpc) { defines += [ "PW_RPC_ENABLED", @@ -135,9 +169,14 @@ silabs_executable("lock_app") { "${chip_root}/examples/common/pigweed:locking_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", ] + if (wifi_soc) { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917"] + } else { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32"] + } + deps += pw_build_LINK_DEPS include_dirs += [ @@ -170,10 +209,10 @@ silabs_executable("lock_app") { output_dir = root_out_dir } -group("efr32") { +group("silabs") { deps = [ ":lock_app" ] } group("default") { - deps = [ ":efr32" ] + deps = [ ":silabs" ] } diff --git a/examples/lock-app/silabs/efr32/args.gni b/examples/lock-app/silabs/efr32/args.gni index d72526e91d9867..75546366efa21b 100644 --- a/examples/lock-app/silabs/efr32/args.gni +++ b/examples/lock-app/silabs/efr32/args.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/lock-app/lock-common" chip_enable_ota_requestor = true diff --git a/examples/lock-app/silabs/efr32/build_for_wifi_args.gni b/examples/lock-app/silabs/efr32/build_for_wifi_args.gni index f672499d83e259..3769c90066ad7a 100644 --- a/examples/lock-app/silabs/efr32/build_for_wifi_args.gni +++ b/examples/lock-app/silabs/efr32/build_for_wifi_args.gni @@ -14,9 +14,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false -import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") +import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/lock-app/lock-common" diff --git a/examples/lock-app/silabs/efr32/openthread.gn b/examples/lock-app/silabs/efr32/openthread.gn new file mode 100644 index 00000000000000..b05216fc9d7eae --- /dev/null +++ b/examples/lock-app/silabs/efr32/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/platform/silabs/efr32/args.gni b/examples/lock-app/silabs/efr32/openthread.gni similarity index 60% rename from examples/platform/silabs/efr32/args.gni rename to examples/lock-app/silabs/efr32/openthread.gni index 47d4cbb5c7bc20..9d7fbf28634308 100644 --- a/examples/platform/silabs/efr32/args.gni +++ b/examples/lock-app/silabs/efr32/openthread.gni @@ -13,14 +13,14 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/src/platform/silabs/efr32/args.gni") -chip_ble_project_config_include = "" -chip_device_project_config_include = "" -chip_project_config_include = "" -chip_inet_project_config_include = "" -chip_system_project_config_include = "" +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") -declare_args() { - app_data_model = "" - use_base_app = true -} +app_data_model = "${chip_root}/examples/lock-app/lock-common" +chip_enable_ota_requestor = true +chip_enable_openthread = true + +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/lock-app/silabs/efr32/with_pw_rpc.gni b/examples/lock-app/silabs/efr32/with_pw_rpc.gni index b691609e6bf2d0..2592790c03e2ce 100644 --- a/examples/lock-app/silabs/efr32/with_pw_rpc.gni +++ b/examples/lock-app/silabs/efr32/with_pw_rpc.gni @@ -17,9 +17,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") -import("${chip_root}/examples/platform/silabs/efr32/args.gni") +import("${chip_root}/examples/platform/silabs/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/lock-app/lock-common" chip_enable_pw_rpc = true diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 3233ea7e88dd98..2775c5d304dbce 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -45,11 +45,12 @@ declare_args() { chip_default_wifi_psk = "" } -import("${silabs_common_plat_dir}/SiWx917/args.gni") +import("${silabs_common_plat_dir}/args.gni") +import("${chip_root}/src/platform/silabs/wifi_args.gni") # Sanity check assert(chip_enable_wifi) -import("${chip_root}/src/platform/silabs/SiWx917/args.gni") + wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" silabs_common_plat_dir = "${chip_root}/examples/platform/silabs" diff --git a/examples/platform/silabs/SiWx917/args.gni b/examples/platform/silabs/args.gni similarity index 100% rename from examples/platform/silabs/SiWx917/args.gni rename to examples/platform/silabs/args.gni diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 549b2aeec9da5a..34f4f503008618 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -48,7 +48,7 @@ chip_persist_subscriptions = enable_sleepy_device silabs_common_plat_dir = "${chip_root}/examples/platform/silabs" -import("${silabs_common_plat_dir}/efr32/args.gni") +import("${silabs_common_plat_dir}/args.gni") # Sanity check assert(!(chip_enable_wifi && chip_enable_openthread)) @@ -58,7 +58,7 @@ assert(!(use_wf200 && chip_enable_openthread)) if (chip_enable_wifi) { assert(use_rs9116 || use_wf200 || use_SiWx917) - import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") + import("${chip_root}/src/platform/silabs/wifi_args.gni") if (use_rs9116) { wiseconnect_sdk_root = diff --git a/examples/thermostat/silabs/efr32/.gn b/examples/thermostat/silabs/efr32/.gn index 4c078f6acefdcc..b05216fc9d7eae 100644 --- a/examples/thermostat/silabs/efr32/.gn +++ b/examples/thermostat/silabs/efr32/.gn @@ -25,5 +25,5 @@ default_args = { target_os = "freertos" chip_openthread_ftd = true - import("//args.gni") + import("//openthread.gni") } diff --git a/examples/thermostat/silabs/efr32/BUILD.gn b/examples/thermostat/silabs/efr32/BUILD.gn index 4bf824c4812147..52274f2b5d67b6 100644 --- a/examples/thermostat/silabs/efr32/BUILD.gn +++ b/examples/thermostat/silabs/efr32/BUILD.gn @@ -18,11 +18,11 @@ import("//build_overrides/efr32_sdk.gni") import("//build_overrides/pigweed.gni") import("${build_root}/config/defaults.gni") -import("${efr32_sdk_build_root}/efr32_sdk.gni") import("${efr32_sdk_build_root}/silabs_executable.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") if (chip_enable_pw_rpc) { import("//build_overrides/pigweed.gni") @@ -31,14 +31,18 @@ if (chip_enable_pw_rpc) { assert(current_os == "freertos") -efr32_project_dir = "${chip_root}/examples/thermostat/silabs/efr32" -examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +silabs_project_dir = "${chip_root}/examples/thermostat/silabs/efr32" examples_common_plat_dir = "${chip_root}/examples/platform/silabs" -if (chip_enable_ble_rs911x) { - src_plat_dir = "${chip_root}/src/platform/silabs/efr32" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" } -import("${examples_plat_dir}/args.gni") +import("${examples_common_plat_dir}/args.gni") declare_args() { # Dump memory usage at link time. @@ -46,19 +50,43 @@ declare_args() { # Enable the temperature sensor # Some boards do not have a temperature sensor - use_temp_sensor = silabs_board != "BRD2703A" && silabs_board != "BRD4319A" && - silabs_board != "BRD2704A" + use_temp_sensor = false +} + +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${silabs_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/FreeRTOSConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } } -efr32_sdk("sdk") { +} else { + efr32_sdk("sdk") { sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", "${examples_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ "${chip_root}/src/platform/silabs/efr32", - "${efr32_project_dir}/include", + "${silabs_project_dir}/include", "${examples_plat_dir}", "${chip_root}/src/lib", "${examples_common_plat_dir}", @@ -72,7 +100,7 @@ efr32_sdk("sdk") { if (chip_enable_ble_rs911x) { # TODO efr32_sdk should not need a header from this location include_dirs += [ - "${src_plat_dir}/rs911x", + "${chip_root}/src/platform/silabs/efr32/rs911x", "${examples_plat_dir}/rs911x", "${examples_plat_dir}/rs911x/hal", ] @@ -100,8 +128,12 @@ efr32_sdk("sdk") { } } +} + + + silabs_executable("thermostat_app") { - output_name = "chip-efr32-thermostat-example.out" + output_name = "chip-silabs-thermostat-example.out" include_dirs = [ "include" ] defines = [] @@ -130,10 +162,15 @@ silabs_executable("thermostat_app") { deps = [ ":sdk", - "${examples_plat_dir}:efr32-common", app_data_model, ] + if (wifi_soc) { + deps += ["${examples_plat_dir}:siwx917-common"] + } else { + deps += ["${examples_plat_dir}:efr32-common"] + } + if (chip_enable_pw_rpc) { defines += [ "PW_RPC_ENABLED", @@ -160,9 +197,15 @@ silabs_executable("thermostat_app") { "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + ] + if (wifi_soc) { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917"] + } else { + deps += ["${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32"] + } + deps += pw_build_LINK_DEPS include_dirs += [ @@ -195,10 +238,10 @@ silabs_executable("thermostat_app") { output_dir = root_out_dir } -group("efr32") { +group("silabs") { deps = [ ":thermostat_app" ] } group("default") { - deps = [ ":efr32" ] + deps = [ ":silabs" ] } diff --git a/examples/thermostat/silabs/efr32/build_for_wifi_args.gni b/examples/thermostat/silabs/efr32/build_for_wifi_args.gni index e284ff4ec53d63..a32db792d21a32 100644 --- a/examples/thermostat/silabs/efr32/build_for_wifi_args.gni +++ b/examples/thermostat/silabs/efr32/build_for_wifi_args.gni @@ -14,9 +14,8 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") -chip_enable_openthread = false -import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") - +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") +import("${chip_root}/src/platform/silabs/wifi_args.gni") +chip_enable_wifi=true chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/thermostat/thermostat-common" diff --git a/examples/thermostat/silabs/efr32/openthread.gn b/examples/thermostat/silabs/efr32/openthread.gn new file mode 100644 index 00000000000000..b05216fc9d7eae --- /dev/null +++ b/examples/thermostat/silabs/efr32/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/thermostat/silabs/efr32/args.gni b/examples/thermostat/silabs/efr32/openthread.gni similarity index 93% rename from examples/thermostat/silabs/efr32/args.gni rename to examples/thermostat/silabs/efr32/openthread.gni index 938707c94a4f81..1ceb53d9204877 100644 --- a/examples/thermostat/silabs/efr32/args.gni +++ b/examples/thermostat/silabs/efr32/openthread.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/thermostat/thermostat-common" chip_enable_ota_requestor = true diff --git a/examples/window-app/silabs/SiWx917/args.gni b/examples/window-app/silabs/SiWx917/args.gni index c4fe64871e74c8..76712544639802 100644 --- a/examples/window-app/silabs/SiWx917/args.gni +++ b/examples/window-app/silabs/SiWx917/args.gni @@ -14,9 +14,9 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") -import("${chip_root}/src/platform/silabs/SiWx917/args.gni") +import("${chip_root}/src/platform/silabs/args.gni") -siwx917_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/window-app/common:window-common" chip_enable_ota_requestor = true diff --git a/examples/window-app/silabs/efr32/.gn b/examples/window-app/silabs/efr32/.gn index 4c078f6acefdcc..b05216fc9d7eae 100644 --- a/examples/window-app/silabs/efr32/.gn +++ b/examples/window-app/silabs/efr32/.gn @@ -25,5 +25,5 @@ default_args = { target_os = "freertos" chip_openthread_ftd = true - import("//args.gni") + import("//openthread.gni") } diff --git a/examples/window-app/silabs/efr32/BUILD.gn b/examples/window-app/silabs/efr32/BUILD.gn index f965dc552c8641..48a39f48ea4933 100644 --- a/examples/window-app/silabs/efr32/BUILD.gn +++ b/examples/window-app/silabs/efr32/BUILD.gn @@ -19,35 +19,63 @@ import("//build_overrides/pigweed.gni") import("${build_root}/config/defaults.gni") import("${chip_root}/src/platform/device.gni") -import("${efr32_sdk_build_root}/efr32_sdk.gni") import("${efr32_sdk_build_root}/silabs_executable.gni") - +import("${chip_root}/third_party/silabs/silabs_board.gni") assert(current_os == "freertos") project_dir = "${chip_root}/examples/window-app" -efr32_project_dir = "${project_dir}/silabs/efr32" -examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +silabs_project_dir = "${project_dir}/silabs/efr32" examples_common_plat_dir = "${chip_root}/examples/platform/silabs" -if (chip_enable_ble_rs911x) { - src_plat_dir = "${chip_root}/src/platform/silabs/efr32" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" } -import("${examples_plat_dir}/args.gni") +import("${examples_common_plat_dir}/args.gni") declare_args() { # Dump memory usage at link time. chip_print_memory_usage = false } +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${silabs_project_dir}/include/CHIPProjectConfig.h", + "${examples_plat_dir}/FreeRTOSConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } +} + +} else { efr32_sdk("sdk") { sources = [ - "${efr32_project_dir}/include/CHIPProjectConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", "${examples_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ "${chip_root}/src/platform/silabs/efr32", - "${efr32_project_dir}/include", + "${silabs_project_dir}/include", "${examples_plat_dir}", "${chip_root}/src/lib", "${examples_common_plat_dir}", @@ -61,15 +89,16 @@ efr32_sdk("sdk") { if (chip_enable_ble_rs911x) { # TODO efr32_sdk should not need a header from this location include_dirs += [ - "${src_plat_dir}/rs911x", + "${chip_root}/src/platform/silabs/efr32/rs911x", "${examples_plat_dir}/rs911x", "${examples_plat_dir}/rs911x/hal", ] } } +} silabs_executable("window_app") { - output_name = "chip-efr32-window-example.out" + output_name = "chip-silabs-window-example.out" output_dir = root_out_dir include_dirs = [ "include", @@ -90,10 +119,14 @@ silabs_executable("window_app") { deps = [ ":sdk", - "${examples_plat_dir}:efr32-common", app_data_model, ] + if (wifi_soc) { + deps += ["${examples_plat_dir}:siwx917-common"] + } else { + deps += ["${examples_plat_dir}:efr32-common"] + } ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] @@ -116,10 +149,10 @@ silabs_executable("window_app") { } } -group("efr32") { +group("silabs") { deps = [ ":window_app" ] } group("default") { - deps = [ ":efr32" ] + deps = [ ":silabs" ] } diff --git a/examples/window-app/silabs/efr32/args.gni b/examples/window-app/silabs/efr32/args.gni index 1631579c3da2d6..e79d59068dd30a 100644 --- a/examples/window-app/silabs/efr32/args.gni +++ b/examples/window-app/silabs/efr32/args.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") app_data_model = "${chip_root}/examples/window-app/common:window-common" chip_enable_ota_requestor = true diff --git a/examples/window-app/silabs/efr32/build_for_wifi_args.gni b/examples/window-app/silabs/efr32/build_for_wifi_args.gni index 1b86ebd8007bc8..2619458aa7253f 100644 --- a/examples/window-app/silabs/efr32/build_for_wifi_args.gni +++ b/examples/window-app/silabs/efr32/build_for_wifi_args.gni @@ -13,9 +13,9 @@ # limitations under the License. import("//build_overrides/chip.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false -import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") +import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/window-app/common:window-common" diff --git a/examples/window-app/silabs/efr32/openthread.gn b/examples/window-app/silabs/efr32/openthread.gn new file mode 100644 index 00000000000000..b05216fc9d7eae --- /dev/null +++ b/examples/window-app/silabs/efr32/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/window-app/silabs/efr32/openthread.gni b/examples/window-app/silabs/efr32/openthread.gni new file mode 100644 index 00000000000000..94e060557576c6 --- /dev/null +++ b/examples/window-app/silabs/efr32/openthread.gni @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/src/platform/silabs/efr32/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +app_data_model = "${chip_root}/examples/window-app/common:window-common" +chip_enable_ota_requestor = true +chip_enable_openthread = true + +use_base_app = false + +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/scripts/examples/gn_efr32_example.sh b/scripts/examples/gn_efr32_example.sh index 8f2221e694bb6a..a37f6c1aad3015 100755 --- a/scripts/examples/gn_efr32_example.sh +++ b/scripts/examples/gn_efr32_example.sh @@ -37,6 +37,8 @@ USE_SLC=false GN_PATH=gn GN_PATH_PROVIDED=false +DOTFILE=".gn" + SILABS_THREAD_TARGET=\""../silabs:ot-efr32-cert"\" USAGE="./scripts/examples/gn_efr32_example.sh []" @@ -149,109 +151,112 @@ else shift while [ $# -gt 0 ]; do case $1 in - --clean) - DIR_CLEAN=true - shift - ;; - --wifi) - if [ -z "$2" ]; then - echo "--wifi requires rs9116 or SiWx917 or wf200" - exit 1 - fi - if [ "$2" = "rs9116" ]; then - optArgs+="use_rs9116=true " - elif [ "$2" = "SiWx917" ]; then - optArgs+="use_SiWx917=true " - elif [ "$2" = "wf200" ]; then - optArgs+="use_wf200=true " - else - echo "Wifi usage: --wifi rs9116|SiWx917|wf200" - exit 1 - fi - USE_WIFI=true - shift - shift - ;; - --sed) - optArgs+="enable_sleepy_device=true chip_openthread_ftd=false " - shift - ;; - --low-power) - optArgs+="chip_build_libshell=false enable_openthread_cli=false show_qr_code=false disable_lcd=true " - shift - ;; - --chip_enable_wifi_ipv4) - ipArgs="chip_enable_wifi_ipv4=true chip_inet_config_enable_ipv4=true " - shift - ;; - --additional_data_advertising) - optArgs+="chip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true " - shift - ;; - --use_ot_lib) - optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" " - shift - ;; - --use_ot_coap_lib) - optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" use_thread_coap_lib=true " - shift - ;; - --use_chip_lwip_lib) - optArgs+="lwip_root=\""//third_party/connectedhomeip/third_party/lwip"\" " - shift - ;; - # Option not to be used until ot-efr32 github is updated - # --use_ot_github_sources) - # optArgs+="openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread\" openthread_efr32_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/src/src\"" - # shift - # ;; - --release) - optArgs+="is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false " - shift - ;; - --docker) - optArgs+="efr32_sdk_root=\"$GSDK_ROOT\" " - USE_DOCKER=true - shift - ;; - --uart_log) - optArgs+="sl_uart_log_output=true " - shift - ;; + --clean) + DIR_CLEAN=true + shift + ;; + --wifi) + if [ -z "$2" ]; then + echo "--wifi requires rs9116 or SiWx917 or wf200" + exit 1 + fi + if [ "$2" = "rs9116" ]; then + optArgs+="use_rs9116=true " + elif [ "$2" = "SiWx917" ]; then + optArgs+="use_SiWx917=true " + elif [ "$2" = "wf200" ]; then + optArgs+="use_wf200=true " + else + echo "Wifi usage: --wifi rs9116|SiWx917|wf200" + exit 1 + fi + USE_WIFI=true + optArgs+="chip_device_platform =\"efr32\" " + shift + shift + ;; + --sed) + optArgs+="enable_sleepy_device=true chip_openthread_ftd=false " + shift + ;; + --low-power) + optArgs+="chip_build_libshell=false enable_openthread_cli=false show_qr_code=false disable_lcd=true " + shift + ;; + --chip_enable_wifi_ipv4) + optArgs="chip_enable_wifi_ipv4=true chip_inet_config_enable_ipv4=true " + shift + ;; + --additional_data_advertising) + optArgs+="chip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true " + shift + ;; + --use_ot_lib) + optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" " + shift + ;; + --use_ot_coap_lib) + optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" use_thread_coap_lib=true " + shift + ;; + --use_chip_lwip_lib) + optArgs+="lwip_root=\""//third_party/connectedhomeip/third_party/lwip"\" " + shift + ;; + # Option not to be used until ot-efr32 github is updated + # --use_ot_github_sources) + # optArgs+="openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread\" openthread_efr32_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/src/src\"" + # shift + # ;; + --release) + optArgs+="is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false " + shift + ;; + --docker) + optArgs+="efr32_sdk_root=\"$GSDK_ROOT\" " + USE_DOCKER=true + shift + ;; + --uart_log) + optArgs+="sl_uart_log_output=true " + shift + ;; - --slc_generate) - optArgs+="slc_generate=true " - USE_SLC=true - shift - ;; - --slc_reuse_files) - optArgs+="slc_reuse_files=true " - USE_SLC=true - shift - ;; - --gn_path) - if [ -z "$2" ]; then - echo "--gn_path requires a path to GN" - exit 1 - else - GN_PATH="$2" - fi - GN_PATH_PROVIDED=true - shift - shift - ;; - *"sl_matter_version_str="*) - optArgs+="$1 " - USE_GIT_SHA_FOR_VERSION=false - shift - ;; - *) - if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then - USE_WIFI=true - fi - optArgs+=$1" " - shift - ;; + --slc_generate) + optArgs+="slc_generate=true " + USE_SLC=true + shift + ;; + --slc_reuse_files) + optArgs+="slc_reuse_files=true " + USE_SLC=true + shift + ;; + --gn_path) + if [ -z "$2" ]; then + echo "--gn_path requires a path to GN" + exit 1 + else + GN_PATH="$2" + fi + GN_PATH_PROVIDED=true + shift + shift + ;; + *"sl_matter_version_str="*) + optArgs+="$1 " + USE_GIT_SHA_FOR_VERSION=false + shift + ;; + *) + if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then + USE_WIFI=true + # NCP Mode so base MCU is an EFR32 + optArgs+="chip_device_platform =\"efr32\" " + fi + optArgs+=$1" " + shift + ;; esac done @@ -260,6 +265,13 @@ else exit 1 fi + # 917 exception. TODO find a more generic way + if [ "$SILABS_BOARD" == "BRD4325B" ]; then + echo "Compiling for 917 WiFi SOC" + USE_WIFI=true + optArgs+="chip_device_platform =\"SiWx917\" " + fi + if [ "$USE_GIT_SHA_FOR_VERSION" == true ]; then { ShortCommitSha=$(git describe --always --dirty --exclude '*') @@ -288,24 +300,17 @@ else fi if [ "$USE_WIFI" == true ]; then - # wifi build - # NCP mode EFR32 + wifi module - optArgs+="$ipArgs" - "$GN_PATH" gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR" + DOTFILE="$ROOT/build_for_wifi_gnfile.gn" else - # OpenThread/SoC build - # - if [ "$USE_DOCKER" == true ]; then - optArgs+="openthread_root=\"$GSDK_ROOT/util/third_party/openthread\" " - fi + DOTFILE="$ROOT/openthread.gn" + fi - if [ -z "$optArgs" ]; then - "$GN_PATH" gen --check --script-executable="$PYTHON_PATH" --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\"" "$BUILD_DIR" - else - "$GN_PATH" gen --check --script-executable="$PYTHON_PATH" --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR" - fi + if [ "$USE_DOCKER" == true ]; then + optArgs+="openthread_root=\"$GSDK_ROOT/util/third_party/openthread\" " fi + "$GN_PATH" gen --check --script-executable="$PYTHON_PATH" --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$DOTFILE" --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR" + if [ "$USE_SLC" == true ]; then # Activation needs to be after SLC generation which is done in gn gen. # Zap generation requires activation and is done in the build phase diff --git a/src/platform/silabs/SiWx917/args.gni b/src/platform/silabs/SiWx917/args.gni deleted file mode 100644 index 63c70b25e3d57b..00000000000000 --- a/src/platform/silabs/SiWx917/args.gni +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/build.gni") -import("//build_overrides/chip.gni") -import("//build_overrides/efr32_sdk.gni") -import("//build_overrides/pigweed.gni") - -import("${chip_root}/examples/platform/silabs/SiWx917/args.gni") -import("${chip_root}/src/crypto/crypto.gni") - -# ARM architecture flags will be set based on silabs_family. -arm_platform_config = "${efr32_sdk_build_root}/silabs_arm.gni" - -mbedtls_target = "${efr32_sdk_build_root}:efr32_sdk" - -chip_crypto = "platform" - -# Transitional CommissionableDataProvider not used anymore -# examples/platform/silabs/SilabsDeviceDataProvider is now used. -chip_use_transitional_commissionable_data_provider = false - -# Use GSDK lwip instead of CHIP -lwip_root = "${efr32_sdk_build_root}" - -#lwip_platform = "external" -lwip_platform = "silabs" -lwip_ipv6 = true -lwip_ipv4 = true -lwip_api = true -lwip_ethernet = true - -chip_device_platform = "SiWx917" -chip_enable_wifi = true -chip_enable_openthread = false -chip_inet_config_enable_ipv4 = true -chip_inet_config_enable_dns_resolver = false -chip_inet_config_enable_tcp_endpoint = true - -chip_build_tests = false -chip_config_memory_management = "platform" -chip_mdns = "minimal" -chip_enable_pw_rpc = false diff --git a/src/platform/silabs/SiWx917/wifi_args.gni b/src/platform/silabs/SiWx917/wifi_args.gni deleted file mode 100644 index f3439f70062766..00000000000000 --- a/src/platform/silabs/SiWx917/wifi_args.gni +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/build.gni") -import("//build_overrides/chip.gni") -import("//build_overrides/efr32_sdk.gni") -import("//build_overrides/pigweed.gni") - -import("${chip_root}/examples/platform/silabs/SiWx917/args.gni") -import("${chip_root}/src/crypto/crypto.gni") - -# ARM architecture flags will be set based on silabs_family. -arm_platform_config = "${efr32_sdk_build_root}/efr32_arm.gni" - -mbedtls_target = "${efr32_sdk_build_root}:efr32_sdk" - -chip_crypto = "mbedtls" - -# Transitional CommissionableDataProvider not used anymore -# examples/platform/silabs/SilabsDeviceDataProvider is now used. -chip_use_transitional_commissionable_data_provider = false - -lwip_platform = "silabs" - -# Use GSDK lwip instead of CHIP -lwip_root = "${efr32_sdk_build_root}" - -lwip_ipv6 = true -lwip_ipv4 = true -lwip_api = true -lwip_ethernet = true - -chip_device_platform = "SiWx917" -chip_enable_openthread = false - -chip_inet_config_enable_ipv4 = false -chip_inet_config_enable_dns_resolver = false -chip_inet_config_enable_tcp_endpoint = true - -chip_build_tests = false -chip_config_memory_management = "platform" -chip_mdns = "minimal" -chip_enable_pw_rpc = false diff --git a/src/platform/silabs/efr32/args.gni b/src/platform/silabs/efr32/args.gni index 99bb92b9ec6372..ad124dec8e63c0 100644 --- a/src/platform/silabs/efr32/args.gni +++ b/src/platform/silabs/efr32/args.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/efr32_sdk.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/examples/platform/silabs/efr32/args.gni") +import("${chip_root}/examples/platform/silabs/args.gni") import("${chip_root}/src/crypto/crypto.gni") # ARM architecture flags will be set based on silabs_family. diff --git a/src/platform/silabs/efr32/wifi_args.gni b/src/platform/silabs/wifi_args.gni similarity index 93% rename from src/platform/silabs/efr32/wifi_args.gni rename to src/platform/silabs/wifi_args.gni index fac4f4ff6103f7..7f1df3908569ec 100644 --- a/src/platform/silabs/efr32/wifi_args.gni +++ b/src/platform/silabs/wifi_args.gni @@ -17,7 +17,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/efr32_sdk.gni") import("//build_overrides/pigweed.gni") -import("${chip_root}/examples/platform/silabs/efr32/args.gni") +import("${chip_root}/examples/platform/silabs/args.gni") import("${chip_root}/src/crypto/crypto.gni") # ARM architecture flags will be set based on silabs_family. @@ -34,17 +34,18 @@ if (chip_crypto == "") { # examples/platform/silabs/SilabsDeviceDataProvider is now used. chip_use_transitional_commissionable_data_provider = false -lwip_platform = "silabs" - # Use GSDK lwip instead of CHIP lwip_root = "${efr32_sdk_build_root}" +#lwip_platform = "external" +lwip_platform = "silabs" lwip_ipv6 = true -lwip_ipv4 = true +lwip_ipv4 = false lwip_api = true lwip_ethernet = true -chip_device_platform = "efr32" + +chip_enable_wifi = true chip_enable_openthread = false chip_inet_config_enable_ipv4 = false diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index 4f8910d8e4a31e..2ef6653a0181e2 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -15,10 +15,10 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") -import("${chip_root}/examples/platform/silabs/efr32/args.gni") +import("${chip_root}/examples/platform/silabs/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") -efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true cpp_standard = "gnu++17" diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index dd967ce5bdc775..7c506cee82a1d6 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -26,8 +26,8 @@ if (silabs_board == "BRD4325B") { # CCP board declare_args() { # Build target to use for efr32 SDK. Use this to set global SDK defines. - efr32_sdk_target = "" - siwx917_sdk_target = "" + silabs_sdk_target = "" + silabs_sdk_target = "" use_thread_coap_lib = false sl_matter_version_str = "" @@ -48,20 +48,13 @@ config("silabs_config") { } } -if (silabs_board == "BRD4325B") { # CCP board - assert(siwx917_sdk_target != "", "siwx917_sdk_target must be specified") - group("efr32_sdk") { - public_deps = [ siwx917_sdk_target ] - public_configs = [ ":silabs_config" ] - } -} else { - assert(efr32_sdk_target != "", "efr32_sdk_target must be specified") - group("efr32_sdk") { - public_deps = [ efr32_sdk_target ] - public_configs = [ ":silabs_config" ] - } +assert(silabs_sdk_target != "", "silabs_sdk_target must be specified") +group("efr32_sdk") { + public_deps = [ silabs_sdk_target ] + public_configs = [ ":silabs_config" ] } + if (silabs_board != "BRD4325B") { # CCP board # Openthread GSDK libraries configurations if (use_silabs_thread_lib) { diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index 13fe8c987870b1..09dedcb4885074 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -115,7 +115,7 @@ template("siwx917_sdk") { defines += [ "ENABLE_CHIP_SHELL" ] } - import("${chip_root}/src/platform/silabs/SiWx917/args.gni") + import("${chip_root}/src/platform/silabs/wifi_args.gni") defines += [ "LWIP_NETIF_API=1" ] if (lwip_ipv4) { defines += [ diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 507fde96fee71a..5b5d4f214e728b 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -278,7 +278,7 @@ template("efr32_sdk") { } if (use_wf200 || use_rs9116 || use_SiWx917) { - import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") + import("${chip_root}/src/platform/silabs/wifi_args.gni") defines += [ "LWIP_NETIF_API=1" ] if (chip_enable_wifi_ipv4) { diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index 0e5f264b98d10b..bba3f060f8898d 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -36,6 +36,8 @@ declare_args() { use_SiWx917 = false chip_enable_ble_rs911x = false + wifi_soc = false + #Disable MQTT by default enable_dic = false @@ -99,6 +101,7 @@ if (silabs_board == "BRD4304A") { silabs_mcu = "EFR32MG12P432F1024GL125" disable_lcd = true show_qr_code = false + wifi_soc = true } else if (silabs_board == "BRD4180A") { assert( false,