Skip to main content
ISzum
Associate
January 6, 2021
Question

The difference between saving .bin and .elf files

  • January 6, 2021
  • 5 replies
  • 6202 views

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

This topic has been closed for replies.

5 replies

Uwe Bonnes
Chief
January 6, 2021

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

Tesla DeLorean
Guru
January 6, 2021

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 VenmoUp vote any posts that you find helpful, it shows what's working..
ISzum
ISzumAuthor
Associate
January 6, 2021

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

Uwe Bonnes
Chief
January 6, 2021

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
ISzumAuthor
Associate
January 6, 2021

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

Tesla DeLorean
Guru
January 6, 2021

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 VenmoUp vote any posts that you find helpful, it shows what's working..