Interrupt

Device Firmware Update Cookbook | Interrupt

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.


This is a companion discussion topic for the original entry at https://interrupt.memfault.com/blog/device-firmware-update-cookbook

Another awesome post! Unless I am missing, something, your link to ‘previous blog post’ is linking back to this blog.

Thanks,
Rajah

Oops, thank you for the comment. Fixed!

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.

Looks like we temporarily broke the diagrams. It’s fixed now!

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.

Thanks for sharing @nadesop728! srec_cat looks very useful indeed. I’m impressed that it even comes with an implementation for the STM32 CRC!

Nice to hear that you find it interesting. Its really a hidden gem. A very amazing tool hat has proved to be very helpful many times.

Hi

Really nice post. I found a little typo, check the URL of this example

https://github.com/memfault/interrupt/blob/maaster/example/fwup-architecture/patch_image_header.py

BR

Thank you @debuti, and welcome! I’ve pushed a fix to update the link.