Hi,
I am using the latest version of the Ctools UClib on a C6678 device. I wanted to use the case: PC Trace - ETB drain via CPU during Exception as described in the documentation.
First it looks all fine. It starting and draining work correctly. But the Tracing is not stopped when an exception is caused, but only when the buffer is drained, which is in general no big problem, since the buffer is usually drained at the begin of the exception handler.
But when I use SYSBIOS exception module with "Exception.enablePrint = true;" there is too much code executed before my custom exception hook (in which the buffer is drained) is called. Thus all I see in the trace data is what happened inside the exception handler, which is in general not so interesting. But the really interesting part of how it has come to that exception is missing. But at least you the CTools UClib provide a great method in debugging the SYSBIOS exception module.
I did some debugging on that and found out that the stop event number was wrong. I changed the following line in ctools_uclib_pct.c:
PCT_INST->excEndParams.eventNumber[0] = AET_EVT_MISC_EXC;
to PCT_INST->excEndParams.eventNumber[0] = AET_GEM_EVT_EXCEP;
Now it works. (using AET_EVT_MISC_EXCEP does not work neither)
I still do not understand the problem. Where is the difference between these events? I would appreciate getting some help on this topic.
Regards Fabian