PC Trace use case APIs provide the ability to debug and profile applications in real time. Data is captured either by seperate hardware units (Embedded Trace Buffers, called as ETB) and then decoded offline or captured using external emulators (XDS560PRO or XDS560T) and decoded using CCS.
PC trace is useful to debug and profile only on a single core. There is no visibility to what is going on at the same time in the other cores. The PC trace setup can be done either via CCS or via 'C' code using the ctools use case library. This page describes the instructions for implementing PC trace features via 'C' functions. The library provides the following PC Trace use cases:
- Please note: Only one PC trace use case can be implemented at any point of time. It is not possible to implement multiple PC trace use cases at the same time.
PC Trace - ETB drain via CPU during Exception or App SW fault
- Description: PC trace along with timing trace information in 4KB (DSP ETB size in keystone devices) compressed buffer would be logged into the hardware ETB buffer in a circular way and until any exceptions are triggered in the system or any App SW specific faults are encountered.
The following sequence needs to be executed for this use case:
PC Trace - ETB drain via CPU (capture only 4 KB of PC trace)
- Description: Capture PC trace along with timing trace information in a 4KB (DSP ETB size in keystone devices) compressed buffer. The PC start function needs to be provided to start the trace and PC end function needs to be provided for ending the PC trace.
The following sequence needs to be executed for this use case:
PC Trace - ETB drain via EDMA (ETB extension to capture more than 4KB)
- Description: Capture PC trace along with timing trace information in a buffer greater than 4KB (DSP ETB size in keystone devices). The compressed trace data will be periodically logged into the system memory using the EDMA. The PC start function needs to be provided to start the trace and PC end function needs to be provided for ending the PC trace.
The following sequence needs to be executed for this use case:
PC Trace - No ETB drain (The emulator like XDS560T or XDS560PRO is used to export PC Trace)
- Description: PC trace along with timing trace information would be logged into the the advanced emulator's memory. This can be used for either Exception trace or trace between two functions (start and end functions).
The following sequence needs to be executed for this use case: