Update mcuboot (DFU) in SDK v2.7.0

Hello,

I just upgraded from SDK v2.5.0 to v2.7.0 and now I have a problem updating the bootloader.

In my project I have b0, the mcuboot (in s0 and s1) and the application.

I would like to be able to update the bootloader via mcumgr (update the app works) but when I confirm the image I loaded (and after the reboot of the device), the update was not done. Also, I notice the version is "0.0.0" of the file I loaded.

C:\DocTA\Soft\TA-Smart-BT840P>mcumgr -c my_config image list
Images:
 image=0 slot=0
    version: 2.0.2
    bootable: true
    flags: active confirmed
    hash: f293ba35d245649dce182661b983eee8cae3686aa16e79e390d99e50750cf2c1
Split status: N/A (0)

C:\DocTA\Soft\TA-Smart-BT840P>mcumgr -c my_config image upload Application\Test\signed_by_mcuboot_and_b0_s1_image.bin -e -n2
 44.00 KiB / 44.00 KiB [=======================================================================] 100.00% 2.25 KiB/s 19s
Done

C:\DocTA\Soft\TA-Smart-BT840P>mcumgr -c my_config image list
Images:
 image=0 slot=0
    version: 2.0.2
    bootable: true
    flags: active confirmed
    hash: f293ba35d245649dce182661b983eee8cae3686aa16e79e390d99e50750cf2c1
 image=0 slot=1
    version: 0.0.0
    bootable: true
    flags:
    hash: 446cc0ae63ace64f2a93bb2a2c38a4e48093550f777e3aa69474f16b4d7d63ce
Split status: N/A (0)


Do you have any idea where I made a mistake?

Thank you

  • Hello,

    I'm experiencing the same issue when trying this with SDK v2.7.0. I will investigate further and keep you updated on the progress.

    Best regards,

    Vidar

    Update: Please add SB_CONFIG_MCUBOOT_UPDATEABLE_IMAGES=2 and 
    SB_CONFIG_MCUBOOT_APP_SYNC_UPDATEABLE_IMAGES=n to your sysbuild configuration. The image number must be set to '2' for MCUBoot to be able to activate the MCUBoot image.

    For example:

    # https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html 
    SB_CONFIG_BOOTLOADER_MCUBOOT=y
    SB_CONFIG_SECURE_BOOT_APPCORE=y
    SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_BUILD=y
    SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_APP=y
    SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_MCUBOOT=y
    
    SB_CONFIG_SECURE_BOOT_MCUBOOT_VERSION="3.0.0+0"
    
    SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE="keys/nrf_bootloader.pem"
    SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="${APPLICATION_CONFIG_DIR}/keys/mcuboot_priv.pem"
    
    # Settings required for external flash to be used for DFU
    SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
    SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
    
    SB_CONFIG_MCUBOOT_UPDATEABLE_IMAGES=2
    SB_CONFIG_MCUBOOT_APP_SYNC_UPDATEABLE_IMAGES=n

  • It works, thank you !

    What is the difference between SB_CONFIG_SECURE_BOOT_MCUBOOT_VERSION and CONFIG_FW_INFO_FIRMWARE_VERSION ?

  • Good to hear! The SB_CONFIG_SECURE_BOOT_MCUBOOT_VERSION string is used to sign the image for MCUboot, allowing MCUboot to copy the image to the s1/s0 slot, while CONFIG_FW_INFO_FIRMWARE_VERSION sets the version embedded in the MCUboot image that b0 uses.

Related