Replacing primary firmware image with secondary image on basis of latest version #1267
Replies: 4 comments 2 replies
-
As far as I know this is already the behavior if you build an image with a valid header and trailer. But the later only happens if you use |
Beta Was this translation helpful? Give feedback.
-
imgtool only does this with Currently, this is done by writing the magic value at the end of the slot, but using either img tool or the api is recommended since then the mechanism will continue to work in light of future changes to the trailer area. |
Beta Was this translation helpful? Give feedback.
-
Right. @d3zd3z |
Beta Was this translation helpful? Give feedback.
-
Hello Techies, We have used the same options i.e. --pad and --overwrite-only for sign the binary and keeping in secondary slot for upgrading image and rebooted it, we have observed the image is upgraded but we got the info messages as "[INF] Image index: 0, Swap type: test below command we have used to sign the binary %python% %imgtool% sign -k %key% -e little -S %image_size% -M %image_sectors% -H 0x400 --pad-header %option% -v %version% -s %security_counter% --overwrite-only --pad --align %val% --max-align %val% firmware.bin firmwareinit.bin our issue is why "Swap type: test" for overwrite mode. do we need to add or remove any options? Thanks & regards |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am creating two images both with using the option imgtool.py sign --overwrite-only ........
Primary image goes to internal flash of the device (PRI-IMG) has version 1.0.0
Secondary goes to the external flash of the device (SEC-IMG) has version 2.0.0
Goal : Device boots and checks if a SEC-IMG is present in external flash with greater version number and if it is there and is also latest one then it should overwrite the PRI-IMG in internal flash with SEC-iMG
When MCUboot boots it scans and picks up the two images but doesn't perform an update.
I can force an update using boot_set_pending_multi(). Are there any configurations in MCUboot and imgtool through which I can make MCUboot to do this automatically for me without writing any additional logic in my bootloader application?
Beta Was this translation helpful? Give feedback.
All reactions