8.2 Command-line debugger options

The options listed below allow you to run DS-5 Debugger from the command-line without a graphical user interface.

If you are using Windows, use the DS-5 Command Prompt. On Linux, set the required environment variables, and use the UNIX shell.

Launch the command-line debugger using the following syntax:

debugger [--option arg] ...

Where:

debugger
Invokes the DS-5 command-line debugger.
--option arg
The debugger option and its arguments. This can either be to configure the command-line debugger, or to connect to a target.
...
Additional options, if you need to specify any.

Note:

Once connected to your target, use any of the DS-5 Debugger commands to access the target and start debugging.

For example, info registers displays all application level registers.

Options

--browse
Browses for available connections and lists targets that match the connection type specified in the configuration database entry.

Note:

You must specify --cdb-entry arg to use --browse.
--cdb-entry arg

Specifies a target from the configuration database that the debugger can connect to.

Use arg to specify the target configuration. arg is a string, concatenated using entries in each level of the configuration database. The syntax of arg is:

"Manufacturer::Platform::Project type::Execution environment::Activity::Connection type".

Use --cdb-list to determine the entries in the configuration database that the debugger can connect to. You can specify partial entries such as "ARM Development Boards" or "ARM Development Boards::Versatile Express A9x4" and press Enter to view the next possible entries.

For example, to connect to a ARM Versatile Express A9x4 target using DSTREAM and a USB connection, first use --cdb-list to identify the entries in the configuration database within ARM Development Boards, then use:

debugger --cdb-entry "ARM Development Boards::Versatile Express A9x4::Bare Metal Debug::Bare Metal SMP Debug of all cores::Debug Cortex-A9x4 SMP::DSTREAM" --cdb-entry-param "Connection=USB:000271"
--cdb-entry-param arg
Specifies connection parameters for the debugger.
Use arg to specify the parameters and their values. The syntax for arg is comma separated pairs of parameters and values: "param1=value1". Use --cdb-list to identify what parameters the debugger needs. Parameters that the debugger might need are:
Connection
Specifies the TCP address or the USB port number of the debug adapter to connect to.
Address
Specifies the address for a gdbserver connection.
Port
Specifies the port for a gdbserver connection.
dtsl_options_file
Specifies a file containing the DTSL options.
Model parameters
Specifies parameters for a model connection. The model parameters depend on the specific model that the debugger connects to. See the documentation on the model for the parameters and how to configure them. The debugger uses the default model parameter values if you do not specify them.

Use --cdb-entry-param for each parameter.

For example --cdb-entry-param "Connection=TestTarget" --cdb-entry-param "dtsl_options_file=my_dtsl_settings.dtslprops"

--cdb-list filter

Lists the entries in the configuration database. This option does not connect to any target.

The configuration database has a tree data structure, where each entry has entries within it. --cdb-list identifies the entries in each level of the database. The levels are:

  1. Manufacturer
  2. Platform
  3. Project type
  4. Execution environment
  5. Activity
  6. Connection type.

Use filter to specify the entries in each level, to identify the target and how to connect to it. filter is a string concatenated using entries in successive levels of the configuration database. The full syntax of filter is: "Manufacturer::Platform::Project type::Execution environment::Activity::Connection type".

If you specify an incomplete filter, then --cdb-list shows the entries in the next level of the configuration database. So if you do not specify a filter, --cdb-list shows the Manufacturer entries from the first level of the configuration database. If you specify a filter using entries from the first and second levels of the database, then --cdb-list shows the Project type entries within the specified Platform. If you specify the complete filter then --cdb-list lists the parameters that need to be specified using --cdb-list-param.

Note:

  • The entries in the configuration database are case-sensitive.
  • Connection type refers to DSTREAM or RVI, so there is no Connection type when connecting to a model.

To list all first level entries in the configuration database, use:

debugger --cdb-list

For example, to list all the configuration database entries for the manufacturer Altera, use:

debugger --cdb-list="Altera"

--cdb-root arg
Specifies additional configuration database locations in addition to the debugger's default configuration database.

Note:

  • To specify more than one configuration database, you must separate the directory paths using a colon (:) for Linux systems or a semicolon (;) for Windows systems.
  • The order in which configuration database roots are specified is important when the same information is available in different databases. That is, the data in the location typed last (nearest to the end of full command-line) overrides data in locations before it.
  • If you do not need any data from the default configuration database, use the additional command-line option --cdb-root-ignore-default to tell the debugger not to use the default configuration database.
