Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] {To TomW} GCC-Bug in IRQs

2006-03-25 by Robert Adsett

At 07:49 PM 3/25/2006 +0100, Sten wrote:
>I've tried this. But entry/exit is still not correct.
>Here's the result:
>
>void uart_irqHandler0(void) __attribute__((interrupt));
>
>00000204 <uart_irqHandler0>:
>  204:   e24ee004        sub     lr, lr, #4      ; 0x4
>  208:   e92d500f        stmdb   sp!, {r0, r1, r2, r3, ip, lr}
>  20c:   e3a0120e        mov     r1, #-536870912 ; 0xe0000000
>  210:   e2811903        add     r1, r1, #49152  ; 0xc000
>  214:   e3a00000        mov     r0, #0  ; 0x0
>  218:   ebfffffe        bl      d0 <uart_irqHandler_common>
>  21c:   e8bd500f        ldmia   sp!, {r0, r1, r2, r3, ip, lr}
>  220:   e25ef004        subs    pc, lr, #4      ; 0x4
>
>Question:
>Which gcc version do you use? Which command line parameters do use?
>How do you differentiate between IRQ and FIQ (only r0..r7 need to be 
>saved) if use
>__attribute__((interrupt)) only?


Rather than go through all this hand-wringing why not just write an 
assembly stub?  You'd know it was correct and you'd be done already.  At 
most it would cost you an extra call from the stub to your C 
function.  Heck if it was small enough it might make sense to do the whole 
thing in asm.  For that matter you could steal one of my stubs.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.