cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP15x bare metal approach

dchen
Associate II

After reading documents, I understand the practical boot sequence of STM32MP1 is BOOTROM->TF-A->U-boot->Kernel->file system

In my use case, I prefer to use Windows and write code in bare metal, without U-boot and device tree involved.

1 I think the boot sequence will be BOOTROM->TF-A->bare metal binary?

2 I tried STM32MP15x starter package in Windows, by using STM32CubeProgrammer, to flash binaries to NVM such as NAND, and NOR etc.

If I understand correctly, is FIP section in the tsv file assigning the partitions of NAND flash and NOR flash?

If I want to go with the boot sequence I mentioned above, is there a way I can modify FIP bin/access the source code in Windows, and change NAND flash partition?

3 Is there an identification header, like the 256 bytes header that TF-A contains, needs to be attached to my bare metal binary?

Thanks in advance.

dchen

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @Community member​ 

CubeProgrammer is intended to connect to uBoot, so unless you use an existing ST development board, you have to build a TF-A and uBoot adapted to your board in order to load a custom bare-metal FSBL inside the Flash.

You could also look at https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout and AN5275.

But I remind that Cortex-A7 bare-metal solution is not part of ST standard delivery, so you will have to be clever enough as you will find very few examples and limited support from ST.

Regards.

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.

View solution in original post

5 REPLIES 5
Erwan SZYMANSKI
ST Employee

Hello @Community member​,

ST does not provide bare metal support for MP15, but I already saw a community project on Github that could answer your question. The link is the next one: https://github.com/4ms/stm32mp1-baremetal

I hope that it will help you in your project.

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.
Kevin HUBER
ST Employee

Hello @Community member​ ,

For information this community project is also visible in the "Project" part of the community.st:

https://community.st.com/s/project/a8g3W000000fxc1QAA/stm32mp1-baremetal-example-projects

Best Regards,

Kevin

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.
dchen
Associate II

@Erwan SZYMANSKI​ @Kevin HUBER​ 

Thank you for sharing this repo. Yes I saw this repo earlier and did some exercise. If I still want to use STCubeProgrammer to load my code to NAND/QSPI, is there a way I can do it? Could you give me some hints on Q2 and Q3?

PatrickF
ST Employee

Hi @Community member​ 

CubeProgrammer is intended to connect to uBoot, so unless you use an existing ST development board, you have to build a TF-A and uBoot adapted to your board in order to load a custom bare-metal FSBL inside the Flash.

You could also look at https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout and AN5275.

But I remind that Cortex-A7 bare-metal solution is not part of ST standard delivery, so you will have to be clever enough as you will find very few examples and limited support from ST.

Regards.

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.

Thanks for letting me know Patrick