hi,
I need to develop some custom features for MCUBoot, so I transplanted the entire bootloader folder from NCS into my project. In the project's root directory, I added list(APPEND ZEPHYR_EXTRA_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/bootloader/mcuboot") in the CMakeLists.txt file to include MCUBoot in the project. However, after the compilation, I found that the actual MCUBoot being compiled is the one from NCS, not my custom MCUBoot.
Try modifying the sysbuild.cmake file according to the example in v2.9.0\zephyr\samples\sysbuild\hello_world, and add the following content.
set(image mcuboot)
ExternalZephyrProject_Add(
APPLICATION ${image}
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/bootloader/mcuboot/boot/Zephyr/
APP_TYPE BOOTLOADER
)
Error message:ExternalZephyrProject_Add(APPLICATION mcuboot ...) already exists.
How should I configure the system to compile a custom mcuboot ?
sdk:NCS v2.9.0
soc:nrf9160