Part Number: MSP430-GCC-OPENSOURCE
Other Parts Discussed in Thread: MSP430F5172
Tool/software: Code Composer Studio
I'm using this compiler/linker, downloaded yesterday just to be sure (it occured even with the gcc 5 version): msp430-elf-gcc (Mitto Systems Limited - msp430-gcc 8.3.1.25) 8.3.1 GNU ld (Mitto Systems Limited - msp430-gcc 8.3.1.25) 2.26.20160125 Occasionally build fails with /tmp/ccwPDzmE.ltrans0.ltrans.o: In function `.L325': :(.text+0x1a86): relocation truncated to fit: R_MSP430X_10_PCREL against `.L326' In my experience relocation errors occurs when either 1) the program doesn't fit in memory or 2) for some reason a relative jump is too long and can't be done 1) certainly isn't true since the final program is less than 10kB of code; 2) would indicate a code generator/optimizer bug. In fact it only happens with certain compiler optimization flags; with -mmcu=msp430f5172 -O2 -Wall -Wextra --lto sometimes fails, but with -mmcu=msp430f5172 -Os -Wall -Wextra --lto it compiles fine (it even makes smaller code, as implied by Os) I suspect a compiler bug, any idea on that? For the moment I'll work with -Os but having to cope with a flaky compiler is not reassuring