Writing Your Own Bootloader for STM32, Part 2.

Writing Your Own Bootloader for STM32, Part 2.
STM32

While I was finishing the previous article, I came across a thread on Radiokot discussing what format to use for sending firmware to a bootloader. I had the same question, and at the end of the previous article I described why it is more convenient to send firmware as a hex file than as a binary; those interested can read it here. So, we need to look at the record types in a hex file and extend the code from the previous article. Everything...

Writing Your Own Bootloader for STM32.

Writing Your Own Bootloader for STM32.
STM32

In one of my previous articles I described how to flash an STM32 using the bootloader and explained how it works. For those who haven't read it, let me remind you that a bootloader is essentially a program that lives in the MCU and can rewrite its memory, i.e. update the firmware. I think someone may wonder why write a bootloader yourself if you can use the built-in one. The answer to this question is very simple...

Flashing AVR via a Bootloader.

Flashing AVR via a Bootloader.

Since I didn't get a USB programmer right away, and flashing via the COM port was slow and inconvenient, I had to find a way out of the situation, and it was to use a bootloader. One of my previous articles described how to flash an STM32 using its bootloader, but on STM32 the bootloader is programmed into the chip at the factory during manufacturing, whereas here we'll have to flash it ourselves. Here's how it looks in...