blob: f11981023e35f2797a5827a35370ce2237aeecde [file] [log] [blame]
import("//build_overrides/chip.gni")
import("//build_overrides/efr32_sdk.gni")
import("//build_overrides/pigweed.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi"
wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk"
rs911x_cflags = []
rs911x_src_plat = [
"${examples_plat_dir}/rs911x/rsi_if.c",
"${examples_plat_dir}/rs911x/wfx_rsi_host.c",
"${wifi_sdk_dir}/wfx_notify.cpp",
"${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",
]
rs911x_plat_incs = [
"${wifi_sdk_dir}",
"${wifi_sdk_dir}/hal",
"${chip_root}/src/platform/EFR32",
]
#
# 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",
"${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",
]
foreach(src_file, rs911x_src_sapi) {
rs911x_cflags += [ "-Wno-empty-body" ]
}
rs911x_inc_plat = [
"${wifi_sdk_dir}",
"${examples_plat_dir}/rs911x",
"${examples_plat_dir}/rs911x/hal",
"${wiseconnect_sdk_root}/sapi/include",
]
# 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",
]
rs911x_sock_inc = [ "${wifi_sdk_dir}/rsi-sockets" ]
#
# If we use LWIP - not built-in sockets
#
rs911x_src_lwip = [
"${wifi_sdk_dir}/ethernetif.cpp",
"${wifi_sdk_dir}/dhcp_client.cpp",
"${wifi_sdk_dir}/lwip_netif.cpp",
]
rs911x_defs = [
"SL_HEAP_SIZE=32768",
"SL_WIFI=1",
"SL_WFX_USE_SPI",
"EFX32_RS911X=1",
"RS911X_WIFI",
"RSI_WLAN_ENABLE",
"RSI_SPI_INTERFACE",
"RSI_WITH_OS",
]
rs911x_sock_defs = [
"RS911X_SOCKETS",
"RSI_IPV6_ENABLE",
]