Other Parts Discussed in Thread: MSP430F1611, MSP430F2618
I have the following code (simplified for illustration):
uint16 tempStore1; // temp storage of next task SP
asm(" mov tempStore1, SP"); // restore next stack pointer
....
asm(" mov SP, tempStore1"); // save current stack pointer
which generates these errors:
line 230: warning #17003-D: relocation from function "TASK_Switch" to symbol "tempStore1" overflowed; the 18-bit relocated address 0xecfe4 is too large to encode in the 16-bit signed PC-Relative field (type = 'R_MSP430_PCR16_MSPX' (13), file = "./src/OS/RoundRobin.obj", offset = 0x0000001c, section = ".text:_Z17TASK_Switchv")
line 221: warning #17003-D: relocation from function "TASK_Resume" to symbol "tempStore1" overflowed; the 18-bit relocated address 0xe9738 is too large to encode in the 16-bit signed PC-Relative field (type = 'R_MSP430_PCR16_MSPX' (13), file = "./src/OS/RoundRobin.obj", offset = 0x00000030, section = ".text:_Z15TASK_Resumev")
Do I need to use 20 bit instructions ?? e.g. mov.a ??
This code is from an IAR project, which targets an MSP430F2618 and MSP430F1611 processor. IAR does not complain about this (maybe it should ??). Should I change the C code to use a 32 bit variable and change the assembler to use a 20 bit mov.a ?? Why would IAR not complain ??
Thanks, Brendan.