Specifying the global address for a variable using the MC9S12XS128

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

Specifying the global address for a variable using the MC9S12XS128

1,924 次查看
aceshigh99
Contributor I

Hello,

 

I'm trying to assign variables to specific global addresses in the MC9S12XS128 data flash memory structure.  So far, I've only been able to successfully do this using the local address space, such as the following:

 

     extern uword EE_VERSION             @(0x0800); 

 

This assignment works fine, and I can see the location in memory using both the logical and global memory views in the debugger.

 

However, if I try to allocate the variable to the corresponding global address:

 

     extern uword EE_VERSION             @(0x100000);

 

I receive the following message: "L4100: Failed to convert address 0x100000 of In debug info because of 'Register area (0..7FF) is not paged"

 

Is there any way to correctly do this, or can I only assign variables to a local address and then do some type of conversion to the global address when manipulating the EEPROM? 

 

How would the compiler know which page I'm assigning the variable to if this is the case?  Does the EPAGE register need to be utilized in conjunction with assignments such as this?

 

Any help would be much appreciated.  Regards.

标签 (1)
0 项奖励
回复
2 回复数

1,096 次查看
CompilerGuru
NXP Employee
NXP Employee

The @ operator uses paged addresses, not global addresses.

So to use page EPAGE FF, use address 0xFF0800.

 

Daniel

0 项奖励
回复

1,096 次查看
Xbot
Contributor II

...or you can use C:\Program Files\Freescale\Codewarrior for HC12 V4.6\Prog\hcs12xadrmap.exe to get the equivalent global address.

 

0 项奖励
回复