Skip to main content
Luca G
Visitor II
June 21, 2018
Question

Bin file wrong size?

  • June 21, 2018
  • 3 replies
  • 1965 views
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
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    June 21, 2018
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    Ofer
    Associate III
    September 29, 2018

    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
    October 1, 2018

    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)