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.

Interrupt Vector Region/Section Size on new MSP430s (mspgcc) - beware of mmcu setting case sensitivity!

Other Parts Discussed in Thread: MSP430F47196

Hi all,

We had some issues with setting up / configuring interrupts on the MSP430F471 using the latest mspgcc + Eclipse. We were getting a "interrupt vector XX is beyond end of MCU vector table" error when trying to set up an interrupt for Timer B0.

This held us up for a couple of days, and it was only luck that we spotted this post by Stephen Phillips: http://www.mail-archive.com/mspgcc-users@lists.sourceforge.net/msg11246.html

It turns out that case sensitivity is IMPORTANT when it comes to choosing the mmcu argument:

msp430-gcc -IE:\<path>\msp430\include -I<path> -O0 -g3 -Wall -Wextra -c -mmcu=msp430f47196 -mcpu=430x -o _example_main.o ..\_example_main.c

The difference between msp430F47196 and msp430f47196 was enough to cause the interrupt vector sizes (and, we suppose, a number of other things) to be incorrectly defined, meaning were unable to access the entire vector address space.

Before we changed the mmcu setting to lower case, 0xFFE0 - 0xFFFF was all FFs, and the memory map output showed that the ivtbl16 definitions were being used rather than the ivtbl32 definitions. So we knew that was the problem, but had no idea why!

Hopefully this spares someone else some grief ;)

  • That's a nasty bug.
    Apparently, the uppercase F leads to an invalid CPU name, but while MSP430.H doesn't complain as it turns the MMCU variable into uppercase anyway, the rest of the toolchain doesn't complain about an unknown CPU type at all, silently(?) falling back to a generic type (with a differently sized vector table and memory locations)
    So the whole thing compiles and may even link, but won't run. And the compiled object code will use the wrong optimizations, won't use the hardware multiplier and several other things.

**Attention** This is a public forum