ARM and interrupts
Grant Edwards
grante@visi.com
Fri Mar 19 16:42:00 GMT 2004
On Fri, Mar 19, 2004 at 02:41:46PM +0100, Toralf Lund wrote:
> BTW, have you written interrupt handlers in C? I'm unsure how to set the
> functions to make them return the correct way etc., or if that's even
> possible with gcc. The example code uses the __irq keyword (as in "void
> __irq FIQ_Handler(void)") to do it, but this doesn't work with gcc, I think.
GCC only knows how to generate interrupt handler code for
certain processors (H8, AVR, others?). Last time I checked ARM
wasn't one of them. So you'll need to write a small assembly
language wrapper that:
1) saves the registers that gcc doesn't preserve across
function calls.
2) call your C function.
3) return from interrupt
--
Grant Edwards
grante@visi.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list