why cannot i see the structure elements in the map file

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

why cannot i see the structure elements in the map file

1,510 次查看
rahulkrishna
Contributor IV

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      

标签 (1)
标记 (4)
0 项奖励
回复
3 回复数

1,398 次查看
trytohelp
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,398 次查看
rahulkrishna
Contributor IV

Thank you for the reply. I am using Codewarrior IDE version 5.9.0. and banked memory model. 

0 项奖励
回复

1,398 次查看
trytohelp
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复