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.
Hi all.
Help me please. I'd like to know, is there a way to get adresses for every variable of a structure by linker possibilites or else? I'd like to get that after *.out is build. Or maybe you can tell me, where can i get those adresses. Map-file contains structures addresses, but not addresses of their members.
Thank you.
Unfortunately, there is no tool which shows you the address of every member of every structure. As you know, the map file shows the address of every structure, but not any members. This same information can also be seen in the output of the name utility nm2000. Read about the name utility in the C2000 assembly language tools manual.
The utility that comes the closest is the utility global_types_gen from the cg_xml package. This utility takes an executable file as input, and uses the debug information in that file to discover and display the layout of every structure in the program.
Thanks and regards,
-George
Perhaps you could use the address of the structure and the offsetof macro to give you the addresses you want.
If nothing else, you could create a table in memory with the offsets of the members in the structure, and then examine the generated code.
Other tools you could use would be an alternate project that included the structure, and printed out the offsets into the structure
( perhaps that program could take the link map as input )
http://www.embedded.com/design/prototyping-and-development/4024941/Learn-a-new-trick-with-the-offsetof--macro