10.15.2. Capturing trace before a trigger

To display the capture trace before a trigger:

  1. Unload and reload the image:

    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 previous tracepoint is removed.

  2. Set a trigger tracepoint on data writes to output_port that activates after 200 passes:

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

      Figure 10.77. Create Tracepoint dialog box

      Create Tracepoint dialog box

    2. Select Trigger from the tracepoint type drop-down list.

    3. Select Data Write 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. In the Optional Settings group, enter 200 in the Pass times text box.

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

      trcdwrite,hw_out:"Tracepoint Type=Trigger",hw_pass:200 @trace\\output_port

  3. Click Run on the Debug toolbar to start execution. The trigger is activated after 200 writes to output_port, and the captured trace is displayed in the Trace tab of the Analysis window. Figure 10.78 shows an example.

    Figure 10.78. Trace captured before a trigger

    Trace captured before a trigger

  4. Select Find Trigger from the Analysis window Find menu. RealView Debugger searches the trace output and the line of trace corresponding to the trigger point is selected.

  5. Scroll down the trace output to see the captured trace after the trigger point. Figure 10.79 shows an example.

    Figure 10.79. Captured trace before the trigger

    Captured trace before the trigger

  6. Click Stop on the Debug toolbar to stop execution.

See also

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