MSP430G2553 WDT ISR compilation error – GNU v4.9.1

gccmsp430watchdog

I'm using GNU v4.9.1 compiler, and I'm just trying to work with WDT timer:

void __attribute__((interrupt(WDT_VECTOR))) WDT_ISR(void)
{
    P2OUT ^= BIT1;
}

When trying to build it, I keep getting these errors:

section __interrupt_vector_11' will not fit in region `VECT11'

region `VECT11' overflowed by 2 bytes

Do you have any idea, what could cause this?

Thanks.

Best Answer

I'm taking a wild guess here, but maybe you've accidentally enabled Large Memory Model (on newer MSP430s it allows you to address up to 1MB of memory), which turns function pointers to 32-bit, so the pointer to your WDT_ISR() overflows the interrupt vector by two bytes. Check if you're passing the correct compiler flags to GCC.