I am trying to compile an IAR project with MSPGCC. I am able to build the project. It contains also some assembly sources. In one of them I encountered a weird jump offset problem. I minimized the (demonstration) source file to bare essential, see attached file
The code result shows that the target label for the jump is at relative address (forward) 0x0e. However the offset in the JZ is calculated as if the target label was at (relative) address 0x0..........
best regards
Kees
It appears to be due to the use of .global, which may be confusing part of the assembler into thinking the symbol may be redefined at link time and thus generating code that is intended to be a relocatable jump. Off-hand, it doesn't appear to do this correctly. This is probably a bug, but mspgcc is no longer supported so it won't be fixed.
Work around it by either eliminating the global annotation for I2cStop, or adding a non-local label and jumping to it instead.