I have the following variables:
#define X ... ... code unsigned char pin[X] = { ... }; // there are values here, no 0xFF ... struct { unsigned char pin[X]; } info;
and I need to copy the values from pin into info.pin. However, even direct assignment doesn't change the info.pin values. i.e.:
info.pin[0] = pin[0]; info.pin[1] = pin[1]; info.pin[2] = pin[2]; ... info.pin[X - 1] = pin[X - 1];
the watch window shows info.pin values are still 0xFF and indeed when another code that needs info.pin checks (after the assignment above of course), the values are still 0xFF. What do I have to do to make the values copied?
The assembly code looks fine.
Do the locations 0x0D02 - 0x0D05... physically exist? Is the external RAM, on-chip XRAM or have you connected off-chip external RAM?
Found the problem, the address is actually a flash address instead of RAM, that's why simple copy by assigment doesn't work. Problem solved.