Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » MSPGCC
  • » [Mspgcc-users] RE: Making entries into the interrupt vector table from assembly language [RSS Feed]

#1 Dec. 6, 2005 18:32:08

Christopher E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] RE: Making entries into the interrupt vector table from assembly language


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

Offline

#2 Dec. 6, 2005 22:51:29

Chris L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] RE: Making entries into the interrupt vector table from assembly language


Christopher E Piggott schrieb:How do I declare an interrupt service routine from a .S source filerather than as inline assembly?The uCOS-II board support package for the MSP430 family has this in a .Sfile:interrupt(TIMERA0_VECTOR)TA0_ISR: /* TIMERA0 timer ISR */
.. assembly language routine goes here ..
RETIThis does not work, and in fact, if you read the mspgcc port manual itdoesn'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 (capitalletter!) and _GNU_ASSEMBLER_ has to be defined (-D_GNU_ASSEMBLER_ on thecommand 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 addthis to the vector table.actualy, the interrupts are hardcoded names like vector_ffe2 (the cstartup code references these names)chris

Offline

#3 Dec. 7, 2005 00:34:32

Christopher E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] RE: Making entries into the interrupt vector table from assembly language


Thanks, that set me in the right direction. In fact, my filename was .S
but in my dependency list in the makefile I had put .s. Since it's
windows, it found the file and passed it to the assembler as .s. I have
made a mental note to always give it the flag from now on.

Offline

  • Root
  • » MSPGCC
  • » [Mspgcc-users] RE: Making entries into the interrupt vector table from assembly language [RSS Feed]

Board footer

Moderator control

Enjoy the 24th of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support