FOTA standalone image automated

You have successfully implemented FOTA support, so when the toolchain generates your appli.fota it also provides the software parts composing it:

  • appli.hex (your application relying on the binary providing the library code)
  • fota.bin (the library code - dependent on SDK version)

But then you need to flash it with your bootloader or upgrade it using FOTA. In any case, starting from scratch is a bit fastidious whereas it would be so easy if a complete standalone image (FOTA compliant) were available.

The good news is that you already have everything to do it:

  • bootloader.hex is your customized version of the bootloader.
  • fota_signed.bin is the signed version of fota.bin (patched to embed the public key) - I propose to rename it this way not to confuse it with the unsigned version. This binary image must be loaded at address 0x102000 (no base address is required for hex files but they are for raw binaries).
  • appli.hex your application. Note that the SDK ensures it won’t overlap with the library!

You then just have to merge those three files using the interactive executable JFlash from SEGGER:

Or the best solution is to perform this as post processing each time you generate a new image (using for example srec_cat utility). You then always obtain appli.fota and standalone.hex up to date!

6 Likes

Hi @rvs,

Thank you for your excellent contribution to our Community Forum.

2 Likes