You copied the Doc URL to your clipboard.

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 Arm® Development Studio.

For this task, it is useful to setup the DTSL options using the graphical interface of 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:\Arm_DS_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 Arm 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 then select Enable core trace.
    3. Click Apply to save the settings.

      Figure 12-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 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 Arm DS 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:\\Arm_DS_Workspace\\my_dtsl_settings.dtslprops"

      Figure 12-2 Command-line debugger connection with DTSL options 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.

Tip:

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 MetalDebug::Debug Cortex-A9x2 SMP::RealView ICE" --cdb-entry-param "Connection=TestFarm-Panda-A9x2" --cdb-entry-param "dtsl_options_file=C:\\Arm_DS_Workspace\\my_dtsl_settings.dtslprops" --script=C:\\Arm_DS_Workspace\\my_script.txt.