Trace Start Stop Points

From SEGGER Knowledge Base
Jump to navigation Jump to search

Per default when tracing with the J-Trace Pro probe, the target device will be set up to trace the complete target application. However in some cases it can be beneficial if certain application parts can be excluded from the trace recording to e.g. save some bandwidth on very high speed target devices.

It is implementation defined by the target device if and what variants of this feature are available and not all variants may be supported out-of-the-box. For more information on that see below.

Arm Cortex specifics

Trace encoders in an Arm Coresight setup may support:

  • Start/Stop Points: Sets a specific address from where trace capture is either enabled or disabled
  • Include/Exclude Ranges: Sets a specific address range where in between trace is either captured or not

The number of such points and ranges that can be set is implementation defined.

What is currently supported

J-Link software version V8.30 or later is required:

  • Start/Stop Points on target devices with:
    • Arm ETMv3
    • Arm ETMv4

Expected behaviour

ETMv3 and ETMv4 will show different behaviour when using start/stop points. On ETMv3 the start/stop points are address accurate and will exactly start/stop trace on the address you have selected. On ETMv4 the start/stop location will be moved by the target device to the nearest so called PE element, so it is possible that more instructions are included in the trace stream than expected. For more information on PE elements see the Arm ETMv4 documentation.

Please note that the maximum number of trace points is limited and it is also shared with other features like data breakpoints.