Dear C++ Compiler Wizards,
The following code generates error #18 expected a ")":
typedef enum {
USCIAB1TX_isr, USCIAB1RX_isr,
PORT1_isr, PORT2_isr,
RESERVED20_isr, ADC12_isr,
USCIAB0TX_isr, USCIAB0RX_isr,
TIMERA1_isr, TIMERA0_isr,
WDT_isr, COMPARATORA_isr,
TIMERB1_isr, TIMERB0_isr,
NMI_isr,
NUM_VECTORS
} MSP430ISRs;
static unsigned TB0isrCount;
void interrupt CSL_Default_Timer_B0 (void)
{
++TB0isrCount;
TBCCTL0 &= ~CCIFG; /* Do I need to clear the IRQ pending bit? */
}
/*
* The MSP430's interrupt vectors are in flash. Sometimes however the
* application needs to be able to dynamically change the ISR. This jump
* table provides this capability.
*/
unsigned ISR_VectorTable [NUM_VECTORS*2u] = {
0x4010u, 0xFFFEu, /* BRanch to self opcode */
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, 0xFFFEu,
0x4010u, (unsigned) &CSL_Default_Timer_B0,
0x4010u, 0xFFFEu
};
#pragma SET_DATA_SECTION(".int13")
#pragma RETAIN (timerb0irq)
const unsigned timerb0irq = (unsigned) &ISR_VectorTable[TIMERB0_isr*2u];
#pragma SET_DATA_SECTION()
Is this a compiler defect or am I using these pragmas incorrectly? I am using these tools:
Code Composer Studio Version: 5.1.0.09000
MSP430 C/C++ Codegen PC v4.0.0
I also have tried using #pragma FUNC_NEVER_RETURNS (in a different context) but the function still ends with an RTS.
Regards,
Fred