This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FOTA issues with updates not being confirmed (and then reverting on the first reboot) when original build was based on SDK 1.4.0 and new build is 1.5.0

I've run into an issue with FOTA updates. The issue can be described by the following sequence of events:

  1. A device is completely erased and programmed with a binary image built on the 1.4.0 SDK. I allow the device to fully boot, and then power cycle it to verify that it continues to operate correctly.
  2. A FOTA is triggered, with the new binary having been built with SDK 1.5.0
  3. At the conclusion of the FOTA, things seem to be okay, the new 1.5.0 based version run, and I can see that it calls boot_write_img_confirmed(), and that the return code is 0.
  4. Rebooting this device leads to it reverting back to the 1.4.0 SDK based build. The boot banner when it does this looks like this:
    1. *** Booting Zephyr OS build v2.4.0-ncs1  ***
      [00:00:00.366,668] <inf> mcuboot: Starting bootloader
      [00:00:00.373,168] <inf> mcuboot: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x3
      [00:00:00.383,270] <inf> mcuboot: Boot source: none
      [00:00:00.388,854] <inf> mcuboot: Swap type: revert
      [00:00:00.769,714] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
      [00:00:28.769,042] <inf> mcuboot: Bootloader chainload address offset: 0x10000
      [00:00:28.776,916] <inf> mcuboot: Jumping to the first image slot
      *** Booting Zephyr OS build v2.4.0-ncs1  ***
      Flash regions		Domain		Permissions
      00 02 0x00000 0x18000 	Secure		rwxl
      03 31 0x18000 0x100000 	Non-Secure	rwxl
      
      Non-secure callable region 0 placed in flash region 2 with size 32.
      

Repeating this process where the original binary loaded was based on the 1.5.0 SDK yields success (i.e. no revert on step 4).

I surmise that maybe something is mismatched between the 1.4.0 SDK MCUBoot and the 1.5.0 one, but I'm not sure what it could be. I'm building without an immutable bootloader if it matters.

Any ideas for what to look at to diagnose this issue?

Parents Reply Children
No Data
Related