| ARM Technical Support Knowledge Articles | |
|
HOW TO ANALYZE A DATA ABORT EXCEPTION
Applies to: ARM Development Tools
Answer
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 theCommand window (View - Command Window).
- 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 Debug Windows and Dialogs in the µVision4 User's Guide.
本文解释了当ARM应用程序在模拟器或JTAG调试器中运行时遇到数据异常中断的情况,如何通过查看程序计数器(R15)跳转到DAbt_Handler的默认异常处理程序来定位问题。通过从R14链接寄存器的值中减去8,可以计算出导致异常的非法内存位置。使用Unassemble调试命令反汇编该指令,确定具体位置并显示源代码,可能发现错误的指针加载。
Document Merge (0)
740

被折叠的 条评论
为什么被折叠?



