Well, that was embarassing.
 
The question should have been:
 
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.
 
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.
 
Alternatively, I know it can be done by creating my own
INTERRUPT_VECTORS symbol, but this forces me to write my own startup.  I
can do that but I don't want to waste my time until I know if it's
possible to simply set an attribute on the symbo TA0_ISR that causes
gcrt0.s to notice it.
 
--Chris
 

Reply via email to