10.9.2. Procedure

To automatically trace instructions and data:

  1. Remove the tracepoints you set previously:

    1. Right-click on the Load Image+Symbols entry in the Process Control pane to display the context menu.

    2. Select Unload from the context menu. The image is unloaded.

    3. Right-click on the Load Image+Symbols entry in the Process Control pane to display the context menu.

    4. 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.

  2. 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

  3. 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.

  4. Set up the ETM:

    1. Select Configure Analyzer Properties... from the Edit menu in the Analysis window to display the Configure ETM dialog box.

    2. In the Trace data width group, make sure that 16 bit is selected.

    3. Click OK to close the dialog box.

  5. Add watches for &average and average:

    1. Select Watch from the View menu of the Code window to display the Watch pane.

    2. Enter the variable name &average. Make sure you press Enter to finish the entry.

    3. Click the trace.c tab in the Code window.

    4. Scroll to the beginning of the source file until the definition of average is visible at line 23.

    5. Double click on average, to select the variable.

    6. Copy and paste it into the Watch pane. The two variables are added. An example is shown in Figure 10.43.

      Figure 10.43. Watch pane

      Watch pane
  6. Click Run on the Debug toolbar to start execution.

  7. 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.

    Note

    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.

    Figure 10.44. Captured trace in Analysis window

    Captured trace in Analysis window
  8. 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.

    Figure 10.45. Data/Hex column displayed in the Analysis window

    Data/Hex column displayed in the Analysis window
Copyright © 2006, 2007 ARM Limited. All rights reserved.ARM DUI 0322B
Non-Confidential