3.1.5. Loading from the command line

You can start RealView Debugger from the command line and specify an image to load automatically. The syntax for loading an image this way is as follows:

rvdebug.exe -exec pathname

where pathname specifies the image loaded and can also include target details and image arguments (see Specifying the load instruction for details).

If the pathname includes spaces, it must be enclosed in quotes, for example:

program_directory\bin\rvdebug.exe” -install=C:\rvd
	-exec “C:\rvd\my images\my_image.axf”

This starts RealView Debugger, specifies an installation directory, and issues a load/pd/r command to load the named image to your debug target. Any error messages appear in a dialog box, specified by /pd. This command replaces any image currently loaded on the chosen target, specified by /r.

Note

For full details on running RealView Debugger from the command line see Chapter 1 Starting to use RealView Debugger.

Making a connection

If you are connected to your debug target, starting RealView Debugger in this way loads the specified image to the target and updates the Code window. This is the same as Using the Load File to Target dialog box.

If you are not connected to your debug target before starting RealView Debugger, loading an image from the command line starts RealView Debugger and then displays a prompt box, shown in Figure 3.2, for you to complete the connection.

Figure 3.2. Connection prompt

Connection prompt

Click either:

Yes

Causes RealView Debugger to wait until you connect to your debug target. The image is then loaded to the connected target.

No

Starts RealView Debugger but cancels the image loading operation.

Specifying the load instruction

If you are loading an image from the command line, you can pass arguments to the image and specify the target name that is passed to the image loader. The syntax is as follows:

rvdebug.exe -exec image.axf;target_name;[arg1 arg2 ...]

where:

image.axf

Specifies the image loaded.

target_name

Specifies the target name, where supported.

arg1 arg2 ...

Specifies an optional, space-separated, list of arguments to the image.

Specifying the target name depends on the underlying OS support and your debug target. For example, if you are using an RTOS image loader, then this target name is passed to the loader. In the example below, you are using the debugger built-in loader and so specifying target name has no effect and can be omitted:

C:\rvd\bin\rvdebug.exe -exec “C:\rvd\images\my_image.axf;;arg1 arg2 arg3”

Note

Spaces must not be included between the argument and the qualifier. Where an arguments list is given, quotes must be used.

For details on debugging applications using an RTOS see the chapter describing RTOS support in Chapter 19 RTOS Support.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B
Non-Confidential