This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OVERWRITE EXCEPTION HANDLER

Hello,

I use the NXP LPC 2368 and want to write a function to save the exceptions Data Abort Error, Undefined Instruction Error and Pre-fetch Abort Error in a seriel EEPROM and after reset the CPU.
How can I overwrite the dummy exception handler Undef_Handler, PAbt_Handler and DAbt_Handler with C code?
I found the technical support:
http://www.keil.com/support/docs/3027.htm
If I write the irq-functions there is no warning and no error so far so good. But if I test the irq the PC stuck always in the dummy function in startup and not in my own function!
Somebody have a idea?

Parents
  • Thank you very much for the help. The startup assembler is very hard to understand for me. The solution above works! But now I get a warning (after the linking process):
    Warning: L6306W: '~PRES8' section lpc2300.o(RESET) should not use the address of 'REQ8' function ProgramAbortHandler. In the technical Support I read this: http://www.keil.com/support/docs/3268.htm
    So what I did was PRESERVE8 put in the first line of my start up code. But after i get a compiler error:
    error: A1355U: A Label was found which was in no AREA
    Now the Joke of the Day: The label is the PRESERVE8 comand! First I think I wrote wrong. But I copy and paste it of the technical support document!

    So the solution of the technical support is not the best way. Anybody know why there is a linker-warning and how I can solve it?

Reply
  • Thank you very much for the help. The startup assembler is very hard to understand for me. The solution above works! But now I get a warning (after the linking process):
    Warning: L6306W: '~PRES8' section lpc2300.o(RESET) should not use the address of 'REQ8' function ProgramAbortHandler. In the technical Support I read this: http://www.keil.com/support/docs/3268.htm
    So what I did was PRESERVE8 put in the first line of my start up code. But after i get a compiler error:
    error: A1355U: A Label was found which was in no AREA
    Now the Joke of the Day: The label is the PRESERVE8 comand! First I think I wrote wrong. But I copy and paste it of the technical support document!

    So the solution of the technical support is not the best way. Anybody know why there is a linker-warning and how I can solve it?

Children