MC9S12XEQ - Running XGATE code out of paged (i.e. banked) RAM

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

MC9S12XEQ - Running XGATE code out of paged (i.e. banked) RAM

Jump to solution
484 Views
nimisht
Contributor I

Hello,

 

I am currently using a MC9S12XEQ512 controller.

 

I'm trying to run XGATE code out of paged RAM (RAM_F8 and RAM_F9).

 

My linker .prm file is set up correctly, and I have used the appropriate pragmas in the XGATE ISR code to ensure that the XGATE ISR will run out of paged RAM.

 

However, when I link the file, I get the error message: "L1128: Cutting value _Range beg data member from 0xF81100 to 0x1100".

 

On startup, I stepped through the code and noticed that the XGATE code does not get copied over correctly from FLASH to the appropriate banked/paged RAM location.

 

As a result of this, the XGATE vectors to an uninitialized location in RAM (0xF81100)  when an interrupt occurs, and eventually raises a software error.

 

Is there a way to ensure that the XGATE code can run out of paged (i.e. banked) RAM correctly?

 

Thanks a lot in advance.

Labels (1)
0 Kudos
1 Solution
389 Views
kef2
Senior Contributor IV

Hi,

You should make sure there's -D__FAR_DATA in compiler command line setting. Look in startup.c file for what does __FAR_DATA define do.

Edward

View solution in original post

0 Kudos
2 Replies
390 Views
kef2
Senior Contributor IV

Hi,

You should make sure there's -D__FAR_DATA in compiler command line setting. Look in startup.c file for what does __FAR_DATA define do.

Edward

0 Kudos
389 Views
nimisht
Contributor I

Thanks! That did the trick :smileyhappy:

0 Kudos