J-Trace

The J-Trace probe has an internal memory buffer of 4MB where it can store trace data. It supports two modes of trace collection, TPIU (or Rawtrace) and Serial Wire Output (SWO), depending on the configuration of the processor. TPIU can output complex trace, that is both ETM and ITM. SWO is a lightweight standard and can only output ITM trace. The benefits of using J-Trace probe is the bigger memory size and the better collection speed. The drawback is that you cannot collect continuous trace, only the last 4MB of trace is stored.

To collect trace data on the Kinetis target using the JTrace connection:

  1. Create a Kinetis project with Segger J-Link connection selected in the Connections screen.
  2. Build the project.
  3. Open the Debug Configurations dialog box.
  4. Select your project in the tree structure on the left.
  5. In the Main tab, click Edit . The Properties dialog box appears.
  6. In the Connection tab, select SWD from the Debug port interface drop-down list.
    Figure 1. Selecting Debug Port Interface for JTrace
    Selecting Debug Port Interface for JTrace
  7. Click OK.
  8. Select the Trace and Profile tab and enable tracing and profiling.
  9. Select the JTrace option and then select the SWO option.
    Note: If you choose TPIU in the Trace and Profile tab for JTrace, you can select either JTAG or SWD (Serial Wire Debug) as debug port interface.
  10. Click Apply.
  11. Debug the application and collect trace.

Refer Collecting Data to know how to collect data on Kinetis target. Refer Viewing Data to know how to view collected trace data.