Other Parts Discussed in Thread: MSP430F5419A
Hi,
I used msp-elf-gcc-5.0.0.0. I tried updating the toolchain to the latest 6.1.1.0 (GCC 7.3.2.154).
When I used the gcc with -O2 option, both compiling and linking works. But the code repeats halted and watchdog reset.
When I used the gcc with -O1 option, the linking is failed with messages below:
/Users/jsjeong/Work/nol.a-sdk-core/nola-sdk/make/../ti-msp430f5438a/libcoxos.a(digital-io.o): In function `digitalWriteInternal': digital-io.cpp:(.either.text.digitalWriteInternal+0x9e): relocation truncated to fit: R_MSP430X_ABS16 against symbol `pinInfo' defined in .either.rodata.pinInf o section in /Users/jsjeong/Work/nol.a-sdk-core/nola-sdk/make/../ti-msp430f5438a/libcoxos.a(Platform.o) digital-io.cpp:(.either.text.digitalWriteInternal+0xc8): relocation truncated to fit: R_MSP430X_ABS16 against symbol `pinInfo' defined in .either.rodata.pinInf o section in /Users/jsjeong/Work/nol.a-sdk-core/nola-sdk/make/../ti-msp430f5438a/libcoxos.a(Platform.o) collect2: error: ld returned 1 exit status
I don't know why the pinInfo structure truncated. I'm using both -mcode-section=either and -mdata-section=either.
With adding __attribute__ ((section(far_rom))) to the pinInfo declaration, above error is resolved and the linking is success, but the code repeats halted and watchdog reset like the result of using -O2.
So, I tried downgrading to the 6.0.1.0 (GCC 7.3.1.24), then my code works.
Please, check it.
Thanks,
Jongsoo