This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Size of variables in Mapfile.



Hello All,

Is there are way to tell the linker to output the size of each global variable into the mapfile.  I have set "mapfile_contents=all" but this is still not putting the size in the mapfile.  The address for each variable is being generated but I need to know the size without reconstructing the memory map as gap/fills could affect that computation.

Thanks,

Paul

 

  • Paul P. (P Squared) said:
    Is there are way to tell the linker to output the size of each global variable into the mapfile. 

    No.

    That information is simply not present in the object file itself.  It is encoded in the debug information (that CCS reads to know how to step, watch variables, etc.).  I'm not aware of any command line utility which will dump it all out in a convenient form.  There is the symbol browser in CCS.  But that's interactive only.

    Thanks and regards,

    -George

  • George,

    Thanks for the help...Just to comfirm...there is no TI utility that functions the same as "objdump".

    Thanks,

    Paul

  • There is the object file display utility.  It is named something like ofd6x or ofd470.  It depends on which target architecture you are building for.  You'll find it in the same /bin directory as the compiler.  You may also find the cg_xml package useful.  Scripts from that package can take output from the object file display utility and do interesting things like summarize memory footprint, build static call graphs, etc.

    Thanks and regards,

    -George