Skip to main content
LCE
Principal II
March 31, 2026
Solved

Your experiences with the in-built bootloaders ?

  • March 31, 2026
  • 8 replies
  • 668 views

Heyho,

I'm currently designing a new modular system, with an STMH7 on the base-card. That one's basically up and running, including a self-made bootloader.

Now I'm working on some new modules, these will be connected to the "base H7", probably via I2C, 2 extra UART lines might also be possible.

The previous system used ATmega-MCUs on the modules, now we'll surely use some STM32 type. These modules will not do any DSP or computing, so a "small" STM32 will do (tending towards L07x because of the EEPROM).

To save some dev time I'm thinking about using the internal bootloader for the module MCU, controlled by the base H7.

I have checked the application notes (AN2606 and the ANs depending on the BL interface), also found the example source code from ST on Github.

So far that looks okay and doable, nevertheless user experience always wins over "reading". :D

So...

  1. Anybody using the ST bootloaders in some real-life products ?
  2. How did that go and work out ? Documentation and source code examples good enough for smooth development ?

Thanks in advance!

Best answer by LCE

Thanks again for all your input.

With all the info, having checked all documentation, I have decided against the system bootloader.

Reasons for that:

  • Interface 1): the L07x / L08x  devices I'll probably use have only UART bootloaders - which doesn't really fit into my design, as the main communication between base / modules will be via I2C. And I prefer "clocked" interfaces anyway (and don't want to have baud rate troubles or scale down below 115k2).
  • Interface 2): I don't like the interface scanning, I'll have different modules in the system, and it might be too much trouble keeping the unused IOs quiet.
  • Debugging: a self-made bootloader will give me the opportunity for debugging via UART, and / or at least LEDs.
  • Documentation: is still a little bit lacking, or distributed among too many documents. And I don't like having "black boxes" in a system.
  • I have enough experience writing my own bootloader, I could re-use lots of stuff that I already have (BL for H7, many AVRs).

8 replies

Bouraoui Chemli
ST Employee
March 31, 2026

Hi @LCE 

ST does not provide the bootloader source code. However, application note AN2606, "STM32 Microcontroller System Memory Boot Mode," offers comprehensive details about the STM32H7xx bootloader functionality and implementation.

Best regards,
Bouraoui

LCE
LCEAuthor
Principal II
March 31, 2026

Okay, I thought I saw some example code from ST on Github?

AN2606 shows some basic info, the details are in the interface-dependent ANs.

 

BTW, I cannot find info about flash page size, neither in the DS, nor in the DM... why and where?

Edit: okay, found that in the RM under NVM organization.
Anyway, would be nice if one could find stuff like that with a simple "page size" search, or something similar.

Andrew Neil
Super User
March 31, 2026

@LCE wrote:

I thought I saw some example code from ST on Github?


Maybe that was for the "Host" side of the bootloader?

Maybe what @Bouraoui Chemli means is that ST don't provide the internal source for the code that's in ROM within the STM32?

That would make sense ...

 

PS:

The STM32 Open Bootloader supports exactly same protocol interfaces as STM32 System Bootloaders - so you could use that ... ?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
LCE
LCEAuthor
Principal II
March 31, 2026

I definitely mean the host side - I cannot do anything about the in-built bootloader anyway...

 

The STM32 Open Bootloader supports exactly same protocol interfaces as STM32 System Bootloaders ...

Yes, that's what I found, so I was surprised about the "no, we don't" answer - classical misunderstanding.

Andrew Neil
Super User
March 31, 2026

@LCE wrote:
  1. Anybody using the ST bootloaders in some real-life products ?

So, from the above, it seems that Arduino have used it in their MKR WAN 1300:

AndrewNeil_0-1774970524919.jpeg

https://docs.arduino.cc/hardware/mkr-wan-1300/

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
Technical Moderator
March 31, 2026

@LCE wrote:
  1. Anybody using the ST bootloaders in some real-life products ?

Many ST customers are using the built-in bootloader but I don't have the visibility on how they are using it.

For bootloader host side you need to refer to the respective ANs.

Example for I2C: AN4221 "I2C protocol used in the STM32 bootloader"

For USART: AN3155 "How to use USART protocol in bootloader on STM32 MCUs"

You need to implement the host protocol yourself.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
LCE
LCEAuthor
Principal II
March 31, 2026

As I've written, yes, I have found and checked the ANs.

 

Many ST customers are using the built-in bootloader but I don't have the visibility on how they are using it.

@mƎALLEm  and the ST support team doesn't have too many customers complaining / having troubles with it ? :D

 

mƎALLEm
Technical Moderator
March 31, 2026

@LCE wrote:

@mƎALLEm  and the ST support team doesn't have too many customers complaining / having troubles with it ? :D


To be honest, as any other features/peripherals, the bootloader could have issues. The limitations are listed in the errata sheet.

For example in the case of STM32L4Rxxx (ES0393) (see the screenshot in the attachment).

So need to check the errata sheet first then do some tests..

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
TDK
Super User
April 1, 2026

I've used the UART and SPI and DFU bootloaders a bunch on a number of different boards. Never had a problem with any of them.

"If you feel a post has answered your question, please click ""Accept as Solution""."
LCE
LCEAuthor
Principal II
April 1, 2026

@Pavel A.  & @TDK :

Thanks! This is some info I'm looking for! :)

MHoll.2
Senior III
April 1, 2026

I have used the Bootloader via FD-CAN and I2C on H730, non problems to implement this (the FDCAN gets connected to a Windows PC via a Peak FDCAN-USB dongle, the I2C is used together with a WEC7 Host) .

mƎALLEm
Technical Moderator
April 1, 2026

@LCE 

So if your question has been answered, don't forget to accept the solution ;)

Thanks

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
LCE
LCEAuthor
Principal II
April 1, 2026

Yes, but still waiting for some more input... which might get less if solution accepted. ;)

LCE
LCEAuthorBest answer
Principal II
April 8, 2026

Thanks again for all your input.

With all the info, having checked all documentation, I have decided against the system bootloader.

Reasons for that:

  • Interface 1): the L07x / L08x  devices I'll probably use have only UART bootloaders - which doesn't really fit into my design, as the main communication between base / modules will be via I2C. And I prefer "clocked" interfaces anyway (and don't want to have baud rate troubles or scale down below 115k2).
  • Interface 2): I don't like the interface scanning, I'll have different modules in the system, and it might be too much trouble keeping the unused IOs quiet.
  • Debugging: a self-made bootloader will give me the opportunity for debugging via UART, and / or at least LEDs.
  • Documentation: is still a little bit lacking, or distributed among too many documents. And I don't like having "black boxes" in a system.
  • I have enough experience writing my own bootloader, I could re-use lots of stuff that I already have (BL for H7, many AVRs).