2024-08-27 01:31 PM
Hi, what is the difference between .elf file and .bin file to program STM32. If I load up the .bin file and program STM32, will it contain all the necessary such as program data and flash data. Is there a application to program individually the .bin file separately apart from STM32CUBE IDE.
2024-08-27 01:52 PM
Hello @cjaya.2
BIN and HEX are generated from the ELF.
More details available here.
If you are looking to program the .bin file on your MCU, you have to generate it using CubeIDE and programme it using CubeProgrammer.
Best Regards.
STTwo-32
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.
2024-08-27 02:01 PM - edited 2024-08-27 02:03 PM
Hello,
@cjaya.2 wrote:
If I load up the .bin file and program STM32, will it contain all the necessary such as program data and flash data.
It contains the program. Data such as letteral pool and const declared variables will be in the bin file.
Is there a application to program individually the .bin file separately apart from STM32CUBE IDE.
You can do it with STM32CubeProgrammer but you need to put the first address of the flash as .bin file does not contain the addresses like HEX file.
2024-08-27 02:12 PM
Hi,
I found this application to program the .bin file. https://www.st.com/en/development-tools/stsw-link004.html.
Is this application ok?
2024-08-27 02:16 PM - edited 2024-08-27 02:25 PM
No this is an old and depricated tool called STLINK-Utility.
This is the link to STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html
And please "accept as solution" the comment that you feel it answered your question.
2024-08-27 04:36 PM
In the business we call the .ELF an "Object File"
https://en.wikipedia.org/wiki/Object_file
2024-08-28 06:07 AM
@cjaya.2 wrote:Hi, what is the difference between .elf file and .bin file to program STM32.
The others have explained the differences.
Note that this is entirely general - not specific to STM32.