When a task has been pre-empted, or has blocked, its current Program Counter must be stored somewhere, presumably on the stack. We would like to be able to extract this information, preferably in the field, but if this is too difficult, at least in the lab with an emulator connected to CCS. We would like to be able to see where each task was when it was last pre-empted, and how it got there.
I know that CCS is able to extract a stack trace for the current running task, but I have never been able to get a way to "unroll" the stack in the field to produce a stack trace for post mortem analysis, nor has anybody been able to give me a good reason why this can't be done.
The reason we need to be able to do this is that the “Abort” function (bios.SYS.ABORTFXN) has been entered, but there is no useful information available. We need to find out why this function is being called, so we would like to see what tasks were running recently, and where they were in their execution.
We are aware that the TSK_Handle for the task points to a structure that contains, amongst other thing, a Stack Pointer, but this is of little use if we can’t decode the stack.
For a little background, our units reset in the field after they have been running for (almost exactly) 5 days.
This doesn’t happen in the lab.
We do have one set-up in the lab which more closely mimics the situation in the field, and which exhibits the problem, but this means that we need to make the absolute most use of this set-up, and so we would really We understand the differences at a functional level, but these translate to too many differences at the code level to be able to figure out what is happening in the code.

