-
Couldn't load subscription status.
- Fork 1.4k
wifi: Add ext flash support for firmware patches #17652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e5f5868
manifest: sdk-zephyr: Pull ext flash support for nRF70 FW patches
krish2718 9b5d8b1
net: Add a module to manage nRF70 firmware in external flash
krish2718 f4cfbb7
sysbuild: Fix nRF70 Firmware bins path
krish2718 17ca99c
Revert "scripts: quarantine: quarantine Matter samples"
krish2718 f670705
net: nrf70_fw_ext: Disable flash integrity check
krish2718 39cfa1e
samples: matter: Enable LTO for all nRF7002 DK variants.
ArekBalysNordic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # | ||
| # Copyright (c) 2024 Nordic Semiconductor ASA | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| # | ||
|
|
||
| # Enable LTO to decrease the flash usage. | ||
| CONFIG_LTO=y | ||
| CONFIG_ISR_TABLES_LOCAL_DECLARATION=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # | ||
| # Copyright (c) 2023 Nordic Semiconductor | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| # | ||
|
|
||
| if(NOT CONFIG_NRF_WIFI_PATCHES_BUILTIN) | ||
| 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() | ||
krish2718 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # | ||
| # Copyright (c) 2024 Nordic Semiconductor | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| # | ||
|
|
||
| if WIFI_NRF70 && !NRF_WIFI_BUILD_ONLY_MODE | ||
|
|
||
| choice NRF_WIFI_PATCHES_EXT_FLASH_SUPPORT | ||
krish2718 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| bool "Store nRF700x FW patches in external flash" | ||
| 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" | ||
| # nRF7002 supports SPI based external flash access with no XIP | ||
| depends on !BOARD_NRF7002DK_NRF5340_CPUAPP && !BOARD_NRF7002DK_NRF5340_CPUAPP_NS | ||
| # Disable until Matter DFU changes are ready | ||
| # default y if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 | ||
| # For accessing external flash | ||
| select FLASH | ||
| # For relocation code to external flash | ||
| select XIP | ||
| select NORDIC_QSPI_NOR | ||
| select BUILD_NO_GAP_FILL | ||
| select CODE_DATA_RELOCATION | ||
| select HAVE_CUSTOM_LINKER_SCRIPT | ||
|
|
||
| config NRF_WIFI_PATCHES_EXT_FLASH_STORE | ||
| bool "Store nRF700x FW patches in external memory but execute from RAM" | ||
| # nRF7002 supports SPI based external memory access but missing tools support | ||
| # TODO: Enable when tools support is available (NRFJPROG-157) | ||
| depends on !BOARD_NRF7002DK_NRF5340_CPUAPP && !BOARD_NRF7002DK_NRF5340_CPUAPP_NS | ||
| select FLASH | ||
| select FLASH_MAP | ||
| endchoice | ||
|
|
||
| if NRF_WIFI_PATCHES_EXT_FLASH_STORE | ||
| config NRF_WIFI_FW_FLASH_CHUNK_SIZE | ||
| int "Chunk size for nRF70 FW patches to be read from external flash" | ||
| default 8192 | ||
| help | ||
| Chunk size for nRF70 FW patches to be read from external flash. | ||
| This option impacts the loading time of the nRF70 FW patches and | ||
| RAM usage (heap) of the application. | ||
|
|
||
| config NRF_WIFI_FW_PATCH_INTEGRITY_CHECK | ||
| bool "Enable integrity check of nRF70 FW patches" | ||
| select FLASH_AREA_CHECK_INTEGRITY | ||
| # TODO: Fix MbedTLS dependency issues to enable this option | ||
| help | ||
| Select this option to enable integrity check of nRF70 FW patches using | ||
| SHA-256 verification algorithm.This option impacts the loading time of the | ||
| nRF70 FW patches but protects against corrupted FW patches. | ||
|
|
||
| config NRF_WIFI_FW_PATCH_DFU | ||
| bool "Direct Firmware Update of nRF70 FW patch" | ||
| depends on PARTITION_MANAGER_ENABLED | ||
| depends on BOOTLOADER_MCUBOOT | ||
| depends on !XIP_SPLIT_IMAGE | ||
| help | ||
| Enabling this option adds support for Device Firmware Update (DFU) | ||
| for the nRF70 Series Firmware Patch. | ||
|
|
||
| This feature requires the addition of an MCUBoot partition pair: | ||
| a primary and a secondary partition. These partitions are used to | ||
| store the new firmware patch. The specific partition numbers to be used | ||
| depend on the number of partitions already in use. | ||
|
|
||
| The "nrf70_wifi_fw" partition must be added to the newly created | ||
| MCUBoot primary partition. Once this Kconfig option is enabled, | ||
| the nRF70.hex file will be signed by MCUBoot. The signed image | ||
| will then be merged with the application image and flashed onto | ||
| the target board. | ||
|
|
||
| Ensure that the required MCUBoot partitions are properly configured | ||
| before enabling this option. Refer to the documentation for detailed | ||
| instructions on partition configuration and the DFU process. | ||
|
|
||
| # TC is the default but Wi-Fi uses MbedTLS, so, to avoid loading another library. | ||
| if NRF_WIFI_FW_PATCH_INTEGRITY_CHECK | ||
| choice FLASH_AREA_CHECK_INTEGRITY_BACKEND | ||
| default FLASH_AREA_CHECK_INTEGRITY_MBEDTLS | ||
| endchoice | ||
| endif | ||
| endif | ||
|
|
||
| config CUSTOM_LINKER_SCRIPT | ||
| string "Custom linker script for nRF70 FW patches in external flash" | ||
| default "${ZEPHYR_BASE}/../nrf/subsys/net/lib/nrf70_fw_ext/rpu_fw_patches.ld" | ||
| endif | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.