Follow our illustrated blog on Embedded Software Architecture

How to build a hybrid solar/wind energy harvester?

Embedded device boot

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Eventually an embedded device’s micro controller or processor is expected to execute the designed-for-the-purpose software. But before that happens, some vendor specific voodoo is required. Only then, it understands it should run your code, which is located at the place where you put it.

First-level boot-loader

Most modern micro-controllers nowadays have first-level boot-loaders. They initialize minimal peripherals that allow you to reach them or they provide upgrade mechanisms. Perhaps, we call them first-level because the vendor puts them there. The first-level boot-loaders usually have minimal and functional-limited implementations providing a number of means to fetch and execute code, or – as already mentioned – upgrade code on (embedded) persistent storage. If this first-level boot-loader covers your requirements for running your code and provides adequate means to upgrade the software, that is fine.

Second-level boot-loader

If it does not, another second-level boot-loader (possibly of a third party or from your own design) is required for customization.
If the first-level boot-loader provides safe and reliable upgrade mechanisms, then make sure the second-level boot-loader does so too. Maybe, it needs to control, upgrade and select two software images, so that your embedded device can always boot with full functionality. But that is another discussion, because in our Energy Harvester prototype we are using the stm32 cortex m3 processor, and this particular micro-controller has a first-level boot-loader which could meet our requirements. If it did not, we would need to look at building our own customized second-level boot-loader, or we could look at feaser’s openblt, for example.

Stm32 upgrading and flashing via USART

The stm32 USART flash protocol is well described.

And several options to actually get your built software onto the flash are available.

Of course, if JTAG or SWD is available, one can also access the flash. Read here for more.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
About is a joined initiative from Gert Boddaert and Pieter Beyens.
More info: about us, our mission, contact us.

Speak Your Mind