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.

CCS5.2 MSP430F2013 Linker Warning #10374-D Interrupt vector "USI" does not have an interrupt handler routine

Other Parts Discussed in Thread: MSP430F2013, MSP430WARE

In order to trap unused vectors I added the following to main() :-

#pragma vector=NMI_VECTOR,PORT1_VECTOR,PORT2_VECTOR,RESET_VECTOR,\
TIMER0_A0_VECTOR,TIMER0_A1_VECTOR,USI_VECTOR,WDT_VECTOR
__interrupt void ISR_trap(void){
 WDTCTL = 0;                          // Write to WDT with a wrong password
 }

The standard linker command file "lnk_msp430f2013.cmd" is being used, with the interrupt vectors defined :-

    /* MSP430 INTERRUPT VECTORS          */
    .int00       : {}               > INT00
    .int01       : {}               > INT01
    PORT1        : { * ( .int02 ) } > INT02 type = VECT_INIT
    PORT2        : { * ( .int03 ) } > INT03 type = VECT_INIT
    USI          : { * ( .int04 ) } > INT04 type = VECT_INIT
    SD16         : { * ( .int05 ) } > INT05 type = VECT_INIT
    .int06       : {}               > INT06
    .int07       : {}               > INT07
    TIMERA1      : { * ( .int08 ) } > INT08 type = VECT_INIT
    TIMERA0      : { * ( .int09 ) } > INT09 type = VECT_INIT
    WDT          : { * ( .int10 ) } > INT10 type = VECT_INIT
    .int11       : {}               > INT11
    .int12       : {}               > INT12
    .int13       : {}               > INT13
    NMI          : { * ( .int14 ) } > INT14 type = VECT_INIT
    .reset       : {}               > RESET

The linker throws up two warnings in the Problems window which I don't understand -

1. #10247-D creating output section ".int15" without a SECTIONS specification

-------- there seems to be no ".int15" in the command file, .reset is used instead

2. #10374-D Interrupt vector "USI" does not have an interrupt handler routine.

-------- why doesn't the linker recognise USI_VECTOR in #pragma vector? It doesn't appear to have a problem with any other, and the compiler recognises them all.

(NB: my experience with CCS v5.2 amounts to only 1 day, so I don't know where the compiler and linker expects to find things yet.)

Can anyone shed any light on this ?

  • Errol Kowald said:

    #10247-D creating output section ".int15" without a SECTIONS specification

    -------- there seems to be no ".int15" in the command file, .reset is used instead

    Remove the RESET_VECTOR from the #pragma vector and this warning should go away. That vector seems to generate a .int15 section which in turn generates the warning.

    Errol Kowald said:

    #10374-D Interrupt vector "USI" does not have an interrupt handler routine.

    -------- why doesn't the linker recognise USI_VECTOR in #pragma vector?

    The USI_VECTOR looks ok. It is probably the TIMER ones which are incorrect. I added the following to one of the MSP430 examples for F2013 and it eliminated the warnings:

    #pragma vector=NMI_VECTOR,PORT1_VECTOR,PORT2_VECTOR,TIMERA1_VECTOR,USI_VECTOR,WDT_VECTOR,SD16_VECTOR

    __interrupt void ISR_trap(void){

    WDTCTL = 0;   // Write to WDT with a wrong password

    }

  • Thanks AartiG, the #10247-D warning went away after removing RESET_VECTOR

    the header file msp430f2013.h has the following lines

    #define TIMER0_A1_VECTOR       TIMERA1_VECTOR /* Int. Vector: Timer A CC1-2, TA */
    #define TIMER0_A0_VECTOR       TIMERA0_VECTOR /* Int. Vector: Timer A CC0 */
    which is why I chose TIMER0_A0 etc

    I changed the TIMER0_A0 name to TIMERA0_, likewise TIMERA1, and now I have two #10374-D warnings. The USI warning remains, but now I have

    "TIMERA0" does not have an interrupt handler routine as well.

    I subsequently split the offending the declarations out:-

    #pragma vector = NMI_VECTOR,TIMERA1_VECTOR,PORT1_VECTOR,PORT2_VECTOR,WDT_VECTOR
    __interrupt void ISR_trap(void)
    {
    WDTCTL = 0;
    }


    #pragma vector = USI_VECTOR
    __interrupt void ISR_trap1(void)
    {
    WDTCTL = 0;
    }


    #pragma vector = TIMERA0_VECTOR
    __interrupt void ISR_trap2(void)
    {
    WDTCTL = 0;
    }

    to no avail.

    (BTW, it shouldn't be relevant, but I'm running CCS5.2 in Ubuntu 10.04)

  • Errol Kowald said:

    I changed the TIMER0_A0 name to TIMERA0_, likewise TIMERA1, and now I have two #10374-D warnings. The USI warning remains, but now I have

    "TIMERA0" does not have an interrupt handler routine as well.

    I cannot reproduce this. I used the msp430x20x3_sd16A_01 example from MSP430Ware, added the following line to the C source file (which basically has the same list of vectors as yours) and there were no warnings generated.

    #pragma vector= NMI_VECTOR,PORT1_VECTOR,PORT2_VECTOR,TIMERA0_VECTOR,TIMERA1_VECTOR,USI_VECTOR,WDT_VECTOR

    __interrupt void ISR_trap(void){

    WDTCTL = 0;   // Write to WDT with a wrong password

    }

    If you're still having trouble with the warnings, please zip up your complete project folder and attach it here so we can take a look at it.

  • AartiG said:

    I cannot reproduce this. I used the msp430x20x3_sd16A_01 example from MSP430Ware, added the following line to the C source file (which basically has the same list of vectors as yours) and there were no warnings generated.

    #pragma vector= NMI_VECTOR,PORT1_VECTOR,PORT2_VECTOR,TIMERA0_VECTOR,TIMERA1_VECTOR,USI_VECTOR,WDT_VECTOR

    __interrupt void ISR_trap(void){

    WDTCTL = 0;   // Write to WDT with a wrong password

    }

    If you're still having trouble with the warnings, please zip up your complete project folder and attach it here so we can take a look at it.

    I did the same on my linux system, with no warnings, so the problem may well lie in my code.

    Hours later though, I tried exactly the same thing on my winxp system, also running CCS5.2, and 8 missing interrupt handler warnings resulted.

    I would appreciate it if you cast your eyes over the code ...

    7268.MotorController.zip

  • Errol Kowald said:

    Hours later though, I tried exactly the same thing on my winxp system, also running CCS5.2, and 8 missing interrupt handler warnings resulted.

    I would appreciate it if you cast your eyes over the code ...

    I was able to build your code in CCS5.2 without any warnings. Can you double-check that you are using CCS version 5.2.0.00069 and compiler version 4.1.0? You can check the compiler version by going into Project Properties->General->Compiler version.

    Also make sure to clean the project before rebuilding.

  • I am using CCS version 5.2.0.00069 & compiler 4.1.0 in both my winxp and ubuntu systems.

    Cleaning the project cleared the warnings.

    It appears that warnings can carry over from previous builds, and if encountered, cleaning the project should be the user's next step.

    Thanks for your help AartiG