cancel
Showing results for 
Search instead for 
Did you mean: 

How do I boot from Flash in a Baremetal?

Stnoobs
Associate II

I am using the STM32MP131 in a baremetal environment. Since there is no internal flash, I am planning to use external flash and DDR.

I have confirmed that writing to and reading from the flash works, but I don't know how to start from FLASH instead of SYSRAM when powering on.

I saved the FW's bin data at address 0 of the Flash and tried changing the boot mode to QUADSPI Flash, but it did not work.

I think QUADSPI needs to be activated before reading and executing from Flash. Where should I activate this?

Do I also need to modify the linker script for the firmware that runs from Flash?

 

Please let me know if you have any solutions to this problem

Thank you very much in advance.

4 REPLIES 4
Erwan SZYMANSKI
ST Employee

Hello @Stnoobs ,
For external flash use with STM32CubeMP13, you can refer to the following articles :

Unfortunatly, currently QSPI Flash memory are not supported.

Kind regards,
Erwan.

In order 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.

What does it mean that it does not support QSPI flash memory?

If so, what is the "Serial NOR Flash on QSPI" mentioned in the Boot Mode section of the STM32MP131 Datasheet?

 

Stnoobs_0-1724127096724.png

 

Hello @Stnoobs ,
Yes the MP13, from an HW point of view can support it, and in SW this is the case on Linux side. But for MP13 Bare metal, drivers are not present. 

Kind regards,
Erwan.

In order 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.

 

 

 

Does this mean that if QSPI SNOR booting is hardware-compatible, a separate driver needs to be created to use it in a bare-metal environment?

Could you provide the information required to create the driver?

 

According to the readme.txt file, the source code of the bin file shown in the picture below is said to be requested to ST.

Can I get the code?

 

Stnoobs_0-1724150468533.png