Does the "@" symbol act as a pointer in header files for Registers?

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

Does the "@" symbol act as a pointer in header files for Registers?

跳至解决方案
888 次查看
bpaehr
Contributor IV

I'm using CodeWarrior 10.6.4 for an MC9S08QB8 device.  I'm fairly new to using the C-Language with micros, but I'm getting there.

A question has arisen from a colleague of mine who has used C much longer than me.  In particular, I reference Page 40 of the "Getting Started with HCS08 and CodeWarrior Using C, Rev. 2" document.  On that page there is a reference to using the "@" symbol as an "absolute address" to location $0065.  In trying to help me with my own understanding of how registers are accessed, he doesn't understand how the "@" symbol is used in the typical device headers (as indicated on Page 40).  He has tried to implement the "@" symbol in his own C-Development environment for one of his own projects (not CodeWarrior), but it was not acceptable there.

How does CodeWarrior/Eclipse treat the "@" symbol?  What is it's meaning?  Is it related to pointers?

标签 (1)
0 项奖励
1 解答
746 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

"Global Variable Address Modifier @ " is only for CW for 8/16bit MCU.

it is used for assign global variables to specific addresses .

for more information, please see attached doc.

if you have question after reading the doc, please feel free to post here.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
747 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

"Global Variable Address Modifier @ " is only for CW for 8/16bit MCU.

it is used for assign global variables to specific addresses .

for more information, please see attached doc.

if you have question after reading the doc, please feel free to post here.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

746 次查看
bpaehr
Contributor IV

Thank you, Jennie.

Bob

0 项奖励