cancel
Showing results for 
Search instead for 
Did you mean: 

Bin file wrong size?

Luca G
Associate
Posted on June 21, 2018 at 18:10

Hi, I've got a strange problem when generate the bin file from my project. I'm using atollic true studio and then generate the file the dimension are too hi! Anyone have any suggestion?See attached image

Thanks

0690X00000604XsQAI.jpg
3 REPLIES 3
Posted on June 21, 2018 at 18:55

>>I'm using atollic true studio and then generate the file the dimension are too hi!

The linker should output code/data placement and statistics in the .MAP file. This should allow you to identify what is happening and where the size is being accumulated from.

>>Anyone have any suggestion?

You have multiple non-contiguous memory regions, and the .BIN file is a singular file that must span these two regions and any space between them? No real specific detail to work from here.

Read the documentation for your tools, and consider texts on compilers and linkers, and functional expectations there.

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

I had the same problem, i checked the map file, i see no problem, when I change it to hex file, the size of the hex file seems to be OK.

Jeroen3
Senior

A binary file is a literal dump of a memory region. It does not compress or skip regions, like a hex file.

If you create a binary for a STM32F1 for the 32 kB of flash, and you started at 0x0000, you'd have binary of 132 MB.

Check the linker to see which regions it's writing to the binary file.

(also, if you take two nonconsecutive regions, it will pad zeroes in between them)