Skip to main content
Visitor II
December 14, 2022
Solved

STM32MP15x bare metal approach

  • December 14, 2022
  • 4 replies
  • 2359 views

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

    This topic has been closed for replies.
    Best answer by PatrickF

    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.

    4 replies

    Technical Moderator
    December 14, 2022

    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.

    Technical Moderator
    December 14, 2022

    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

    dchenAuthor
    Visitor II
    December 14, 2022

    @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?

    PatrickFAnswer
    Technical Moderator
    December 15, 2022

    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.

    dchenAuthor
    Visitor II
    December 15, 2022

    Thanks for letting me know Patrick