... | ... | @@ -166,6 +166,48 @@ Define TARGET_IS_TM4C129_RA0 (#define TARGET_IS_TM4C129_RA0) at the beginning of |
|
|
menu:Window[Properties > CCS Build > ARM Compiler > Predefined Symbols]!
|
|
|
|
|
|
|
|
|
{blank}
|
|
|
|
|
|
== While executing an RTOS program I get a very cryptic and long error message about an exception called `E_hardfault` like below. What shall I do?
|
|
|
|
|
|
----
|
|
|
ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED
|
|
|
ti.sysbios.family.arm.m3.Hwi: line 1172: E_busFault: IMPRECISERR: Delayed Bus Fault, exact addr unknown, address: e000ed38
|
|
|
Exception occurred in ISR thread at PC = 0x0002f6ec.
|
|
|
Core 0: Exception occurred in ThreadType_Hwi.
|
|
|
Hwi name: {unknown-instance-name}, handle: 0x20000408.
|
|
|
Hwi stack base: 0x2002a3f8.
|
|
|
Hwi stack size: 0x2000.
|
|
|
R0 = 0x87200746 R8 = 0x0003b3d4
|
|
|
R1 = 0x2002c308 R9 = 0xffffffff
|
|
|
R2 = 0x00000002 R10 = 0xffffffff
|
|
|
R3 = 0x2002c344 R11 = 0xffffffff
|
|
|
R4 = 0x0002b51d R12 = 0x2002a388
|
|
|
R5 = 0x00000000 SP(R13) = 0x2002c308
|
|
|
R6 = 0x00000001 LR(R14) = 0x0002f6e9
|
|
|
R7 = 0x00000001 PC(R15) = 0x0002f6ec
|
|
|
PSR = 0x81000043
|
|
|
ICSR = 0x00423003
|
|
|
MMFSR = 0x00
|
|
|
BFSR = 0x04
|
|
|
UFSR = 0x0000
|
|
|
HFSR = 0x40000000
|
|
|
DFSR = 0x0000000b
|
|
|
MMAR = 0xe000ed34
|
|
|
BFAR = 0xe000ed38
|
|
|
AFSR = 0x00000000
|
|
|
Terminating execution...
|
|
|
----
|
|
|
|
|
|
You can basically treat this case as a segmentation fault (segfault) on the PC.
|
|
|
The most probably reason for the error is that you misused a pointer variable or told RTOS to read from a wrong address (by passing wrong parameters to one of its functions).
|
|
|
|
|
|
Unlike ordinary PC OSes the TI-RTOS gives you much more information in such cases and in theory you can decode all that information by following the instructions in TI's guide on this topic: link:http://www.ti.com/lit/an/spma043/spma043.pdf[Diagnosing Software Faults in Stellaris Microcontrollers].
|
|
|
|
|
|
However, this is usually overkill because you don't need nor want to deal with that much information.
|
|
|
What you usually need to do is simply fix your pointers by using the debugger.
|
|
|
Especially check for NULL pointer dereferences!
|
|
|
|
|
|
{blank}
|
|
|
|
|
|
== Can I contribute to this wiki?
|
... | ... | |