8.5 Capturing trace data using the command-line debugger

To capture trace data using the command-line debugger, you must enable the relevant trace options in the Debug and Trace Services Layer (DTSL) configuration settings in DS-5.

For this task, it is useful to setup the DTSL options using the graphical interface of DS-5 Debugger.

Once you have setup the DTSL options, the debugger creates a file that contains the DTSL settings. You can then use this file when invoking the command-line debugger to perform trace data capture tasks, for example, run a script which contain commands to start and stop trace capture.

An example script file might contain the following commands:

loadfile C:\DS-5_Workspace\fireworks_panda\fireworks_panda.axf # Load an image to debug
start                         # Start running the image after setting a temporary breakpoint
wait                          # Wait for a breakpoint
trace start                   # Start the trace capture when the breakpoint is hit
advance plot3                 # Set a temporary breakpoint at symbol plot3
wait                          # Wait for a breakpoint 
trace stop                    # Stop the trace when the breakpoint at plot3 is hit
trace report FILE=report.txt  # Write the trace output to report.txt
quit                          # Exit the headless debugging session			

Procedure

  1. Using the graphical interface of DS-5 Debugger, open the Debug Configurations dialog for your trace-capable target.
  2. In the Connections tab, under DTSL options, click Edit to open the DTSL Configuration Editor dialog.
    1. Select a Trace capture method in the Trace Buffer tab.
    2. If required, select the relevant tab for your processor, and Enable core trace.
    3. Apply the settings.
    Figure 8-1 Enable trace in the DTSL options
    Enable trace in the DTSL options


    These settings are stored in a *.dtslprops file in your workspace. The filename is shown in the Name of configuration field in the DTSL Configuration Editor dialog.

    In this example, the settings are stored in the default.dtslprops file.

  3. Copy the DTSL settings file, for example default.dtslprops, from your workspace to a different directory and change its name, for example to my_dtsl_settings.dtslprops.
  4. Open the DS-5 command prompt and:
    1. Use the --cdb-list command-line argument to identify your target name and configuration.
    2. Invoke the command-line debugger with your target name and configuration and specify the DTSL options file using --cdb-entry-params.
      For example, debugger --cdb-entry "pandaboard.org::OMAP 4430::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A9x2 SMP::RealView ICE" --cdb-entry-param "Connection=TestFarm-Panda-A9x2" --cdb-entry-param "dtsl_options_file=C:\DS-5_Workspace\my_dtsl_settings.dtslprops"
      Figure 8-2 Command-line debugger connection with DTSL option enabled
      Command-line debugger connection with DTSL options enabled


The debugger connects to your target.

You can now issue commands to load and run an image, and also to start and stop trace capture.

If you create a script file containing trace capture commands, you can specify this script file when invoking the command-line debugger.

For example:

debugger --cdb-entry "pandaboard.org::OMAP 4430::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A9x2 SMP::RealView ICE" --cdb-entry-param "Connection=TestFarm-Panda-A9x2" --cdb-entry-param "dtsl_options_file=C:\DS-5_Workspace\my_dtsl_settings.dtslprops" --script=C:\DS-5_Workspace\my_script.txt.

Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.