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
To analyse your problem, one needs at least the memory model you're using, the linker settings and the exact code snippets.
I do not know about pointers, but offsets as in Ralph[offset] do not push the addressed item across a boundary, it 'folds' instead.
Erik