Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion subsys/net/lib/nrf70_fw_ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,45 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

if(NOT CONFIG_NRF_WIFI_PATCHES_BUILTIN)
if(CONFIG_NRF_WIFI_BUILD_ONLY_MODE)
return()
endif()

if(CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_DISABLED)
# The C source is same as that for built-in
zephyr_library_sources(${ZEPHYR_BASE}/drivers/wifi/nrfwifi/src/fw_load.c)
else()
zephyr_library_sources(ext_fw_load.c)
if(CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP)
# Run patches from the external flash (XIP). No need to copy.
zephyr_code_relocate(FILES ext_fw_load.c LOCATION EXTFLASH_RODATA NOCOPY)
endif()
endif()

if(DEFINED CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_DISABLED OR
DEFINED CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP)
# NCS doesn't rely on hal_nordic blobs for nRF70 device driver
set(FW_BINS_BASE ${ZEPHYR_NRFXLIB_MODULE_DIR}/nrf_wifi/ncs_fw_blobs)
# RPU FW patch binaries based on the selected configuration
if(CONFIG_NRF70_SYSTEM_MODE)
set(NRF70_PATCH ${FW_BINS_BASE}/default/nrf70.bin)
elseif(CONFIG_NRF70_RADIO_TEST)
set(NRF70_PATCH ${FW_BINS_BASE}/radio_test/nrf70.bin)
elseif(CONFIG_NRF70_SCAN_ONLY)
set(NRF70_PATCH ${FW_BINS_BASE}/scan_only/nrf70.bin)
elseif (CONFIG_NRF70_SYSTEM_WITH_RAW_MODES)
set(NRF70_PATCH ${FW_BINS_BASE}/system_with_raw/nrf70.bin)
else()
# Error
message(FATAL_ERROR "Unsupported nRF70 patch configuration")
endif()

set(gen_inc_dir ${ZEPHYR_BINARY_DIR}/misc/generated)
zephyr_include_directories(${gen_inc_dir})
set(gen_dir ${gen_inc_dir}/nrf70_fw_patch)
generate_inc_file_for_target(
nrfwifi
${NRF70_PATCH}
${gen_dir}/nrf70.bin.inc
)
endif()
11 changes: 8 additions & 3 deletions subsys/net/lib/nrf70_fw_ext/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

if WIFI_NRF70 && !NRF_WIFI_BUILD_ONLY_MODE
if WIFI_NRF70

# NCS always uses the external handling of the nRF70 FW patches
choice NRF_WIFI_FW_BLOB_HANDLING
default NRF_WIFI_PATCHES_EXTERNAL
endchoice

choice NRF_WIFI_PATCHES_EXT_FLASH_SUPPORT
bool "Store nRF700x FW patches in external flash"
prompt "Store nRF700x FW patches in external flash"
default NRF_WIFI_PATCHES_EXT_FLASH_DISABLED
help
Select this option to store nRF700x FW patches in external flash.
This option helps to reduce the code memory size of the application, but
requires external memory to be available for storing the FW patches.

config NRF_WIFI_PATCHES_EXT_FLASH_DISABLED
bool "Store nRF700x FW patches in RAM"
select NRF_WIFI_PATCHES_BUILTIN

config NRF_WIFI_PATCHES_EXT_FLASH_XIP
bool "Relocate nRF700x FW patches to external memory and execute from there"
Expand Down
4 changes: 2 additions & 2 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ manifest:
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
- name: zephyr
repo-path: sdk-zephyr
revision: fe339b14b3effd069458f5e4710f17cda8295229
revision: 8d6fc59bf40a9de47a4dc982cfa71738453fab70
import:
# In addition to the zephyr repository itself, NCS also
# imports the contents of zephyr/west.yml at the above
Expand Down Expand Up @@ -149,7 +149,7 @@ manifest:
- name: nrfxlib
repo-path: sdk-nrfxlib
path: nrfxlib
revision: ea7d680ce61310fa6198a23c7daf09369e5215aa
revision: 18691287cb87b9ba2ca621ce138c3b95fd03c2d2
- name: trusted-firmware-m
repo-path: sdk-trusted-firmware-m
path: modules/tee/tf-m/trusted-firmware-m
Expand Down
Loading