MSP430 Interrupt routines with msp-gcc won't compile -
i using newest ccs msp-gcc compiler. next code
#pragma vector=usci_a1_vector __interrupt void usci_a1_isr(void) {...isr}
which newest officially supported method ti of declaring isr-s not working, next 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 tried different methods, like:
interrupt(usci_a1_vector) usci_a1_isr(void) { //code goes here}
which gives 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 work though:
__attribute__((interrupt(usci_a1_vector))) void usci_a1_isr(void){ //code goes here }
what missing here?
there no c standard interrupt routine declaration (a real pitty). each compiler has it's own way it.
ti relased redhat msp430 gcc lastly month , had no time take it. old mspgcc branch lastly illustration should valid.
mspgcc provides include file improve compiler interop:
#include <isr_compat.h> isr(usci_a1, usci_a1_isr) { // code goes here }
important: remove '_vector' tail isr name
take @ isr_compat.h file. designed work compilers on market. maybe it's thought borrow project, if there's nil similar on compiler suite.
gcc interrupt msp430
No comments:
Post a Comment