Implementing OTA (Over The Air) firmware updates is a rite of passage for
firmware engineers. Device firmware update is a key component of most hardware
projects. Often, it is also one of the more complicated components.
I think your svg images are not being rendered for some reason. There are lot of āRendering Failed: blockdiag -T svgā in the post. For sanity, I checked across chrome, firefox, safari.
Since you shared your bootloader architecture, I wanted to share a tool that my work finds useful that for working with the multiple binary files that are to be flashed to hardware.
SRecord (tool not the file format) for working inserting data into your binary files? For work we use a combination of SREC and bin files and each we embed similar data as to what you describe and the process was automated with Python before. Since we found SRecord, we replaced the custom Python programs with SRecord and now just use Python as a wrapper around SRecord.
SRecord has some nice features in that can be used to calculate and generate a CRC, extract ranges of memory, merge multiple files together, fill ranges with a a specific value and it also works with many different file formats.
@krhill82 Thanks for letting me know. This is odd ā the diagrams are rendered server side into an SVG block. Is it possible you are using an extension that disables SVGs?
Iām using two add-ons which might block SVGs. When I view the page in Internet Explorer 11, the SVG images are visible. But in the latest Edge and Chrome, just the generator text is visible. (Add ons: Privacy Badger and DuckDuckGo Privacy Essentials)
Hi @francois, Regarding one .bin file generation for both app and bootloader, Everything worked fine till I start using external flash (which is basically memory mapped QSI externnal flash). Basically post compilation I get one hex file with internal and extern flash memory hex. I am using STM32 and use external loader to program it with STM programmer.
When I use below command to get .bin file, I am getting error āarm-none-eabi-objcopy:App.bin[ExtFlashSection]: No space left on deviceā.
Great post, lots of ideas I shall try to use. One bit confused me a little. When Updater and Application share slot 2, so only one of them can occupy it at any one time, where is the other image supposed to be stored? External SD card perhaps?
Second point. While the text above talks of there being four programs, I see only three under the fwup-architecture file tree: boot.c, app.c and loader.c. I expected an āupdaterā program to exist also??
Welcome to interrupt @tobermory, and sorry I missed your previous questionn.
In order to update the Loader, you first have to update the application to replace it with the Updater. This is a standard software update which replaces the Application in slot 2. So the Updater does not have to be stored anywhere, it gets pushed via OTA. Do you understand?
Youāre right, thereās only a Bootloader, and App Loader, and an Application in the example code. I did not implement the Updater (which updates the App Loader).
The Updater is simple: it gets loaded by the Loader, and waits for an OTA image. It writes that image in Slot 1, marks signals via shared memory that the loader should go into DFU mode for the next boot, and reboots the device.