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

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


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.


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


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

Using Chrome Version 84.0.4147.89 (Official Build) (64-bit), I don’t get any renderings of your block diagrams. Here’s what I see:

…We start with the simplest possible description of what we want to achieve with DFU: an application that updates itself.

blockdiag blockdiag { // Set labels to nodes. A [label = “Application”]; A -> A [label = “Updates”, fontsize=8]; } Application Updates

It would be nice to see this as it’s intended to be rendered. Is it browser dependent?

@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)

Thanks for awesome post! Looking for next blog on secure DFU architecture.