Dear all,
when exceptions occur of type PRECISERR the PC of the location where the exception occurred is available. This, though, usually gives no hint to the developer because generally the exception occur in the guts of sysbios code (or any other TI-related library). It would be helpful to get back to the last portion of user code that was called before the crash.
The stack trace unfortunately is generally of no use or at least is not consistent with the error printout.
Example:
ti.sysbios.family.arm.m3.Hwi: line 1087: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1164: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: 70200080
Exception occurred in background thread at PC = 0x2001ab7e.
Core 0: Exception occurred in ThreadType_Task.
Task name: {unknown-instance-name}, handle: 0x200292e8.
Task stack base: 0x20029338.
Task stack size: 0x800.
Using the task handle provided above I know which one of my task was executed last, e.g. task called "foo". This is helpful, but where should I look in foo? Which portion of code was causing the exception? The PC points to a function in Task.c which is called hundreds of times, so I can't put a breakpoint there to find the cause of the crash. Task.c is TI code which I don't know well and gives me no information on the cause of the crash. The call stack given by the debugger is:
0 loader_exit() at exit.c:52,PC = 0x20020FD8 FP = 0x20029830
1 abort() at exit.c:117,PC = 0x20020FE2 FP = 0x20029830
2 exit(int) at exit.c:108,PC = 0x2002100C FP = 0x20029838
3 xdc_runtime_System_exit__E(int) at System.c:133,PC = 0x200234B2 FP = 0x20029848
4 ti_sysbios_BIOS_exitFunc__I(int) at angelha_pem4.c:2609,PC = 0x2002357E FP = 0x20029850
5 ti_sysbios_family_arm_m3_Hwi_excHandlerMax__I(unsigned int *, unsigned int) at Hwi.c:109,PC = 0x20019300 FP = 0x20029858
6 ti_sysbios_family_arm_m3_Hwi_excHandler__I(unsigned int *, unsigned int) at Hwi.c:863,PC = 0x20022F86 FP = 0x200298E8
7 _SlDrvResetCmdExt() at :0,PC = 0xFFFFFFFC FP = 0x200298F0
8 abort() at exit.c:117,PC = 0x20020FE3 FP = 0x200298F0
9 <symbol is not available>,PC = 0x20026500 FP = 0x200298F8
which, again does not point to any portion of code I know and has no connection to the PC location. This indeed is the call stack triggered after the crash by the various layers of exception handling. It would be nice to have the call stack at the very last moment before the exception.
How can I find this information (if possible) or at least find a workaround to this problem?