Christopher E Piggott schrieb:
How do I declare an interrupt service routine from a .S source file rather than as inline assembly? The uCOS-II board support package for the MSP430 family has this in a .S file: interrupt(TIMERA0_VECTOR)
    TA0_ISR:                                    /* TIMERA0 timer ISR */
        .. assembly language routine goes here ..
        RETI
This does not work, and in fact, if you read the mspgcc port manual it doesn't make sense to use interrupt() in this context.

this should work.

"signal.h" contains the needed defines. (you have to use -xassembler-with-cpp, which is the default for .S files (capital letter!) and _GNU_ASSEMBLER_ has to be defined (-D_GNU_ASSEMBLER_ on the command line)

What I want to know is whether or not it's possible to simply set the __attribute__ for the label TA0_ISR to force the standard crt0 to add this to the vector table.

actualy, the interrupts are hardcoded names like vector_ffe2 (the c startup code references these names)

chris

Reply via email to