Specifying the global address for a variable using the MC9S12XS128

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Specifying the global address for a variable using the MC9S12XS128

1,291件の閲覧回数
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 返答(返信)

463件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

The @ operator uses paged addresses, not global addresses.

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

 

Daniel

0 件の賞賛

463件の閲覧回数
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 件の賞賛