Using MCUBoot bootloader to update net core without ext flash.

On SDK 2.0.2, I was able to load peripheral_uart with CONFIG_BOOTLOADER_MCUBOOT=y and successfully update both the app core and net core using the thingy53. However when moving the configuration changes to our custom board I see that the thingy53 configs use the onboard MX25R64 external flash to store the net core image as well as a image-2 in ramdisk which looks to hold the image when copying to the network core.

Our custom board had no requirements for external flash so it was not included in the current revision, is there a way to get the network core updates to work without it?1

Parents Reply Children
  • If you update net core and app core separately, it can do without external flash

    This should be the case but does not work by default.  Even without external flash being used, compilation fails without it present. To get it to work I had to enable CONFIG_BOOT_IMAGE_ACCESS_HOOKS and CONFIG_NRF53_MULTI_IMAGE_UPDATE. Except those symbols are blocked by PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY which is not present as we have no external flash.

    After patching the symbols to not depend on PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY and also patching ncs/bootloader/mcuboot/boot/zephyr/pm.yml I was able to upload using mcumgr -n 3. 

    mcuboot_secondary_1:
    -  region: external_flash
    +  region: ram_flash
      size: CONFIG_NRF53_RAM_FLASH_SIZE
    

    Hopefully in a future SDK release this won't be an issue.

Related