Background
For reasons that I do not want to dispute here, I am building a custom bootloader for the APP + NET cores on the nRF5340. This custom bootloader is not a Zephyr application and has its own build system separate from NCS + Zephyr. I need to instruct the NCS/Zephyr build system (NCS v2.8.0) to compile the APP and NET core images to be based at an offset from the start of their respective flash e.g., 0xC000.
Progress
Based on Sigurd’s response to https://devzone.nordicsemi.com/f/nordic-q-a/117283/config_flash_load_offset-not-respected-in-v2-8-0?focus=true I’ve added a placeholder partition to my pm_static.yml for the APP core bootloader, and it works as expected.
(NOTE: the CONFIG_FLASH_LOAD_OFFSET param doesn’t seem to do anything for either core)
Problem
I cannot relocate the NET core image to a different flash offset
Steps Taken
Using the following pm.yml file (same as for app core, except the flash base address is 0x1000000 for net core)
bootloader: address: 0x1000000 size: 0xC000
- Added as pm_static_nrf5340dk_nrf5340_cpunet.yml to the root directory (alongside pm_static.yml) per https://docs.nordicsemi.com/bundle/ncs-2.5.0/page/nrf/scripts/partition_manager/partition_manager.html#configuring_static_partitions
This was not recognized by the build system at all. - Added as pm_static.yml to sysbuild/ipc_radio/ directory.
This was recognized by the build system, but did not take effect and there is a warning from the partition_manager.cmake that the partition manager output has changed since the last build, even though this is a pristine build
-- Build files have been written to: C:/Users/tg/project/build/ipc_radio -- Found partition manager static configuration : C:/Users/tg/project/pm_static.yml Partition 'rpmsg_nrf53_sram' is not included in the dynamic resolving since it is statically defined. -- Found partition manager static configuration CPUNET: C:/Users/tg/project/sysbuild/ipc_radio/pm_static.yml CMake Warning at C:/ncs/v2.8.0/nrf/cmake/sysbuild/partition_manager.cmake:85 (message): Static partition manager file has changed since this project was last configured, this may cause images to use the original static partition manager file configuration data, which is incorrect. It is recommended that a pristine build be performed when a static partition manager file is updated. Call Stack (most recent call first): C:/ncs/v2.8.0/nrf/cmake/sysbuild/partition_manager.cmake:633 (partition_manager) C:/ncs/v2.8.0/nrf/sysbuild/CMakeLists.txt:661 (include) cmake/modules/sysbuild_extensions.cmake:583 (nrf_POST_CMAKE) cmake/modules/sysbuild_extensions.cmake:583 (cmake_language) cmake/modules/sysbuild_images.cmake:23 (sysbuild_module_call) cmake/modules/sysbuild_default.cmake:20 (include) C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include) C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) C:/ncs/v2.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include) template/CMakeLists.txt:10 (find_package)