We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Since some "minor" changes of my program I get a trap (ILLOPA). Until now I could not find out, who triggert this trap. On the stack there is no useable information.
How can I find out who is the bad guy in my code?
I used to practice 'The long hard look at the source code' method a lot. It takes a while, but ultimately all bugs can be fixed this way. But that's not what you are lloking for now, is it? This thread discusses a similar problem: http://www.keil.com/forum/docs/thread12887.asp See if it's relevant to your problem.
Regards, - mike
Thank you Mike,
if I break at the trap-function SP = 0xF7E0
Memory at 0xF7E0 = 00 69 0A 00 08 A8 C0 00 00 00 00 00 40 FC 03 00 0E 67 C0
how do I have to interpret this?
I think it means PSW=0xA808, CSP=0x000A, IP=0x6900. This means the offending instruction is at address 0x0A6900. PSW says that ILVL is 10, that is the trap occured during processing of interrupt at level 10.
0x0a6900 is no valid adress for code because the application runs out of internal flash. So the adress should be above 0xc00000 :-(
I have no idea how to solve the proplem. I am going to start from the point the program was running propperly and add my changes step by step. Maybe this helps to find the function which triggers the trap.