Showing results for 
Search instead for 
Did you mean: 

Flashing SRAM with USART bootloader


I followed the article on placing a program into SRAM - I can't place the link here, on an STM32 (I'm using the STM32L476RG Nucleo board)

I can successfully execute the program from SRAM directly from STM32CubeIDE however when I try and load the program into STM32CubeProgrammer and program into SRAM using the UART bootloader, I can see that the device has successfully been connected to however I get this issue:

 13:54:33 : Error: Write address not acknowledged: 0x20000000

 13:54:33 : Error: failed to download Segment[0]

 13:54:33 : Error: failed to download the File

Is it possible to program the SRAM using the UART bootloader?

ST Employee

Hello @Community member​ ,

You can refer to this Application note : Programming an external Flash memory using the UART bootloader built-in STM32 microcontrollers

Also, I recommend you this article : How to use STM32CubeProgrammer to access the USART bootloader on my STM32 board

Hope I helped you!


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.

Pavel A.
Evangelist III

Of course you cannot "flash" SRAM because RAM is not flash 🙂

The debugger, however, knows the difference very well.

You can make a custom bootloader (similar to the "in-app programming" examples with ymodem) that loads and executes code in RAM.

Maybe the CubeProgrammer API library allows to make a host app that does the same without a loader on the target. (I haven't studied the API well; the Segger J-Link API certainly allows this).

Thanks for the response Pavel! So its not possible to directly program the SRAM using the stock ST bootloader, without writing a custom one?

I'm not saying this is 100% impossible. I just do not know how.