Starting TraceAlyzer (Streaming Mode)

Starting the TraceAlyzer Streaming Recorder

To start recording you need the host application,  TraceAlyzer for µC/OS-III,  which works with both the streaming and snapshot recorders. The tool can be downloaded from the following link: http://percepio.com/tz/

The host application will connect to the embedded target via an onboard or external J-Link and will stream all the trace data up to the PC.

Before starting the streaming process, open TraceAlyzer and click J-Link -> J-Link Settings and a dialog window similar to the one shown in Figure TraceAlyzer - J-Link Settings will be displayed. Make sure that you have confirmed the following settings:

  • The  J-Link Speed  matches the one supported by your embedded target and the one configured by other tools using the same J-Link session (e.g. Debugger and/or µC/Probe).
  • The Debugger  Interface  matches the one supported by your embedded target and the one configured by other tools using the same J-Link session (e.g. Debugger and/or µC/Probe).
  • The  Target Device  name matches your embedded target and the one configured by other tools using the same J-Link session (e.g. Debugger and/or µC/Probe).
TraceAlyzer - J-Link Settings

Before streaming the data, TraceAlyzer makes an attempt to locate the symbol _SEGGER_RTT where the trace data is stored. You simply need to specify the memory base address where the buffer is located and the range to search.

Click J-Link -> Memory Region and in the dialog window similar to the one shown in Figure TraceAlyzer - Memory Region Settings make sure that the Start Address and the Bytes to Read fields are correct.

TraceAlyzer - Memory Region Settings

Finally, to start a recording click File -> Connect to Target System... and you will be presented with the dialog window shown in Figure TraceAlyzer - Streaming Status Window. At this point, assuming that the embedded application and µC/OS-III are running you can click the button Start Recording.

TraceAlyzer - Streaming Status Window

Recording Status

During the streaming process, you will be presented with a window similar to the one shown in Figure TraceAlyzer - Streaming Status Window.

The blue chart line represents the CPU load in the embedded target.

The counters in the section labeled Trace Session indicate the number of events being transferred and the number of events being dropped due to overflows in the communication.

Overflow events occur when the RTT buffer in the embedded target is full.

This can happen due to the following reasons:

  • J-Link is kept busy by another application using the same J-Link session and cannot read the data fast enough.
  • The embedded target interface speed is too low to read the data fast enough.
  • The embedded application generates too many events to fit into the buffer.

To prevent this:

  • Minimize the interactions of the debugger with J-Link while the embedded target is running. (i.e. disable live watches)
  • Select a higher interface speed in all instances connected to J-Link. (e.g. The debugger, µC/Probe and TraceAlyzer)
  • Choose a larger buffer for TraceAlyzer. (1 - 4 kByte)
  • Run TraceAlyzer stand-alone without a debugger and/or µC/Probe.

Further Reading

For additional and more detailed coverage of TraceAlyzer refer to the TraceAlyzer Documentation.