Launching the debugger from the command-line console

To launch the debugger:

  1. Launch a command-line console:

    On Windows, select Start → All Programs → ARM DS-5 → DS-5 Command Prompt.

    On Linux:

    1. Add the install_directory/bin directory to your PATH environment variable. If it is already configured then you can skip this step.

    2. Open a Unix bash shell.

  2. Launch the debugger using the following command-line syntax:

    debugger --target [--target_device] [option]...

    Where:

    --target=host:port | filename

    Specifies either the host:port for the connection between the debugger and gdbserver or a target configuration file such as an XML or RVC file.

    A serial connection requires an XML file similar to the following example:

    Example 1. mySerialConfig.xml

    <?xml version="1.0"?>
    <RVConfigUtility>
        <rddi type="rddi-debug-gdb"/>
        <rddigdb>
            <connection>
                <serial>
                    <port>COM1</port>
                    <speed>115200</speed>
                </serial>
            </connection>
        </rddigdb>
    </RVConfigUtility> 
    

    --target_device=number | name

    Specifies the device number or name. You must launch the debugger with --target_device command-line option when configuring a connection to a target containing multiple devices. If you do not specify --target_device then the debugger lists all the available devices and quits.

    and option can be any of the following:

    --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.

    --help

    Displays a summary of the main command-line options.

    --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 bash shell. This is the default if no script file is specified.

    --log_config=option

    Specifies the type of logging configuration to output runtime messages from the debugger.

    Where:

    option

    Specifies a predefined logging configuration or a user-defined logging configuration file:

    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.

    --semihosting_error=filename

    Specifies a file to write stderr for semihosting operations.

    --semihosting_input=filename

    Specifies a file to read stdin for semihosting operations.

    --semihosting_output=filename

    Specifies a file to write stdout for semihosting operations.

    --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.

    --target_os

    Specifies the name of the target Operating System (OS), for example, --target_os=linux. This enables OS support within the debugger for example, shared library support. Available options are:

    linux

    OS support for debug of Linux applications.

    linux-kernel

    OS support for debug of a Linux kernel.

    --top_mem=address

    Specifies the stack base, also known as the top of memory. Top of memory is only used for semihosting operations.

    Note

    Semihosting is used to communicate input/output requests from application code to the host workstation running the debugger.

    Example 2. Example of bare-metal command-line connection

    debugger --target=beagleboard.rvc --target_device=Cortex-A8
    

    When connected, use the DS-5 debugger commands to access the target and start debugging. For example, info registers displays all application level registers.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0446I
Non-ConfidentialID022212