Codewarrior 5.9.0 stop debugger on exception 0x700 instead of continuing execution to exception handler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Codewarrior 5.9.0 stop debugger on exception 0x700 instead of continuing execution to exception handler

856 Views
stefanoesposito
Contributor I

I'm working on a fault injection campaign and I'm interested in processing the 0x700 (invalid opcode) exception through my ISR, but Codewarrior is just showing a dialog and stops the debug session. My system features an MPC7448 processor and I'm using a CodeWarrior USB TAP. How can I stop this from happening and have the exception handler properly executed?

Labels (1)
0 Kudos
4 Replies

537 Views
yipingwang
NXP TechSupport
NXP TechSupport

For MPC7448 target, the CodeWarrior Debugger places a Hardware breakpoint at the exception address(0x00000700 or 0xFFF00700, depending on MSR[IP]) When the chip hit a breakpoint address, it will treat the Program exception as part of breaking handling process, it is import that a valid non-fetching instruction located at this Exception vector points, and it resides in valid memory.  Also, the target code must not alter the MSR[IP] while it is running if you expect to hit a breakpoint. Please check your debug environment to meet this debug environment.

In addition, please put "writereg SP 0x0000000F" in CodeWarrior initialization file to interpret EABI stack frames. These stack frames include pointers, and if the debugger reads invalid stack frames then it will not work.

0 Kudos

537 Views
stefanoesposito
Contributor I

I've just checked my board initialization file, and besides writereg SP 0x0000000F, I've also found the instruction writemem.l 0x700 0x48000000, is this what you meant by non-fetching instruction?

0 Kudos

537 Views
yipingwang
NXP TechSupport
NXP TechSupport

Yes, the infinite loop at program exception prevents taking the exception again.

0 Kudos

537 Views
stefanoesposito
Contributor I

Thanks for the answer. Could you just clarify what you mean by "non-fetching instruction", please? Thank you.

0 Kudos