I'm trying to override the standard method provided in SAM7.S in a RealView project for an ATMEL AT91SAM7S processor that vectors to the interrupt service routines. I've found a couple of references on the subject, but am struggling to try something simple to take my first step.
Basically, I'm trying to create either a C or ASM function that just reads the interrupt vector from the AIC and calls that function. The default method provided in SAM7.S vector table is:
; LDR PC,IRQ_Addr LDR PC,[PC,#-0xF20] ; LDR PC,FIQ_Addr LDR PC,[PC,#-0xF20]
I've read in app notes, etc. how the above works by branching to the IRQ vector obtained by reading it from FFFFF100, but that's not what I want to do. Ultimately, I want to branch to a function that can save the processor's context, service the interrupt, restore a context and return. For now, I'd be happy with a function that just read the IRQ vector and called the ISR and returned. I'm using a ULINK in my RealView project, but I can't seem to get a breakpoint to break in the interrupt vector table (even if I use the default SAM7.S provided method, which does work in my app, when I opt to use it), so I can't step through the code and figure out why it doesn't work. I always end up in the PAbt_Handler if I comment out the two uncommented lines and uncomment the two commented lines. I did write C functions named IRQ_Addr and FIQ_Addr, declare them as EXTERN in SAM7.S. These changes build without any errors or warnings, but setting a breakpoint in those functions doesn't ever stop the debugger there. Can anyone provide me the bare bones minimum changes to a RealView project for an ATMEL AT91SAM7S processor to the interrupt vector table in SAM7.S to implement custom IRQ and FIQ handlers. All I need (or would like to see) is a set of C functions for those two handlers that read the IRQ vector from the AIC, call the ISR and return, and that included the min ISR entry/exit code. I think that'd be enough to get me started. Thanks for any help. Dave.