Specifications

13
In order to receive information about task switches the
following method can be used: Trace information on
the write cycle in which the kernel writes the identifier
for the current task on the corresponding OS variable
can be generated using the ITM. As described above
the write access information can be integrated seam-
lessly into the program flow trace. This improves the
readability of the trace listing (see figure 16). The inte-
gration of the task switch into the program sequence
also forms the basis for the runtime analyses shown
in the figure 16.
Three Recording Modes
To record the trace information generated by the
Cortex-M3/M4 processors, Lauterbach supports three
modes:
• FIFO mode:Storingtheinformationinthe128MByte
memory of the TRACE32 CombiProbe.
• STREAM mode: Streaming the information to a
hard-disk on the host computer.
• Real-time Profiling: The trace information is
streamed to the host computer and analyzed during
runtime.
For the first two recording modes, the trace informa-
tion is collected and the trace analysis is undertaken
after recording is completed.
Each recording mode has its own features. FIFO is the
most commonly used mode. It is quick and usually all
that is needed for error location and the runtime analy-
ses.
The ETMv3 implemented on Cortex-M3/M4 proces-
sors has neither a trigger nor a trace filter. It is not
possible to select for recording only those program
segments that are needed for troubleshooting. This
can mean trace data might have to be collected for a
relatively long period in order to cover the area needed
for analysis. In this case the STREAM mode can be
the best option. The STREAM mode, however, places
high demands on the debug environment:
• Thelargeamountofdatathatresultsfromstream-
ing requires a 64-bit TRACE32 executable. This is
needed to allow the address range for the large
number of trace entries that will be collected.
• The transfer rate between CombiProbe and host
computer must be fast enough to stream all trace
datawithoutadataloss.The128MBytememoryof
the CombiProbe is used to cushion load peaks from
the trace port (TPIU).
Real-time Profiling is particularly suitable for perform-
ing statement and condition coverage. The coverage
analysis can be followed live on the screen and the
test results are visible immediately (see figure17). “ok”
marked lines are already covered.
Cortex-M3/M4 Core
Formatter
DWT
4 hardware watchpoints
on load/store operations
ITM
Instrumentation Trace
Macrocell
ETMv3
Instruction flow
only
TPIU
Trace Port Interface
Unit
Statement coverage on running system
Function coverage on running system
TRACE32
CombiProbe
Fig. 17: Real-time profiling enables code-coverage analysis to be followed
live on the screen