Introduction
QT
RACE
-
U
SER
M
ANUAL
© 2018 PDQLogic Ltd.
QTrace User Manual Rev 1.01
Page 5
1.
Introduction
QTrace is a low cost real-time instruction trace system for ARM Cortex M3/M4 processors. It gives
exceptional insight and detailed views of how a target application is running and aids locating hard-to-
find bugs. The system consists of a hardware trace probe and a Windows based trace analyser. It allows
completely unobtrusive full speed tracing and does not require any instrumentation code to be added
to the target application.
With QTrace you don’t need to be a high‐end user with a big budget or wait until
you encounter a really nasty bug before deciding to purchase a trace system.
1.1
Trace overview
Historically, trace systems have been very expensive and have required large connectors to interface to
the users' target board. Trace hardware probes typically contained large amounts of RAM to capture
trace data when a user defined event was triggered. The resulting data was then uploaded to the host
PC for laborious offline analysis.
With the introduction of the ARM Cortex M3/M4 processor cores comes a small footprint trace
interface. Many microcontroller devices based on this core contain a hardware block called an
Embedded Trace Macrocell (ETM) which enables instruction tracing of an application in real-time. The
interface to the ETM block is typically a clock and 4 data lines which are usually presented as multi-
purpose microcontroller GPIO lines that can be programmed to operate as a trace port. These high
speed trace signals are combined with the standard JTAG or SWD debug signals and connect to a 20 way
0.05" pitch header, see Figure 3. An external trace probe is required to decode the trace data frames
streamed by the trace port and transmit their payload data to a host PC.
By implementing a high speed communication link between the trace hardware probe and PC, it is
possible to stream the trace data directly to the PC without the need to capture and then review offline.
This allows a continuous view of what the target application is doing and makes trace far more useful
and easier to visualise than a large collection of static trace records.
To handle high trace data rates resulting from this configuration, the specification of the host PC is
important. It needs to decode the trace data and present a summary of the target processor execution
in real-time with minimal latency and without losing data. PC specification is outlined in section 10 on
page 46.
1.2
QTrace system connections
The block diagram in Figure 1 shows how QTrace connects to a development system and Figure 2 shows
a picture of an example hardware set-up. The QTrace probe is a little different to conventional trace
units in that it doesn't integrate a JTAG
1
interface. Instead it uses a splitter cable to tap-off the trace
signals from the 20 way target trace connector. The target JTAG signals connect separately to the users'
JTAG adapter.
A USB 3.0 connection from on the development PC is used to power the QTrace probe and to stream
trace data from it. A standalone Windows application, the QTrace Analyser, configures the probe then
decodes and displays its streamed trace data.
Having a separate analyser application operating independently of the user supplied IDE
2
means that
investment in existing development tools is not lost. Refer to section 2 for further details of the QTrace
Analyser.
1
References to JTAG also include SWD
2
IDE refers to an integrated development environment and its debugger