| |||
| Home > Tracing Tutorial > Tracing data with auto trace > Procedure | |||
To automatically trace instructions and data:
Remove the tracepoints you set previously:
Right-click on the Load Image+Symbols entry
in the Process Control pane to display the context menu.
Select Unload from the context menu. The image is unloaded.
Right-click on the Load Image+Symbols entry
in the Process Control pane to display the context menu.
Select Load from the context
menu. The image is reloaded and the PC is reset to the image entry
point (0x8000). The tracepoints are removed.
Select Edit ? Automatic Tracing Mode ? Instructions and Data from the Analysis window menu. RealView Debugger generates an ANALYZER CLI command, which is also displayed in the Cmd tab of the Output pane:
analyzer,auto_both
Capture of data accesses (reads and writes) and addresses is performed by default. To check the data tracing mode, select Data Tracing Mode from the Edit menu in the Analysis window. The Data Tracing Mode submenu shows that Data and Address is currently selected.
Set up the ETM:
Select Configure Analyzer Properties... from the Edit menu in the Analysis window to display the Configure ETM dialog box.
In the Trace data width group, make sure that 16 bit is selected.
Click OK to close the dialog box.
Add watches for &average and average:
Select Watch from the View menu of the Code window to display the Watch pane.
Enter the variable name &average. Make sure you press Enter to finish the entry.
Click the trace.c tab in the Code window.
Scroll to the beginning of the source file until
the definition of average is visible at line
23.
Double click on average, to select
the variable.
Copy and paste it into the Watch pane. The two variables are added. An example is shown in Figure 10.43.
Click Run on
the Debug toolbar to start execution.
After
a short time, click Stop on the Debug toolbar
to stop execution. The captured trace is displayed in the Trace tab
of the Analysis window. An example is shown in Figure 10.44.
The captured trace depends on the length of execution. Therefore, the element numbers shown in your captured trace might be different to that shown in this example.
Select Data Value in Hex from the Trace Data menu in the Analysis window to display the Data/Hex column. An example is shown in Figure 10.45.