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: ARM and interrupts


On Fri, Mar 19, 2004 at 05:42:34PM +0100, Toralf Lund wrote:

>> I've written ISRs in C, but you don't want to do that with GNU.  What 
>> you want to do instead is provide a "stub" ISR in assembly language 
>> (only two or three instructions), that calls the C "ISR".  That way, 
>> you aren't dependent on gcc's intermittent support of the 
>> __interrupt__ attribute.
> 
> Is what you are saying basically that __attribute__((interrupt)) doesn't 
> work?

It's not a widely used feature, so the likelyhood of bugs is
higher than with other features.  The H8 equivalent looks like
it's working fine, but there have been fairly recent bugs where
GCC wasn't saving a register that it was using.

> I did find the doc on this after all (in gcc info page), and tried

The info page does claim that it works.

> __attribute__((interrupt("IRQ"))) void IRQ_Handler(void)

With a semicolon on the end, right?

> but got
> 
> mc9328irq.c:88: warning: `interrupt' attribute directive ignored

Interesting...

-- 
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


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