This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to determine the cause of an exception abort

Hi,

We are experiencing a data abort exception. My question is simply 'how can we determine the cause of an exception abort', i.e., the offending instruction that caused the abort. Infineon processors record the address of the execution immediately before such an event in a register which is available for inspection following the abort. Is there some similar technique available on the TMS570?

Regards, Tony.

  • If the problem is repeatable, you may want to try setting a hardware break point before the abort entry, then check the CPU register LR (link register). The register should record the offending instruction.

     

  • I think that actually you must the breakpoint within the exception, you can then inspect the link register. You can't set the breakpoint before the abort entry as you don't know where that is!

  • I know this question has been answered but when investigating a similar problem I came across some additional useful information.

    As Stephanie stated, the Link Register (LR or R14) tells you the location of the program counter when the exception was raised. If you have a JTAG debugger, you can put a breakpoint on the exception vectors (for example address 0x10 in the case of a data abort exception) and then examine LR to tell you the approximate location of the problem.

    The following article describes in detail what happens on ARM processors in the event of each type of exception:

    http://www.csie.nctu.edu.tw/~wjtsai/EmbeddedSystemDesign/Ch3-1.pdf

    In particular it describes exactly how LR relates to the Program Counter when the exception occurred and the state of CPSR.

    I hope people find this of use when debugging obscure exception problems.

    Regards,

    Richard