J-Link / J-Trace User Guide (UM08001) - Microcontrollers
J-Link / J-Trace User Guide (UM08001) - Microcontrollers
J-Link / J-Trace User Guide (UM08001) - Microcontrollers
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
9.2 Embedded <strong>Trace</strong> Macrocell (ETM)<br />
Embedded <strong>Trace</strong> Macrocell (ETM) provides comprehensive debug and trace facilities<br />
for ARM processors. ETM allows to capture information on the processor's state without<br />
affecting the processor's performance. The trace information is exported immediately<br />
after it has been captured, through a special trace port.<br />
<strong>Microcontrollers</strong> that include an ETM allow detailed program execution to be recorded<br />
and saved in real time. This information can be used to analyze program flow and<br />
execution time, perform profiling and locate software bugs that are otherwise very<br />
hard to locate. A typical situation in which code trace is extremely valuable, is to find<br />
out how and why a "program crash" occurred in case of a runaway program count.<br />
A debugger provides the user interface to J-<strong>Trace</strong> and the stored trace data. The<br />
debugger enables all the ETM facilities and displays the trace information that has<br />
been captured. J-<strong>Trace</strong> is seamlessly integrated into the IAR Embedded Workbench®<br />
IDE. The advanced trace debugging features can be used with the IAR C-SPY debugger.<br />
9.2.1 Trigger condition<br />
The ETM can be configured in software to store trace information only after a specific<br />
sequence of conditions. When the trigger condition occurs the trace capture stops<br />
after a programmable period.<br />
9.2.2 Code tracing and data tracing<br />
Code trace<br />
Code tracing means that the processor outputs trace data which contain information<br />
about the instructions that have been executed at last.<br />
Data trace<br />
Data tracing means that the processor outputs trace data about memory accesses<br />
(read / write access to which address and which data has been read / stored). In<br />
general, J-<strong>Trace</strong> supports data tracing, but it depends on the debugger if this option<br />
is available or not. Note that when using data trace, the amount of trace data to be<br />
captured rises enormously.<br />
9.2.3 J-<strong>Trace</strong> integration example - IAR EWARM<br />
In the following a sample integration of J-<strong>Trace</strong> and the trace functionality on the<br />
debugger side is shown. The sample is based on IAR’s EWARM integration of J-<strong>Trace</strong>.<br />
J-<strong>Link</strong> / J-<strong>Trace</strong> (<strong>UM08001</strong>) © 2004-2010 SEGGER Microcontroller GmbH & Co. KG<br />
189