EmbDev.net

Forum: ARM programming with GCC/GNU tools structs in MAP-file


Author: Mattias Enstedt (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi,

Is there a way to get more information of struct members name, address 
and size in the MAP-file? Today I only get the struct variable name and 
its address.

typedef struct
{
    u16_t member1;
    u16_t member2;

} test_t;

extern volatile test_t test_parameters;

mapfile today
"COMMON         0x2000032c       0x?? C:\parameters.o
                0x2000032c                test_parameters
                0x200003??                . = ALIGN (0x4)
                0x200003??                _ebss = .
                0x200003??                PROVIDE (end, _ebss)
                0x200003??                PROVIDE (_end, _ebss)"

I'm using Ride 7 and GCC.

Best regards

Mattias

Author: kbuchegg (Guest)
Posted on:

Rate this post
0 useful
not useful
> Is there a way to get more information of struct members name,
> address and size in the MAP-file? Today I only get the struct
> variable name and its address.

Ususally not, since all structure member accesses are already completely 
resolved by the compiler, when the linker sees the individual parts and 
creates the map file.

Author: Mattias Enstedt (Guest)
Posted on:

Rate this post
0 useful
not useful
Is it possible to add some compiler/linker directives or comments in 
source code that will bring the struct members to the MAP-file?

/Mattias

Author: kbuchegg (Guest)
Posted on:

Rate this post
0 useful
not useful
What is it, that you want to do?

The information you are seeking, is present in the debug information, 
but it depends on what you want to do, if it is on any use to you.

Author: Huch (Guest)
Posted on:

Rate this post
0 useful
not useful
My magic wand points to: pragma pack

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.