Changes

Jump to: navigation, search
no edit summary
In general, the same techniques used for debugging kernel code, such as setting breakpoints, stepping through code, watching variables, and viewing memory contents, can be performed in the same way for processes and tasks.
Virtual address spaces are distinguished in TRACE32 using the concept of spaceID, which is enabled with the option:
<pre>
SYStem.Option MMUspaces ON
</pre>
The memory addressing is extended using the lower 16 bit of the process PID, allowing in this way to distinguish between equal virtual addresses for different processes.
[[File:AN-BELK-001_15.png|600px|thumb|center]]
===Setting up the FreeRTOS debug configuration===
A similar kernel awareness concept as Linux, is provided by Lauterbach for many other RTOS. Among the others, also FreeRTOS is supported with the following awareness configuration.
<pre>
; load FreeRTOS awareness
&core1 TASK.CONFIG ~~/demo/arm/kernel/freertos/freertos.t32
&core1 MENU.ReProgram
~~/demo/arm/kernel/freertos/freertos.men
</pre>
The FreeRTOS kernel awareness is loaded into the second TRACE32 application, and will not affect the first one.
As of symbol information it’s enough to load the proper symbol file, redirecting the <code>Data.LOAD </code> command to <code>&core1</code>. In this way, the second TRACE32 application will have visibility of FreeRTOS HLL debug info.The FreeRTOS menu file (<code>freertos.men</code>) includes useful menu items developed for the TRACE32 GUI to ease FreeRTOS debugging.
For more details, please refer to “RTOS ''RTOS debugger for FreeRTOS” FreeRTOS'' manual (<code>rtos_freertos.pdf</code>).
===Onchip trace===
The Zynq chip implements the ETB (Embedded Trace Buffer), a CoreSight hardware component providing on-chip trace functionality. The ETB stores program-flow trace information on-chip at high rates and at 32-bit data width. The data can be read out via JTAG, when the trace recording has ended.
This trace method is enabled in TRACE32 with the following commands, respectively performed on each GUIs of AMP configuration:
<pre>
Trace.METHOD Onchip ; select the ETB as source ; for the trace information
</pre>The TRACE32 menu item “Trace ''Trace ? Configuration” Configuration'' allows a full control of configuration, initialization and listing of trace information.
The trace, recorded for each core by each AMP TRACE32 GUI, can be synchronized using the XTRACK feature of TRACE32. In this way, an easy comparison is possible of program flow of each core at the same time.
The XTRACK feature is enabled with the following commands:
<pre>
&core0 Synch.XTRACK localhost:&intercomport_core1
&core1 Synch.XTRACK localhost:&intercomport_core0
</pre>Each trace window will follow the time / record synchronization of other trace windows, if the option <code>/Track </code> is used.
The following images show Linux onchip trace XTRACKED vs FreeRTOS onchip trace:
[[File:AN-BELK-001_16.png|600px|thumb|center]]
[[File:AN-BELK-001_17.png|600px|thumb|center]]
For further details, please refer to “Training ''Training Real-time Trace” Trace'' manual (<code>training_trace.pdf</code>).
===Summary view===
In the pictures below, all the concepts previously discussed are shown as a summary global view of TRACE32 debugger, respectively for Zynq core 0 running a Linux kernel, and Zynq core 1 running a FreeRTOS based application.
4,650
edits

Navigation menu