10.6.2. Procedure

To limit the captured trace to a specific function:

  1. Remove the tracepoint and breakpoint you set previously. To do this, select Debug → Breakpoints → Clear All Break/Tracepoints from the Code window main menu.

  2. Reload the image:

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

    2. Select Reload from the context menu. The image is reloaded and the PC is reset to the image entry point (0x8000).

  3. Enable cycle accurate tracing for the ETM:

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

    2. Select Cycle accurate tracing.

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

      etm_config,syncfreq:0,packauto,cycle

  4. Set a Trace Start Point at the start of GetData():

    1. Click the trace.c tab.

    2. Right-click in the gray margin at line 143 to display the context menu.

    3. Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box.

    4. Select Trace Start Point from the list of tracepoint types.

    5. Click OK. The dialog box closes, and the Trace Start Point is set as indicated by the green arrow . Figure 10.16 shows an example:

      Figure 10.16. Trace Start Point set at start of a function

      Trace Start Point set at start of a function

      RealView Debugger generates a TRACE CLI command, which is also displayed in the Cmd tab of the Output view:

      trace,prompt \TRACE\#143:0

      Note

      The number at the end of the command is a character position, and depends on the position of the mouse pointer when you displayed the context menu.

  5. Set a Trace End Point at the end of GetData():

    1. Click the trace.c tab.

    2. Right-click in the gray margin at line 150 to display the context menu.

    3. Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box.

    4. Select Trace End Point from the list of tracepoint types.

    5. Click OK. The dialog box closes, and the Trace End Point is set as indicated by the green arrow . Figure 10.17 shows an example:

      Figure 10.17. Trace End Point set at end of a function

      Trace End Point set at end of a function

      RealView Debugger generates a TRACE CLI command, which is also displayed in the Cmd tab of the Output view:

      trace,prompt \TRACE\#150:0

      Note

      The number at the end of the command is a character position, and depends on the position of the mouse pointer when you displayed the context menu.

  6. Click Run on the Debug toolbar to start execution. Captured trace might be displayed in the Analysis window before you perform the next step.

  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. Figure 10.18 shows an example:

Figure 10.18. Captured trace

Captured trace

See also

Copyright © 2006-2010 ARM Limited. All rights reserved.ARM DUI 0322F
Non-ConfidentialID102410