Add mcuboot to hello_world sample does not work in SDK 2.8.0

Hi, I started my project with SDK version 2.6.1 (starting from the 'hello_world' example). I added mcuboot (CONFIG_BOOTLOADER_MCUBOOT=y). I followed the instructions in the Nordic video 'Adding Device Firmware Update(DFU/FOTA) Support in nrf Connect SDK'. After creating and flashing the application, I can see that the bootloader starts and then the application starts. I tried again with SDK version 2.8.0 and found that adding mcuboot no longer works. The build process completes successfully. I just get the warning message 'The active build context does not use this file.'. But no mcboot was created. After flashing, the application just starts without a bootloader. What did I do wrong? What is the difference between SDK 2.6.1 and SDK 2.8.0 regarding mcuboot? I am working on Windows 11 with the latest version of Visual Studio Code.

Parents
  • Hi,

    In NCS 2.7.0 the build system was changed to use sysbuild which is a different way in organizing and managing multi-image building. This means that instead of having the previous child image system, where you often had a folder called child_images/ inside your projects which might include for instance mcuboot.overlay and mcuboot.conf, or network core overlay/configuration for nRF5340, you now have this within sysbuild files instead.

    In the case of adding mcuboot through CONFIG_BOOTLOADER_MCUBOOT=y to the prj.conf basic ...zephyr/hello_world sample, you also have to create a sysbuild.conf file, which can either be placed at the same level as the prj.conf or you can organize as you see in this sample https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/sysbuild/with_mcuboot/README.html#with-mcuboot, or within a sysbuild folder.

    To this sysbuild.conf, you must add the following line: "SB_CONFIG_BOOTLOADER_MCUBOOT=y". This ensures that the build system knows that it should build the MCUboot image. You still need to have CONFIG_BOOTLOADER_MCUBOOT=y in prj.conf as well.

    Let me know if this works for you. Here's my hello world with mcuboot that built for build target nrf52840dk/nrf52840 in NCSv2.8.0

    1373.hello_world.zip

    Kind regards,
    Andreas

Reply
  • Hi,

    In NCS 2.7.0 the build system was changed to use sysbuild which is a different way in organizing and managing multi-image building. This means that instead of having the previous child image system, where you often had a folder called child_images/ inside your projects which might include for instance mcuboot.overlay and mcuboot.conf, or network core overlay/configuration for nRF5340, you now have this within sysbuild files instead.

    In the case of adding mcuboot through CONFIG_BOOTLOADER_MCUBOOT=y to the prj.conf basic ...zephyr/hello_world sample, you also have to create a sysbuild.conf file, which can either be placed at the same level as the prj.conf or you can organize as you see in this sample https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/sysbuild/with_mcuboot/README.html#with-mcuboot, or within a sysbuild folder.

    To this sysbuild.conf, you must add the following line: "SB_CONFIG_BOOTLOADER_MCUBOOT=y". This ensures that the build system knows that it should build the MCUboot image. You still need to have CONFIG_BOOTLOADER_MCUBOOT=y in prj.conf as well.

    Let me know if this works for you. Here's my hello world with mcuboot that built for build target nrf52840dk/nrf52840 in NCSv2.8.0

    1373.hello_world.zip

    Kind regards,
    Andreas

Children
No Data
Related