ARM and interrupts

Toralf Lund toralf@procaptura.com
Tue Mar 23 09:41:00 GMT 2004


Grant Edwards wrote:

>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.
>  
>
Maybe a build option that I've forgotten to pass is required to get this 
functionality, or perhaps I've passed one that disables it without 
knowing it? I'm not sure I want to spend more time trying to figure out 
about this, as it seems like the feature may in any case be considered 
as unreliable, so I should probably look for an alternative implementation.

>  
>
>>__attribute__((interrupt("IRQ"))) void IRQ_Handler(void)
>>    
>>
>
>With a semicolon on the end, right?
>  
>
I tried doing this in the function (forward) declaration with a 
semicolon at the end, and in the definition without one, and both...

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


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