This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GCC optimization removes interrupt service routine

GCC optimization removes interrupt service routine. This happens at least with -O1 and -Os. The ISR is removed and the interrupt vector is not set. Thus the occurring interrupt will jump to 0xffff.

We use current gcc_msp430_4.9.14r1_167 of CCS for a MSP430 target microcontroller.

Attached you will find a stripped down source code and also the elf-files, readelf output and a memory dump.


bug-optimization-removes-interrupt-service-routine.zip