diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index f9b247af85b5e8..17c089ef099dfa 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -110,12 +110,12 @@ jobs: out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out - - name: Build example EFR32+RS911x WiFi Lighting app for BRD4161A + - name: Build example EFR32+RS9116 WiFi Lighting app for BRD4161A timeout-minutes: 15 run: | - scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs911x lighting-app \ - out/lighting_app_wifi_rs911x/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ + scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs9116 lighting-app \ + out/lighting_app_wifi_rs9116/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out - name: Uploading Size Reports diff --git a/examples/light-switch-app/silabs/SiWx917/BUILD.gn b/examples/light-switch-app/silabs/SiWx917/BUILD.gn index a45c2d7a391ece..793cf64f5f7c44 100644 --- a/examples/light-switch-app/silabs/SiWx917/BUILD.gn +++ b/examples/light-switch-app/silabs/SiWx917/BUILD.gn @@ -67,10 +67,10 @@ declare_args() { # Sanity check assert(!(chip_enable_wifi && chip_enable_openthread)) -assert(!(use_rs911x && chip_enable_openthread)) +assert(!(use_SiWx917 && chip_enable_openthread)) assert(!(use_wf200 && chip_enable_openthread)) if (chip_enable_wifi) { - assert(use_rs911x || use_wf200) + assert(use_SiWx917 || use_wf200) enable_openthread_cli = false import("${chip_root}/src/platform/silabs/SiWx917/wifi_args.gni") } @@ -122,7 +122,6 @@ if (chip_enable_wifi) { efr32_lwip_defs += [ "LWIP_IPV6=0" ] } - wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" import("${examples_plat_dir}/SiWx917/rs911x.gni") } @@ -155,7 +154,7 @@ efr32_sdk("sdk") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { defines += rs911x_defs include_dirs += rs911x_plat_incs } else if (use_wf200) { @@ -204,7 +203,7 @@ efr32_executable("light_switch_app") { } if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli || - use_wf200 || use_rs911x) { + use_wf200 || use_SiWx917) { #sources += [ "${examples_plat_dir}/uart.cpp" ] } @@ -234,7 +233,7 @@ efr32_executable("light_switch_app") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { sources += rs911x_src_plat # All the stuff from wiseconnect diff --git a/examples/lighting-app/silabs/SiWx917/BUILD.gn b/examples/lighting-app/silabs/SiWx917/BUILD.gn index d98d0a80b23388..bedb907cdc30c3 100644 --- a/examples/lighting-app/silabs/SiWx917/BUILD.gn +++ b/examples/lighting-app/silabs/SiWx917/BUILD.gn @@ -67,10 +67,10 @@ declare_args() { # Sanity check assert(!(chip_enable_wifi && chip_enable_openthread)) -assert(!(use_rs911x && chip_enable_openthread)) +assert(!(use_SiWx917 && chip_enable_openthread)) assert(!(use_wf200 && chip_enable_openthread)) if (chip_enable_wifi) { - assert(use_rs911x || use_wf200) + assert(use_SiWx917 || use_wf200) enable_openthread_cli = false import("${chip_root}/src/platform/silabs/SiWx917/wifi_args.gni") } @@ -128,7 +128,6 @@ if (chip_enable_wifi) { efr32_lwip_defs += [ "LWIP_IPV6=0" ] } - wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" import("${examples_plat_dir}/SiWx917/rs911x.gni") } @@ -160,7 +159,7 @@ efr32_sdk("sdk") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { defines += rs911x_defs include_dirs += rs911x_plat_incs } else if (use_wf200) { @@ -207,7 +206,7 @@ efr32_executable("lighting_app") { sources += [ "${examples_plat_dir}/LEDWidget.cpp" ] } - if (chip_enable_pw_rpc || chip_build_libshell || use_rs911x) { + if (chip_enable_pw_rpc || chip_build_libshell || use_SiWx917) { # TODO: Commentting for CCP till the bring up of this is done #sources += [ "${examples_plat_dir}/uart.cpp" ] } @@ -233,7 +232,7 @@ efr32_executable("lighting_app") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { sources += rs911x_src_plat # All the stuff from wiseconnect diff --git a/examples/lock-app/silabs/SiWx917/BUILD.gn b/examples/lock-app/silabs/SiWx917/BUILD.gn index c2cbe6e06ebb59..c02458d38f86b2 100644 --- a/examples/lock-app/silabs/SiWx917/BUILD.gn +++ b/examples/lock-app/silabs/SiWx917/BUILD.gn @@ -67,10 +67,10 @@ declare_args() { # Sanity check assert(!(chip_enable_wifi && chip_enable_openthread)) -assert(!(use_rs911x && chip_enable_openthread)) +assert(!(use_SiWx917 && chip_enable_openthread)) assert(!(use_wf200 && chip_enable_openthread)) if (chip_enable_wifi) { - assert(use_rs911x || use_wf200) + assert(use_SiWx917 || use_wf200) enable_openthread_cli = false import("${chip_root}/src/platform/silabs/SiWx917/wifi_args.gni") } @@ -121,8 +121,6 @@ if (chip_enable_wifi) { } else { efr32_lwip_defs += [ "LWIP_IPV6=0" ] } - - wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" import("${examples_plat_dir}/SiWx917/rs911x.gni") } @@ -154,7 +152,7 @@ efr32_sdk("sdk") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { defines += rs911x_defs include_dirs += rs911x_plat_incs } else if (use_wf200) { @@ -201,7 +199,7 @@ efr32_executable("lock_app") { } if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli || - use_wf200 || use_rs911x) { + use_wf200 || use_SiWx917) { #sources += [ "${examples_plat_dir}/uart.cpp" ] } @@ -236,7 +234,7 @@ efr32_executable("lock_app") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { sources += rs911x_src_plat # All the stuff from wiseconnect diff --git a/examples/platform/silabs/SiWx917/SiWx917/rs911x.gni b/examples/platform/silabs/SiWx917/SiWx917/rs911x.gni index 7730c98efc5bd8..15480cc0b191fe 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/rs911x.gni +++ b/examples/platform/silabs/SiWx917/SiWx917/rs911x.gni @@ -4,7 +4,7 @@ import("//build_overrides/pigweed.gni") examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" wifi_sdk_dir = "${chip_root}/src/platform/silabs/SiWx917/wifi" -wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" +wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" rs911x_cflags = [] rs911x_src_plat = [ @@ -15,60 +15,58 @@ rs911x_src_plat = [ "${examples_plat_dir}/SiWx917/hal/rsi_hal_mcu_timer.c", "${examples_plat_dir}/SiWx917/hal/rsi_hal_mcu_platform_init.c", "${examples_plat_dir}/SiWx917/hal/rsi_hal_mcu_m4.c", - - "${wiseconnect_sdk_root}/platforms/si91x/hal/src/rsi_bootup_config.c", - "${wiseconnect_sdk_root}/platforms/si91x/hal/src/rsi_hal_mcu_m4_rom.c", - "${wiseconnect_sdk_root}/platforms/si91x/hal/src/rsi_hal_mcu_interrupt.c", + "${wisemcu_sdk_root}/platforms/si91x/hal/src/rsi_bootup_config.c", + "${wisemcu_sdk_root}/platforms/si91x/hal/src/rsi_hal_mcu_m4_rom.c", + "${wisemcu_sdk_root}/platforms/si91x/hal/src/rsi_hal_mcu_interrupt.c", ] rs911x_plat_incs = [ "${wifi_sdk_dir}", "${wifi_sdk_dir}/hal", - "${wiseconnect_sdk_root}/platforms/si91x/hal/inc", + "${wisemcu_sdk_root}/platforms/si91x/hal/inc", - # "${wiseconnect_sdk_root}/sapi/include", "${chip_root}/src/platform/silabs/SiWx917", "${chip_root}/src/platform/silabs/SiWx917/bluetooth", "${examples_plat_dir}/SiWx917", - "${wiseconnect_sdk_root}/platforms/si91x/hal/inc", + "${wisemcu_sdk_root}/platforms/si91x/hal/inc", ] # # All the stuff from wiseconnect # rs911x_src_sapi = [ - "${wiseconnect_sdk_root}/sapi/wlan/rsi_wlan_apis.c", - "${wiseconnect_sdk_root}/sapi/common/rsi_apis_non_rom.c", - "${wiseconnect_sdk_root}/sapi/common/rsi_apis_rom.c", - "${wiseconnect_sdk_root}/sapi/common/rsi_common_apis.c", - "${wiseconnect_sdk_root}/sapi/common/rsi_device_init_apis.c", + "${wisemcu_sdk_root}/sapi/wlan/rsi_wlan_apis.c", + "${wisemcu_sdk_root}/sapi/common/rsi_apis_non_rom.c", + "${wisemcu_sdk_root}/sapi/common/rsi_apis_rom.c", + "${wisemcu_sdk_root}/sapi/common/rsi_common_apis.c", + "${wisemcu_sdk_root}/sapi/common/rsi_device_init_apis.c", - # "${wiseconnect_sdk_root}/sapi/common/rsi_wisemcu_hardware_setup.c", - "${wiseconnect_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_frame_rd_wr.c", - "${wiseconnect_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_functs.c", - "${wiseconnect_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_iface_init.c", - "${wiseconnect_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_mem_rd_wr.c", - "${wiseconnect_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_reg_rd_wr.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_common.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_device_init.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_driver_event_handlers.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_driver.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_events_rom.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_events.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_iap.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_nwk_rom.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_nwk.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_pkt_mgmt_rom.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_pkt_mgmt.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_queue_rom.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_queue.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_scheduler_rom.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_scheduler.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_setregion_countryinfo.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_timer.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_utils_rom.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_utils.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_wlan.c", - "${wiseconnect_sdk_root}/sapi/rtos/freertos_wrapper/rsi_os_wrapper.c", + # "${wisemcu_sdk_root}/sapi/common/rsi_wisemcu_hardware_setup.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_frame_rd_wr.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_functs.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_iface_init.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_mem_rd_wr.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_reg_rd_wr.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_common.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_device_init.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_driver_event_handlers.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_driver.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_events_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_events.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_iap.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_nwk_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_nwk.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_pkt_mgmt_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_pkt_mgmt.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_queue_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_queue.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_scheduler_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_scheduler.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_setregion_countryinfo.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_timer.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_utils_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_utils.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_wlan.c", + "${wisemcu_sdk_root}/sapi/rtos/freertos_wrapper/rsi_os_wrapper.c", ] foreach(src_file, rs911x_src_sapi) { @@ -89,28 +87,28 @@ rs911x_inc_plat = [ "${wifi_sdk_dir}", "${examples_plat_dir}/SiWx917", "${examples_plat_dir}/SiWx917/hal", - "${wiseconnect_sdk_root}/sapi/include", + "${wisemcu_sdk_root}/sapi/include", #CCP Platfrom - "${wiseconnect_sdk_root}/platforms/si91x/hal/inc", - "${wiseconnect_sdk_root}/platforms/si91x/boards/brd4325a/inc", - "${wiseconnect_sdk_root}/platforms/si91x/drivers/peripheral_drivers/inc", - "${wiseconnect_sdk_root}/platforms/si91x/drivers/systemlevel/inc", - "${wiseconnect_sdk_root}/platforms/si91x/core/chip/inc", - "${wiseconnect_sdk_root}/platforms/si91x/core/config", - "${wiseconnect_sdk_root}/platforms/si91x/drivers/cmsis_driver/config", - "${wiseconnect_sdk_root}/platforms/si91x/drivers/rom_driver/inc", - "${wiseconnect_sdk_root}/platforms/si91x/drivers/cmsis_driver", - "${wiseconnect_sdk_root}/platforms/si91x/drivers/cmsis_driver/CMSIS/Driver/Include", + "${wisemcu_sdk_root}/platforms/si91x/hal/inc", + "${wisemcu_sdk_root}/platforms/si91x/boards/brd4325a/inc", + "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/inc", + "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/inc", + "${wisemcu_sdk_root}/platforms/si91x/core/chip/inc", + "${wisemcu_sdk_root}/platforms/si91x/core/config", + "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/config", + "${wisemcu_sdk_root}/platforms/si91x/drivers/rom_driver/inc", + "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver", + "${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/CMSIS/Driver/Include", - "${wiseconnect_sdk_root}/platforms/si91x/core/cmsis", - "${wiseconnect_sdk_root}/platforms/si91x/service/system/inc", + "${wisemcu_sdk_root}/platforms/si91x/core/cmsis", + "${wisemcu_sdk_root}/platforms/si91x/service/system/inc", ] # Apparently - the rsi library needs this rs911x_src_sock = [ - "${wiseconnect_sdk_root}/sapi/network/socket/rsi_socket.c", - "${wiseconnect_sdk_root}/sapi/network/socket/rsi_socket_rom.c", + "${wisemcu_sdk_root}/sapi/network/socket/rsi_socket.c", + "${wisemcu_sdk_root}/sapi/network/socket/rsi_socket_rom.c", ] rs911x_sock_inc = [ "${wifi_sdk_dir}/rsi-sockets" ] diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 7ae3c82e428991..7a249bff8edb21 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -49,20 +49,23 @@ import("${silabs_common_plat_dir}/efr32/args.gni") # Sanity check assert(!(chip_enable_wifi && chip_enable_openthread)) -assert(!(use_rs911x && chip_enable_openthread)) +assert(!(use_rs9116 && chip_enable_openthread)) +assert(!(use_SiWx917 && chip_enable_openthread)) assert(!(use_wf200 && chip_enable_openthread)) if (chip_enable_wifi) { - assert(use_rs911x || use_wf200) + assert(use_rs9116 || use_wf200 || use_SiWx917) enable_openthread_cli = false import("${chip_root}/src/platform/silabs/efr32/wifi_args.gni") - if (use_rs911x) { + if (use_rs9116) { wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" import("rs911x/rs911x.gni") + } else if (use_SiWx917) { + wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" + import("rs911x/rs9117.gni") } - if (use_wf200) { import("wf200/wf200.gni") } @@ -253,7 +256,7 @@ source_set("efr32-common") { } if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli || - use_wf200 || use_rs911x) { + use_wf200 || use_rs9116) { sources += [ "uart.cpp" ] } @@ -284,7 +287,7 @@ source_set("efr32-common") { } if (chip_enable_wifi) { - if (use_rs911x) { + if (use_rs9116 || use_SiWx917) { sources += rs911x_src_plat # All the stuff from wiseconnect diff --git a/examples/platform/silabs/efr32/rs911x/rs9117.gni b/examples/platform/silabs/efr32/rs911x/rs9117.gni new file mode 100644 index 00000000000000..8937441020900d --- /dev/null +++ b/examples/platform/silabs/efr32/rs911x/rs9117.gni @@ -0,0 +1,64 @@ +import("//build_overrides/chip.gni") + +examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi" +wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" + +rs911x_src_plat = [ + "${examples_plat_dir}/rs911x/rsi_if.c", + "${examples_plat_dir}/rs911x/wfx_rsi_host.c", + "${examples_plat_dir}/rs911x/hal/rsi_hal_mcu_interrupt.c", + "${examples_plat_dir}/rs911x/hal/rsi_hal_mcu_ioports.c", + "${examples_plat_dir}/rs911x/hal/rsi_hal_mcu_timer.c", + "${examples_plat_dir}/rs911x/hal/efx_spi.c", + "${wifi_sdk_dir}/wfx_notify.cpp", +] + +# +# All the stuff from wiseconnect +# +rs911x_src_sapi = [ + "${wisemcu_sdk_root}/sapi/wlan/rsi_wlan_apis.c", + "${wisemcu_sdk_root}/sapi/common/rsi_apis_non_rom.c", + "${wisemcu_sdk_root}/sapi/common/rsi_apis_rom.c", + "${wisemcu_sdk_root}/sapi/common/rsi_common_apis.c", + "${wisemcu_sdk_root}/sapi/common/rsi_device_init_apis.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_frame_rd_wr.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_functs.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_iface_init.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_mem_rd_wr.c", + "${wisemcu_sdk_root}/sapi/driver/device_interface/spi/rsi_spi_reg_rd_wr.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_common.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_device_init.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_driver_event_handlers.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_driver.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_events_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_events.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_iap.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_nwk_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_nwk.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_pkt_mgmt_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_pkt_mgmt.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_queue_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_queue.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_scheduler_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_scheduler.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_setregion_countryinfo.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_timer.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_utils_rom.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_utils.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_wlan.c", + "${wisemcu_sdk_root}/sapi/rtos/freertos_wrapper/rsi_os_wrapper.c", + + # Apparently - the rsi library needs this (though we may not use use it) + "${wisemcu_sdk_root}/sapi/network/socket/rsi_socket.c", + "${wisemcu_sdk_root}/sapi/network/socket/rsi_socket_rom.c", +] + +rs911x_cflags = [ "-Wno-empty-body" ] + +rs911x_inc_plat = [ + "${examples_plat_dir}/rs911x", + "${examples_plat_dir}/rs911x/hal", + "${wisemcu_sdk_root}/sapi/include", +] diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.c b/examples/platform/silabs/efr32/rs911x/rsi_if.c index fdeb534916aae2..3569c053601309 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -113,6 +113,10 @@ int32_t wfx_rsi_get_ap_info(wfx_wifi_scan_result_t * ap) *********************************************************************/ int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t * extra_info) { +#ifdef SiWx917_WIFI + // TODO: for wisemcu + return 0; +#else int32_t status; uint8_t buff[RSI_RESPONSE_MAX_SIZE] = { 0 }; status = rsi_wlan_get(RSI_WLAN_EXT_STATS, buff, sizeof(buff)); @@ -132,6 +136,7 @@ int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t * extra_info) extra_info->overrun_count = test->overrun_count - temp_reset->overrun_count; } return status; +#endif } /****************************************************************** @@ -144,6 +149,10 @@ int32_t wfx_rsi_get_ap_ext(wfx_wifi_scan_ext_t * extra_info) *********************************************************************/ int32_t wfx_rsi_reset_count() { +#ifdef SiWx917_WIFI + // TODO: for wisemcu + return 0; +#else int32_t status; uint8_t buff[RSI_RESPONSE_MAX_SIZE] = { 0 }; status = rsi_wlan_get(RSI_WLAN_EXT_STATS, buff, sizeof(buff)); @@ -163,6 +172,7 @@ int32_t wfx_rsi_reset_count() temp_reset->overrun_count = test->overrun_count; } return status; +#endif } /****************************************************************** diff --git a/examples/window-app/silabs/SiWx917/BUILD.gn b/examples/window-app/silabs/SiWx917/BUILD.gn index 1aa89a1e00be5a..db35f8de44dd35 100644 --- a/examples/window-app/silabs/SiWx917/BUILD.gn +++ b/examples/window-app/silabs/SiWx917/BUILD.gn @@ -61,10 +61,10 @@ declare_args() { # Sanity check assert(!(chip_enable_wifi && chip_enable_openthread)) -assert(!(use_rs911x && chip_enable_openthread)) +assert(!(use_SiWx917 && chip_enable_openthread)) assert(!(use_wf200 && chip_enable_openthread)) if (chip_enable_wifi) { - assert(use_rs911x || use_wf200) + assert(use_SiWx917 || use_wf200) enable_openthread_cli = false import("${chip_root}/src/platform/silabs/SiWx917/wifi_args.gni") } @@ -121,7 +121,6 @@ if (chip_enable_wifi) { efr32_lwip_defs += [ "LWIP_IPV6=0" ] } - wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" import("${examples_plat_dir}/SiWx917/rs911x.gni") } @@ -146,7 +145,7 @@ efr32_sdk("sdk") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { defines += rs911x_defs include_dirs += rs911x_plat_incs } else if (use_wf200) { @@ -196,7 +195,8 @@ efr32_executable("window_app") { sources += [ "${examples_plat_dir}/LEDWidget.cpp" ] } - if (chip_build_libshell || enable_openthread_cli || use_wf200 || use_rs911x) { + if (chip_build_libshell || enable_openthread_cli || use_wf200 || + use_SiWx917) { #sources += [ "${examples_plat_dir}/uart.cpp" ] } @@ -224,7 +224,7 @@ efr32_executable("window_app") { # WiFi Settings if (chip_enable_wifi) { - if (use_rs911x) { + if (use_SiWx917) { sources += rs911x_src_plat # All the stuff from wiseconnect diff --git a/scripts/examples/gn_efr32_example.sh b/scripts/examples/gn_efr32_example.sh index 1e7b9a30e5015c..efb474daeeb5cb 100755 --- a/scripts/examples/gn_efr32_example.sh +++ b/scripts/examples/gn_efr32_example.sh @@ -86,8 +86,10 @@ if [ "$#" == "0" ]; then Set a Matter sotfware version string for the Silabs examples Used and formatted by default in this script. To skip that formatting or use your own version string use --no-version - use_rs911x - Build wifi example with extension board rs911x. (Default false) + use_rs9116 + Build wifi example with extension board rs9116. (Default false) + use_SiWx917 + Build wifi example with extension board SiWx917. (Default false) use_wf200 Build wifi example with extension board wf200. (Default false) 'import("//with_pw_rpc.gni")' @@ -103,7 +105,7 @@ if [ "$#" == "0" ]; then --low-power disables all power consuming features for the most power efficient build This flag is to be used with --sed - --wifi + --wifi build wifi example variant for given exansion board --additional_data_advertising enable Addition data advertissing and rotating device ID @@ -135,15 +137,17 @@ else case $1 in --wifi) if [ -z "$2" ]; then - echo "--wifi requires rs911x or wf200" + echo "--wifi requires rs9116 or SiWx917 or wf200" exit 1 fi - if [ "$2" = "rs911x" ]; then - optArgs+="use_rs911x=true " + 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 rs911x|wf200" + echo "Wifi usage: --wifi rs9116|SiWx917|wf200" exit 1 fi USE_WIFI=true @@ -188,7 +192,7 @@ else shift ;; *) - if [ "$1" =~ *"use_rs911x=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then + if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then USE_WIFI=true fi diff --git a/src/platform/silabs/efr32/BUILD.gn b/src/platform/silabs/efr32/BUILD.gn index 1bb87672f493cc..56a94fc83ab8fc 100644 --- a/src/platform/silabs/efr32/BUILD.gn +++ b/src/platform/silabs/efr32/BUILD.gn @@ -36,7 +36,7 @@ config("efr32-platform-wifi-config") { include_dirs = [ "wifi" ] defines = [] - if (use_rs911x && use_rs911x_sockets) { + if (use_rs9116 && use_rs911x_sockets) { include_dirs += [ "wifi/rsi-sockets" ] defines += [ "RS911X_SOCKETS", diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index 1d931656eac707..2dce2a3b144224 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/jlink.gni") import("${chip_root}/src/platform/device.gni") import("${efr32_sdk_build_root}/silabs_board.gni") -if (silabs_board == "BRD4325A") { # CCP board +if (silabs_board == "BRD4325B") { # CCP board import("${efr32_sdk_build_root}/SiWx917_sdk.gni") } else { import("${efr32_sdk_build_root}/efr32_sdk.gni") diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index c01bef488d55e1..1c1af73ad6e1eb 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -24,8 +24,7 @@ declare_args() { # Location of the efr32 SDK. efr32_sdk_root = "${chip_root}/third_party/silabs/gecko_sdk" sdk_support_root = "${chip_root}/third_party/silabs/matter_support" - wiseconnect_sdk_root = - "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" + wisemcu_sdk_root = "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk" examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" @@ -89,7 +88,7 @@ template("efr32_sdk") { "${wisemcu_sdk_root}/third_party/freertos/portable/GCC/ARM_CM4F", "${examples_plat_dir}/device/inc", - "${wiseconnect_sdk_root}/sapi/include", + "${wisemcu_sdk_root}/sapi/include", "${chip_root}/examples/platform/SiWx917/SiWx917", "${chip_root}/examples/platform/SiWx917/SiWx917/hal", @@ -211,8 +210,8 @@ template("efr32_sdk") { cflags += [ "-mcmse" ] } - if (defined(invoker.use_rs911x)) { - if (invoker.use_rs911x == true) { + if (defined(invoker.use_SiWx917)) { + if (invoker.use_SiWx917 == true) { #add compilation flags for rs991x build. This will be addressed directly in wiseconnect sdk in the next version release of that sdk cflags += invoker.rs911x_cflags } @@ -257,10 +256,6 @@ template("efr32_sdk") { "${wisemcu_sdk_root}/platforms/si91x/core/chip/src/system_RS1xxxx.c", # Bluetooth - "${wiseconnect_sdk_root}/sapi/bluetooth/rsi_ble_gap_apis.c", - "${wiseconnect_sdk_root}/sapi/bluetooth/rsi_ble_gatt_apis.c", - "${wiseconnect_sdk_root}/sapi/bluetooth/rsi_bt_common_apis.c", - "${wiseconnect_sdk_root}/sapi/driver/rsi_bt_ble.c", "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/clock_update.c", "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/rsi_comparator.c", "${wisemcu_sdk_root}/platforms/si91x/drivers/peripheral_drivers/src/rsi_egpio.c", @@ -276,6 +271,10 @@ template("efr32_sdk") { "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_time_period.c", "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_ulpss_clk.c", "${wisemcu_sdk_root}/platforms/si91x/drivers/systemlevel/src/rsi_wwdt.c", + "${wisemcu_sdk_root}/sapi/bluetooth/rsi_ble_gap_apis.c", + "${wisemcu_sdk_root}/sapi/bluetooth/rsi_ble_gatt_apis.c", + "${wisemcu_sdk_root}/sapi/bluetooth/rsi_bt_common_apis.c", + "${wisemcu_sdk_root}/sapi/driver/rsi_bt_ble.c", "${wisemcu_sdk_root}/third_party/freertos/croutine.c", "${wisemcu_sdk_root}/third_party/freertos/event_groups.c", "${wisemcu_sdk_root}/third_party/freertos/list.c", diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 2ce7c9fb19d6e8..e837b9cd4987fc 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -192,13 +192,14 @@ template("efr32_sdk") { ] if (defined(invoker.chip_enable_wifi) && invoker.chip_enable_wifi) { - if (use_rs911x) { + if (use_rs9116 || use_SiWx917) { defines += [ "SL_HEAP_SIZE=32768", "SL_WIFI=1", "SL_WFX_USE_SPI", "EFX32_RS911X=1", "RS911X_WIFI", + "SiWx917_WIFI", "RSI_WLAN_ENABLE", "RSI_SPI_INTERFACE", "RSI_WITH_OS", diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index eb6d674894b243..a97c1144d02167 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -32,7 +32,8 @@ declare_args() { # WIFI rcp boards options for wifi apps. use_wf200 = false - use_rs911x = false + use_rs9116 = false + use_SiWx917 = false use_rs911x_sockets = false } @@ -87,7 +88,7 @@ if (silabs_board == "BRD4304A") { } else if (silabs_board == "BRD4170A") { silabs_family = "efr32mg12" silabs_mcu = "EFR32MG12P433F1024GM68" -} else if (silabs_board == "BRD4325A") { +} else if (silabs_board == "BRD4325B") { silabs_family = "SiWx917" silabs_mcu = "EFR32MG12P432F1024GL125" disable_lcd = true