Description
I'm trying to get mcuboot to work outside the context of ready-made samples, because we need to implement our own transport method for delivering FOTA images to slot-1. Tried inspecting the code for mcumgr to see if there's anything special that needs to be done in order to flash a signed image to slot-1 and have mcuboot verify and swap to it at next boot.
From what I could tell, signing and writing the new image to SLOT_1_OFFSET should be sufficient for mcuboot to autodetect it? That doesn't work for me for some reason. Do I have to write something to scratch as well?
Running Zephyr v1.14, mcuboot master on an nRF52840, slot offsets: 0xC000/0x73000, slot size 0x67000. I'm using openocd to flash all slots:
../src/./openocd -s $PWD -f interface/stlink.cfg \
-c "transport select hla_swd" \
-c "set WORKAREASIZE 0" \
-f target/nrf52.cfg -c init -c halt \
-c "program $SIGNED_IMG verify 0x73000"
mcuboot works fine, slot-0 works fine, but mcuboot never detects that anything is present in the secondary slot it seems. Console output from mcuboot:
[00:00:00.084,564] <inf> mcuboot: Starting bootloader
[00:00:00.170,776] <inf> mcuboot: Primary image: magic=unset, copy_done=0x3, image_ok=0x3
[00:00:00.318,878] <inf> mcuboot: Scratch: magic=unset, copy_done=0x30, image_ok=0x3
[00:00:00.446,655] <inf> mcuboot: Boot source: primary slot
[00:00:00.555,114] <inf> mcuboot: Swap type: none
[00:00:00.961,334] <inf> mcuboot: Bootloader chainload address offset: 0xc000
[00:00:00.998,931] <inf> mcuboot: Jumping to the first image slot
Any ideas? Is it weird that it only reports status for scratch and nothing for "Secondary image"?