cancel
Showing results for 
Search instead for 
Did you mean: 

Information Regarding STM32 header for binary files

Aks
Associate II

Hello 

We are working on booting BareMetal application using SD Card in STM32mp257F-DK 
we have referred the following link to create header for binary file
https://wiki.st.com/stm32mpu/wiki/STM32_header_for_binary_files

Aks_0-1743682544839.png

we have few doubts regarding the above image:

1) In optional flags, can we disable authentication and decryption 

2) In binary type, what are the other formats other than FSBLM.  In tf-a-stm32mp257f_dk_usb.stm32 file the binary type is mentioned as 0x10 is used, what binary type is it? In STM32MP157A we have set the value of binary type as 0x00 but it still boots our application. 

kindly help us resolving the above issue

 

Thanks and Regards
Akshitha

 

 

4 REPLIES 4
PatrickF
ST Employee

Hi,

STM32MP2x uses header v2.2.

You should use https://wiki.st.com/stm32mpu/wiki/Signing_tool to add header to your binary file.

Command line of Example7 should be ok for you.

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.

Hello  @PatrickF 

 

->We have tried the below command as you have suggested and output.stm32 is generated.

.\STM32_SigningTool_CLI.exe -in D:\Akshitha\STM32MP2\MP257_64_bit_cpu\Output\Debug\Exe\stm32mp257fai3.bin -nk -of 0x0 -iv 1 -hv 2.2 -o output.stm32

But we couldn't that file. So we would like to know where the files will be generated.

Screenshot 2025-04-07 174641.png

->we have referred the following link and created a header for binary file
https://wiki.st.com/stm32mpu/wiki/STM32_header_for_binary_files

we have set the boot mode to SD card(A35 as master) and tried booting using the generated binary, but it doesn't boot. I'm attaching the the binary file I have created

Thanks  & Regards

Akshitha Pattem

 

 

 

 

Thanks & Regards

Akshitha Pattem 

Hello @PatrickF 

 

While referring to the following link:

https://wiki.st.com/stm32mpu/wiki/STM32_header_for_binary_files 

we came across the terms "authenticated binary" for STM32MP25 lines and "binary" for STM32MP13/15 lines.

What is the difference between both the binary and authenticated binary. And How is Authenticated Binary generated?

 

Thanks & Regards 

Akshitha Pattem

 

 

Aks
Associate II

Hello

We have found the following link related to SD card binary booting:
https://github.com/STMicroelectronics/wiki-stm32mp-addons/tree/main/MP2RomTracesDump We used the MP2ROMtracesdump_USART2_PA4.stm32 file and observed that it functions as expected. Please find attached the log generated from this image for your reference.
Since this image works, we attempted to use the same header structure while updating the checksum and length fields according to our application requirements. However, the board fails to boot with the modified image. Notably, we have verified that our application works correctly when debugged independently.
If possible, could you kindly share the source code used to generate the MP2ROMtracesdump_USART2_PA4.stm32 file?
Additionally, we generated another .stm32 image using the Arm Trusted Firmware from Buildroot, which also boots successfully. We have attached the tf-a-stm32mp257f-dk-mx.stm32 file for reference.
Upon comparing the headers of both files, we observed that the tf-a-stm32mp257f-dk-mx.stm32 file includes a non-zero value in the reserved space, while the MP2ROMtracesdump_USART2_PA4.stm32 file has zeroes in that area. According to the Arm Trusted Firmware build log, this reserved space corresponds to an "Image Load" address. We would appreciate your clarification on how a value is being written into this reserved space.
To support our observations, we have attached a screenshot for further clarification. 

We also noticed that during boot, the error LED does not blink. We referred to the following link for LED status information
https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_code_overview

However, we are having difficulty understanding Point 3 under Section 11.1 in the above document. We would be grateful if you could provide a more detailed explanation of this point.

Thanks & Regards
Akshitha Pattem.