Skip to main content
Nikitha Rakala
Associate
March 5, 2018
Question

STM32F303 Bin File

  • March 5, 2018
  • 8 replies
  • 1829 views
Posted on March 05, 2018 at 04:01

I was analyzing my program bin file to locate the Stack address, PC, Interrupts and Program code and the data section.

Everything looked sorted until interrupts, When it came to the  program code and Data section, i wasn't able to find two distinguished locations. Instead, the data section was merged up in between the program code. 

Can some one help me understand how i can trace out and distinguished the code section and .data section from my bin file? 

0690X00000609ulQAA.png

Thanks for your support!

Nikitha

    This topic has been closed for replies.

    8 replies

    Andrew Neil
    Super User
    March 5, 2018
    Posted on March 05, 2018 at 10:09

    Use the Map file (linker listing) to see how memory has been used

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Nikitha Rakala
    Associate
    March 10, 2018
    Posted on March 10, 2018 at 13:44

    Thanks Neil.

    But my question was on identifying the sections in the bin file.

    Through my map file i understand the begin and end address of the data section(say 0x20000000 to 0x20000400 )

    and the code section.

    with reference to the snapshot of the bin file , i saw these addresses (

    0x20000000 to 0x20000400

    ) were scattered around instead of being bundled somewhere in the bin file.

    Please let me know your thoughts.

    Andrew Neil
    Super User
    March 10, 2018
    Posted on March 10, 2018 at 13:49

    That makes no sense!

    A bin file is just a byte-for-byte image - things cannot be 'scattered around' out of order!

    Are you sure you're not talking about a Hex ('Intel Hex', to be precise) file?

    Or some other format?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.