Interrupts for Arm-elf-gcc
Shaun Jackman
sjackman@pathwayconnect.com
Tue Jul 22 16:47:00 GMT 2003
This is what I use. I'd be interested in hearing if anybody has a
simpler solution. In particular, if __attribute__((interrupt)) has been
implemented for arm-elf since I used it last.
Cheers,
Shaun
/**
* Interrupt service routine.
*/
__attribute__ ((unused))
static void isr(void)
{
// your code here
}
/**
* Dispatch the interrupt service routine.
*/
void isr_dispatch(void);
__asm("\nisr_dispatch:"
"\n stmfd sp!, {r0-r3, r12, lr}"
"\n bl isr"
"\n ldmfd sp!, {r0-r3, r12, lr}"
"\n subs pc, lr, #4" "\n");
On Tue, 2003-07-22 at 10:30, David Mc Kenna wrote:
> Hi all,
>
> How does someone write an interrupt for an ARM,i.e. what directives do I use
> within gcc?
>
> Thanks,
> Dave Mc Kenna
------
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