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 ?