Specifying the global address for a variable using the MC9S12XS128

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Specifying the global address for a variable using the MC9S12XS128

1,264 Views
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.

Labels (1)
0 Kudos
2 Replies

436 Views
CompilerGuru
NXP Employee
NXP Employee

The @ operator uses paged addresses, not global addresses.

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

 

Daniel

0 Kudos

436 Views
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 Kudos