LPC2210 - ARM exception handling
2005-02-28 by Messal, Art
Hi All, I am using the LPC2210 with uC-OSII. I am in the process of writing exception handling routines. Does anyone know if there is a 'best know method' to do this? I basically want to dump as much relevant info as possible about the processor state before the exception. I am finding that my solution is not very elegant and I don't want to overlook a simpler method. What I have now, in the Data Abort case: - I get an exception and jump to the corresponding vector - I switch to System mode and push r0-r15 onto the System stack - I put the System SP into r0 - I switch back to the Abort mode and preserve SP_abt and LR_abt in r1,r2 and then put r0 into SP - I then put r1 and r2 on the stack (System stack). - I switch back to System mode and then call a C routine which prints all of this out Does anybody know of a better way? Any tips? Thanks! -Art- Boulder, CO [Non-text portions of this message have been removed]