pointer cannot cross 64k boundary

I have a big problem with the compiler. It cannot point to the correct location. When I declared a pointer to a structure in EEPROM and try to access a member within it, the member pointed to is incorrect. Seems that it cannot add the offset address to the base address of the structure correctly especially when we are at the boundary of a sector/segment.

Has anyone encountered this? Any quick fix?

Eg,

struct A
{ char x; int y;
}

A EEPROM* Var;

Var->y

Parents Reply Children
No data
More questions in this forum