Hi,
I have created a structure variable with two elements i am able to see the structure variable in the map file but the structure elements are missing from the map file. What i have to enable to see the addresses of these structure elements? Please help.
struct test_data_tag
{
int test1;
int test2;
}test_data =
{
1,2
};
From the map file i can see test_data but not able to find the variables test1,test2? i don't know why?
test_data 2100 4 4 1 .data
Hi Rahul,
What is the development tool version you're using and what is the architecture ?
Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for the reply. I am using Codewarrior IDE version 5.9.0. and banked memory model.
Hi Rahul,
It seems you're using CW for HC12 v5.1.
The variables test1 and test2 are defined in the test_data structure.
The map file provide the info regarding the structure and not for the element contained in the structure.
In your case the info:
test_data | 2100 | 4 | 4 | 1 .data |
The structure is located at memory address 0x2100 and the size of 4 bytes is reserved for the element contained in the structure.
If we change int test1; by long test1 we will have:
test_data | 2100 | 6 | 6 | 2 .data |
Always same address but 4 bytes for test1 and 2 for test2.
Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------