Different memtype order necessary?

Hi

I'd like to put a struct

typedef struct
{
     U32 a;
     U8 b[8];
     U8 c;
} MyType;

...

MyType xdata *pMyVar;

in XRAM to a particular address section that starts at 0x1000. Therefore I added "XDATA(0x1000)" in the linker command (BL51). But unfortunately the linker doesn't place the variable to an address above 0x1000 but somewhere below instead!

But when I swap the deklaration to

xdata MyType *pMyVar;

everything works as expected! Is there a different between those two declarations? According to http://www.keil.com/support/man/docs/c51/c51_le_xdata.htm the first (not-working) variant is the correct one!

I am confused. Any ideas?

Jonathan

Parents Reply Children
No data
More questions in this forum