I am using the newest CCS with MSP-GCC compiler. The following code
#pragma vector=USCI_A1_VECTOR
__interrupt void USCI_A1_ISR(void)
{...isr}
which is the newest officially supported method by TI of declaring ISR-s is not working, I get the following complier messages:
warning: ignoring #pragma vector [-Wunknown-pragmas]
#pragma vector=USCI_A1_VECTOR
^
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
__interrupt void USCI_A1_ISR(void)
I have also tried different methods, like:
interrupt(USCI_A1_VECTOR) USCI_A1_ISR(void) { //code goes here}
which gives the error:
c:/ti/ccsv6/ccs_base/msp430/include_gcc/msp430f5529.h:5328:33: error: expected declaration specifiers or '...' before '(' token
#define USCI_A1_VECTOR (47) /* 0xFFDC USCI A1 Receive/Transmit */
^
../uart_printf.c:40:11: note: in expansion of macro 'USCI_A1_VECTOR'
interrupt(USCI_A1_VECTOR) USCI_A1_ISR(void)
^
This seems to work though:
__attribute__((interrupt(USCI_A1_VECTOR)))
void USCI_A1_ISR(void){ //code goes here }
What am I missing here?