Keil™, An ARM® Company

Technical Support

ARM: HOW TO ANALYZE A DATA ABORT EXCEPTION


Information in this article applies to:

  • ARM Version any version

QUESTION

My ARM application does not work. When I run it in the simulator or with my JTAG debugger (ULINK), I see that the program counter (R15) jumps to the label DAbt_Handler?A. What does that mean? How can I find the location where my application crashes?

ANSWER

This is the default Data Abort exception handler. Your application is trying to read or write an illegal memory location. You can calculate the illegal memory location using by subtracting 8 from the value in R14 (link register). Subtracting 8 adjusts for the instruction queue giving you the address of the instruction that caused this exception. For example:

  • R14 value is 0x0000021e
  • 0x0000021e - 8 = 0x00000216.  The instruction which caused the exception is at address 0x00000216
  • Disassemble the instruction using the Unassemble debug command. For this example, type U 0x00000216 in Output Window - Command tab
  • The disassembly window shows the instruction STRB R3,[R1,#0x00] at this address with R1=0x000001bc. The value in R1 points to an on-chip flash area (Philips LPC2000) and cannot be written. In the assembly window, right click on this line and select Show Source Code for current Address to display your source code. Probably a pointer was loaded with a bad address.

MORE INFORMATION

  • Getting Started User's Guide for ARM Powered Microcontrollers
  • Refer to µVision® User's Guide in the µVision® User's Guide.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Thursday, January 11, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure