cancel
Showing results for 
Search instead for 
Did you mean: 

The difference between saving .bin and .elf files

ISzum
Associate II

I'm working with STM32H743 and W25Q128 external flash drive. I am trying to develop external loader. When I test with STM32CubeProgrammer and .bin files, everything works fine, writes to 0x90000000 address, verifies and reads OK. When I try to upload .elf

6 REPLIES 6
Uwe Bonnes
Principal III

elf is for debugging and contains much more information. Bin is pure programm data.

Inspect the content of the .ELF, likely has other data beyond the scope of the memories STM32 Cube Programmer is tasked with writing.

The ELF loader could be broken too, but I'd start by inspecting it to see what the problem areas are likely to be.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ISzum
Associate II

I also tried the .hex files and it didn't work

Uwe Bonnes
Principal III

Elf files can be uploaded with a debugger and and appropriate gdb server. HEX is hecadecimal encode binary and interpreted as binary by the CPU will not work.

However a binary file has no way to indicate where to load and if you have code at 0x080xxxxx and 0x90xxxxx, the binary will get huge as the empty space will et filled with zeros.

ISzum
Associate II

I just mean external flash. The external loader writes .bin files correctly, but does not .elf and .hex.

Ok, but you're really not advancing the ball here

What errors specifically are you seeing?

Can you post the .ELF or .HEX files?

Can you post a log from STM32 Cube Programmer with the Verbosity set to 3?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..