This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Interrupts for Arm-elf-gcc


>> How does someone write an interrupt for an ARM,i.e. what directives
   do I use within gcc?

You don't. Instead you write a very small piece of code in assembly
language which calls your C function.

It's really quite simple.

     push the important registers
     [ use the STM instruction ]

     bl	  your_c_function

     pop  the important registers
     [ use the LDM instruction ]

     If you use the funny attributes on the LDM instruction, the LDM
     will effectively do the mode switch for you.

Pretty simple.

-Duane.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]