cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a custom bootloader and firmware in the same sector of the embedded flash memoery

markd
Associate II

I want to implement a custom bootloader and load the firmware through that. My board is STM32H750XB and according to the data sheet it says, it contains a single sector (sector 0) of 128kB which is user programmable. My question ,  is it possible to program the bootloader and the firmware separately to the same sector, because when I flash the firmware after flashing the bootloader, it erases the bootloader and writes only the application to the given memory address.

1 ACCEPTED SOLUTION

Accepted Solutions
STOne-32
ST Employee

Dear @markd ,

in STM32H750 series , this flash sector is indeed used for custom bootloader and activate user applications and peripherals, However application code should be on external memories such as QSPI , etc. It is the purpose of this family products, including STM32H730 as well .

So to answer the question , No not possible .

Hope it helps you .

Ciao

STOne-32

View solution in original post

4 REPLIES 4
STOne-32
ST Employee

Dear @markd ,

in STM32H750 series , this flash sector is indeed used for custom bootloader and activate user applications and peripherals, However application code should be on external memories such as QSPI , etc. It is the purpose of this family products, including STM32H730 as well .

So to answer the question , No not possible .

Hope it helps you .

Ciao

STOne-32

Dear @STOne-32 ,

 

Thank you for the response, How exactly will I be able to program the application firmware to the external memories like QSPI.

From the outside you'd use an External Loader with STM32 Cube Programmer. 

Your code in your one available sector would be responsible for bringing up the system, pins and external memory. It would presumably check if there is a workablenomage in there and then either transfer control or provide means to upload or recover. Perhaps supporting an SD Card it available. Code can also be loaded into SRAM and run from there. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Generally you'd get the loader correct the first time and not need to constantly update it. A new version could be staged in QSPI or SRAM, etc

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..