Fast way to locate the place where error occurs?

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

Fast way to locate the place where error occurs?

1,260 Views
jogging
Contributor I
Hi,
    Nowadays I am writing code on sc140 and sc3400.  Sometimes an exception occurs when the code accesses unavailable memory or illegal instruction, then the processor will go to an ISR. If there are many functions in the codes, it is difficult to locate the place. I am wondering that whether a register exist which can tell the kind of exception, and a register that tell me the place where the instrution is executed and a exception occurs.
  Thanks
Jogging
Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

291 Views
J2MEJediMaster
Specialist I
I'm sort of rusty on my StarCore internals. Read the manuals on the exception handle mechanism for details. There are some interrupt controller registers that ought to hold some details. A general way to troubleshoot the problem would be the check the call stack and determine what function was executing last when the exception occurred.

---Tom
0 Kudos
Reply