cancel
Showing results for 
Search instead for 
Did you mean: 

What is the role of the External Loader?

Stnoobs
Associate II

Hello,

I want to operate the device in the following manner, but I don't fully understand the concept of the External Loader:

  1. Store DDR Init FW and Main FW in the External NOR Flash.
    1. These two FW will be downloaded to the Flash during board production.
  2. Upon powering on the board, immediately execute the DDR Init FW stored in the NOR Flash.
  • In this case, to access the NOR Flash, QSPI and other GPIOs need to be activated first. Should this role be handled by custom firmware, or does the External Loader take care of this?
  • If that is not the case, do I simply need to set the boot pins to NOR Flash mode to boot directly from NOR Flash?

 

Below are some example files related to the External Loader. I would like to understand what roles each of these files performs.

  • What does "offset" mean? Should it be set differently depending on the address in NOR Flash where the FW is downloaded?
  • Is there a way to obtain the source code for the corresponding bin files?
 

Stnoobs_2-1722392286454.png

*The MPU being used is STM32MP131FAE7

 

Best regards.

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @Stnoobs ,

Please refer to https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout for some explanation on tsv file format. 

In our exemple MX25L51245G_STM32MP135C-CUSTOM_HW_A7.bin is used by CubeProgrammer to load the NOR flash with 

P 0x4 fsbl-app Binary nor0 0x0000000 FSBLA_SNOR_A7_Signed.bin
P 0x5 fsbl-app Binary nor0 0x0032000 MP13_BSP_TemplatesA7_CUSTOM_HW_Signed.bin

 

After that you can switch pin to NOR flash boot mode and then FSBLA_SNOR_A7_Signed.bin will manage to init DDR and load the application for NOR to DDR and jump into application. 

Hope it help

Olivier 

 

 

 

Olivier GALLIEN
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.

hello,

I want to know where the source code of `MX25L51245G_STM32MP135C-CUSTOM_HW_A7.bin` is, because I used `MT25QL02GCBB` to replace the `MX25L51245G` chip, but I don't know how to replace this bin file. Is it generated and renamed by the project `STM32MP13XX_CUSTOM_HW\Applications\XSPI_NOR_Programmer`? If not, please tell me how to modify this bin file, thank you!

 

Best regards.

 

Hi @Stnoobs , @LYUhaha ,

Sources of external loader will be delivered to Mass Market in November release. 

In the meantime, it may be provided on demand by contacting your local ST support or by opening a ticket to OLS. 

Olivier 

 

Olivier GALLIEN
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.

@Olivier GALLIEN wrote:

contacting your local ST support or by opening a ticket to OLS. 


@Stnoobs @LYUhaha here: https://www.st.com/content/st_com/en/support/support-home.html 

 

Hi @Olivier GALLIEN @Andrew Neil ,

Thank you for your reply, but I still have another question

Specifically: Regarding starting the bare metal program code of STM32MP135 through NorFlash, I changed the chip of NorFlash. Since there is no source code of the file `MX25L51245G_STM32MP135C-CUSTOM_HW_A7.bin`, I now use the project `STM32MP13XX_CUSTOM_HW\Applications\XSPI_NOR_Programmer` to burn the two programs `FSBLA_SNOR_A7.bin` and `CubeMX_User.stm32` into NorFlash, and adapt the code of the NorFlash model I changed. After testing, in `Development Boot`, running the `STM32MP13XX_CUSTOM_HW\Applications\FSBLA\FSBLA_SNOR` project, the `CubeMX_User.stm32` program pre-burned in NorFlash can be started correctly, and the serial port output is also normal; but once the `Boot Mode` is selected to `SNOR boot mode`, I found that both programs seem to be unsuccessful, and there is no output on the serial port!

I am sure that the data I burned into NorFlash is correct, and both have the STM32 header mark (after burning, the data is confirmed to be consistent by reading the instruction)

I don't know where the problem is. If you have a good solution, I hope to tell me, thank you!

Best regards.

Hi @LYUhaha ,

 

You said no output on serial : is the first trace in FSBLA or the application ? 

 

If in FSBLA means the bootrom fail to load it :  root cause can bad offset or signature. 

 

Did you respect offset for programming FSBLA (@0) and the application @0x30000 as per readme ? 

 

To investigate further you can use STM32 MPU ROM trace analyzer - stm32mpu 

 

Hope it help 

 

Olivier 

 

 

Olivier GALLIEN
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.