Skip to content

Commit

Permalink
[Silabs] EFR32+9117 NCP Modifications and Radio Board Modifications (#…
Browse files Browse the repository at this point in the history
…24843)

* Build 917 NCP Using Wisemcu SDK Package

* Renaming of SiWx917 Radio Board

* Renaming Wiseconnect variable name to Wisemcu for SiWx917 SOC Radio Board

* Renaming rs911x to rs9116

* Modified workflows of github for RS9116

* Added RS9117 Build option in EFR32 Script

* Modified rs911x to rs9117 for SiWx917 Board

* Renaming rs9117 SOC to SiWx917

* Modified 917 NCP name to SiWx917

* Modified gni file for 917 NCP Board

* applied restyle

* Added in one condition for rs9116 and SiWx917 NCP

---------

Co-authored-by: srningap <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Oct 13, 2023
1 parent efef4af commit 3761781
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 112 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions examples/light-switch-app/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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")
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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" ]
}

Expand Down Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions examples/lighting-app/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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")
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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" ]
}
Expand All @@ -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
Expand Down
12 changes: 5 additions & 7 deletions examples/lock-app/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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")
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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" ]
}

Expand Down Expand Up @@ -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
Expand Down
108 changes: 53 additions & 55 deletions examples/platform/silabs/SiWx917/SiWx917/rs911x.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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) {
Expand All @@ -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" ]

Expand Down
15 changes: 9 additions & 6 deletions examples/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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" ]
}

Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 3761781

Please sign in to comment.