--cdb-root-ignore-default
Ignores the default configuration database.
--continue_on_error=true | false

Specifies whether the debugger stops the target and exits the current script when an error occurs.

The default is --continue_on_error=false.

--disable-semihosting
Disables semihosting operations.
--disable_semihosting_console
Disables all semihosting operations to the debugger console.
--enable-semihosting
Enables semihosting operations.
-h or --help
Displays a summary of the main command-line options.
-b=filename or --image=filename
Specifies the image file for the debugger to load when it connects to the target.
--interactive
Specifies interactive mode that redirects standard input and output to the debugger from the current command-line console, for example, Windows Command Prompt or Unix shell.

Note:

This is the default if no script file is specified.
--log_config=arg
Specifies the type of logging configuration to output runtime messages from the debugger.
The arg can be:
info - Output messages using the predefined INFO level configuration. This level does not output debug messages. This is the default.
debug - Output messages using the predefined DEBUG level configuration. This option outputs both INFO level and DEBUG level messages.
filename - Specifies a user-defined logging configuration file to customize the output of messages. The debugger supports log4j configuration files.
--log_file=filename
Specifies an output file to receive runtime messages from the debugger. If this option is not used then output messages are redirected to the console.
--script=filename
Specifies a script file containing debugger commands to control and debug your target. You can repeat this option if you have several script files. The scripts are run in the order specified and the debugger quits after the last script finishes. Add the --interactive option to the command-line if you want the debugger to remain in interactive mode after the last script finishes.
-e arg or --semihosting-error arg
Specifies a file to write semihosting stderr.
-i arg or --semihosting-input arg
Specifies a file to read semihosting stdin.
-o arg or --semihosting-output arg
Specifies a file to write semihosting stdout.
--stop_on_connect=true | false

Specifies whether the debugger stops the target when it connects to the target device. To leave the target unmodified on connection, you must specify false. The default is --stop_on_connect=true.

--top_mem=address
Specifies the stack base, also known as the top of memory. Top of memory is only used for semihosting operations.
--target-os=name
Specifies the operating system on the target. Use this option if you want to debug the operating system on the target.
--target-os-list

Lists the operating systems that you can debug with DS-5 Debugger.

Note:

Specifying the --cdb-entry option is sufficient to establish a connection to a model. However to establish a connection in all other cases, for example, for Linux application debug or when using DSTREAM, you must specify both --cdb-entry and --cdb-entry-param options.

You must normally specify --cdb-entry when invoking the debugger for all other options to be valid. The exception to this are:

  • --cdb-list and --help do not require --cdb-entry.
  • --cdb-root can be specified with either --cdb-list or --cdb-entry.

Example 8-1 Examples

To connect to an ARM FVP Cortex-A9x4 model and specify an image to load, use:

debugger --cdb-entry "ARM FVP::VE_Cortex_A9x4::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A9x4 SMP" --image "C:\DS-5_Workspace\fireworks_A9x4-FVP\fireworks-Cortex-A9x4-FVP.axf"

To connect and debug a Linux application on a Beagleboard target, use:

debugger --cdb-entry "beagleboard.org::OMAP 3530::Linux Application Debug::gdbserver (TCP)::Connect to already running gdbserver" --cdb-entry-param "Address=TCP:10.5.196.50" --cdb-entry-param "Port=5350"

To connect and debug a Linux kernel on a Beagleboard target, use:

debugger --cdb-entry "beagleboard.org::OMAP 3530::Linux Kernel and/or Device Driver Debug::Linux Kernel Debug::Debug Cortex-A8::DSTREAM" --cdb-entry-param "Connection=TCP:10.5.196.50"

To connect to a single Cortex A15 core on the Versatile Express Cortex-A15x2+A7x3 target using DSTREAM and a TCP/IP connection:

debugger --cdb-entry "ARM Development Boards::Versatile_Express_V2P-CA15_A7::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A15_0::DSTREAM" --cdb-entry-param "Connection=TCP:10.8.197.59"

To connect to a Juno ARM Development Platform (r0) big.LITTLE target using DSTREAM and a TCP/IP connection:

debugger --cdb-entry "ARM Development Boards::Juno ARM Development Platform (r0)::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A57/Cortex-A53 big.LITTLE::DSTREAM" --cdb-entry-param "Connection=TCP:10.2.194.40"

Tip:

Once a debugger connection has been established, type quit when you want to exit the connection.
Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.