10.11.2. Procedure

To trace all data accesses to a specific address:

  1. Remove the tracepoints you set previously:

    1. Right-click on the Load Image+Symbols entry in the Process Control view 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 view 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. Enable timestamping:

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

    2. Select Enable timestamping.

    3. Click OK. The Configure ETM dialog box closes. RealView Debugger generates a ETM_CONFIG CLI command, which is also displayed in the Cmd tab of the Output view:

      etm_config,syncfreq:0,packauto,time

  3. Set a tracepoint to trace data accesses to *output_port (address 0x20000):

    1. Select Debug → Tracepoints → Create Tracepoint... from the Code window main menu to display the Create Tracepoint dialog box. Figure 10.58 shows an example.

      Figure 10.58. Create Tracepoint dialog box

      Create Tracepoint dialog box

    2. Select Trace Instr and Data from the tracepoint type drop-down list.

    3. Select Data Access from the tracepoint comparison type drop-down list (that is, the on field).

    4. Enter the address to be traced (that is, the when field). In this case, the address to be traced corresponds to the symbol output_port. Therefore, enter @trace\\output_port.

      Note

      Because this is a pointer, you do not have to prefix the variable name with &.

    5. Click OK. The Create Tracepoint dialog box closes, and the tracepoint is set. RealView Debugger generates a TRACEDATAACCESS CLI command, which is also displayed in the Cmd tab of the Output view:

      trcdaccess,hw_out:"Tracepoint Type=Trace Instr and Data" @trace\\output_port

  4. Click Run on the Debug toolbar to start execution.

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

  6. Select Clear Filtering from the Filter menu.

  7. Select Function Boundaries from the Trace Data menu to hide the function boundaries. Figure 10.59 shows an example.

    Note

    The symbol for the data accesses is output_fifo. This is because the variable output_port used in the program is assigned to output_fifo at line 28 in trace.c.

    Figure 10.59. Captured trace in Analysis window

    Captured trace in Analysis window

See also

Copyright © 2006-2009 ARM Limited. All rights reserved.ARM DUI 0322D
Non-Confidential