So im trying to have a mechanism to update my mcuboot images through SMP.
The original issue was this : we had devices that had a version 0.9.8 with the nordic sdk 2.2.0, everything was fine with it we had mcuboot and serial recovery. It was all good, yet at one point we found some bugs and we needed to do some changes obviously as usual in development. So we reached that version 1.0.2 after a few iteration and its used nordic sdk 2.4.2, but we found out recently that device that had that merged.hex file flashed on, would not be able to do serial recovery anymore (not sure what caused this we think it might be some issue with the new sdk or anything else, anyways we didnt have serial recovery anymore).
So to solve this, we recently found that you could upgrade mcuboot through a SMP/DFU bluetooth update with the s0 or s1 signed file when doing a build like with a binary file named something like "signed_by_mcuboot_and_b0_s1_image_update.bin". So we figure out, oh so we only are using slot 0 right now since we only have one app binary, so logically well just update the next slot so S1. So I created a new pristine build with he sdk NRF 2.5.0 with mcuboot and I made sure that I raised the version in the child image with "CONFIG_FW_INFO_FIRMWARE_VERSION" value as well as the "CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION" (because I guess its a way to identify the version of mcuboot in the slot).And through our DFU app with were able to update the image.
So it seemed like everything worked. Then serial recovery was able back again. So I think that working, but now I am trying to test how could we update mcuboot again, in a case scenario that something happened again. I would guess logically that you just send it to s0 or s1 if a device didnt have the previous device (we have some devices that came from a base where mcuboot worked so they dont require that same update) I just redo a SMP / DFU / BT update and now when I list the image with the mcumgr.exe file (from the sample) the mcuboot version seemed to work.
Images:
image=0 slot=0
version: 1.0.2
bootable: false
flags:
hash: 8b1c7dcd78b8c1faefe01072c0089d50c07d4ee25e752f8972c3b8d74640c7d0
image=0 slot=1
version: 1.0.2
bootable: false
flags:
hash: 58c9c607c3a71ad27a93dc707760634eba4af734b6968413041d3b81170804c8
image=1 slot=0
version: 1.0.3
bootable: false
flags:
hash: fef35cad3e5a559dc47c152487ec20a7fa241fb94a0102834dbc64d3622eeafb
image=1 slot=1
version: 1.0.2
bootable: false
flags:
hash: 58c9c607c3a71ad27a93dc707760634eba4af734b6968413041d3b81170804c8
So im like cool cool. I see that 1.0.3 so I guess its probably my mcuboot version. So my guess is that image=1 (thingie) + slot=n number is like the place where mcuboot would be located in these wrapping of app.
So im like lets try again so I raise the number and repeat the same process with 1.0.4 and FW version 3. And then I run my list command from the mcumgr.exe and now its all over the place.
Can someone explain to me what does the Image=0 Slot=0 and all these differents state mean? Is Image=1 =>>> Mcuboot and Image=0 =>> the app ? And then you can decide to swap depending on what you prefer.
Also do MCUBoot version need to be higher than your app version ? Any help appreciated.