2022-07-13 10:37 PM
Dear members,
After fiddling a bit with stm32cube ide, I found that after project compilation, I have 3 files generated i.e. elf, hex and bin, in my debug folder.
But the size of all three varies.
Elf is 925kb
Bin is 13kb
Hex is 36 kb
I know elf have lots of extra data + debug info
Bin is raw file without address
Hex is raw file with address
Now my question is, when i look into memory regions of build analyzer, and console output values of text, data and bss sizes, what does it represent?
It it the breakdown of bin or hex or elf file?
By default settings which file is sent to uc, through ide?
Elf, bin or hex?
Thanks and regards
Avinash
2022-07-13 11:46 PM
The .BIN file is the most representative of the data written into the MCUs memory.
From this flash image it unpack the data content into RAM, and zeros the BSS beyond that.
2022-07-14 01:49 AM
https://en.wikipedia.org/wiki/Intel_HEX
https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
This is all general stuff - nothing specific to ST or STM32 or CubeIDE
2022-07-14 02:38 AM
Ok. This part is clear to me, but what is the answer to 2nd part of the question?
2022-07-14 02:39 AM
Ok. This part is clear to me, but what is the answer to 2nd part of the question?
2022-07-14 03:14 AM
"text, data and bss sizes, what does it represent?"
That's really an entirely different question!
Again, this is standard stuff; not specific to STM32 - or even embedded:
https://www.google.com/search?q=what+are+text+data+and+bss
It's all contained in the ELF, but is irrelevant to Hex or Bin.