ARM Technical Support Knowledge Articles

RVD Scripting & Automation

Applies to: RealView Development Suite (RVDS)


RVD provides script support to allow the automation of frequently performed tasks.  Commonly RVD scripts are used in two ways; target initialization and automating tests.  This FAQ consists of a brief introduction to scripting, and several example scripts.

What is a script?
RVD scripts consist of a series of RVD CLI commands, which RVD will execute in sequence.

Where can I find a list of RVD commands?
A complete list of RVD commands, and their syntax, is given in the RVD Command Line Reference Guide.  A copy of which can be downloaded from the documentation section of the ARM website:

As you use the GUI, the equivalent commands are echoed to the Cmd tab of the output pane.  A simple method for producing a script is to perform the task once with the GUI, and capture the required commands.

Some commands only affect scripts or can only be issued within scripts.  A summary of the most common is given below

PAUSE {number}
This commands pauses the execution of the script by a number of seconds.  The next command in the script will not be processed until the specified time finishes.

This command is used to tell RVD how to issue the commands within a script.  While WAIT=ON, RVD will always wait until the last command has completed before issuing the next in the script.  For instance:

  ce @r0

The GO command is treated as having finished when the target next stops.  So the above script would start execution on the target, and print the value of r0 when it next stopped.  With WAIT=OFF, commands are issued one after another, regardless of whether the last has completed.  For example:


With this script execution would be manually halted after 5 seconds.

This command lets you set what RVD will do if one of the commands within a script fails..

JUMP {label},{condition}
This command allows you to implement loops, or have conditional sections of your script.  The label is point specified within the same script, and the condition must evaluate to either true or false.

DEFINE {options} {macro definition}
The DEFINE instruction is used to define a macro, and can only be issued from a script.  The use of macros is not covered in this FAQ.

What are the limitations of scripts?
* Target Configuration
It is not possible to configure a target (e.g. RVI) from a script.  To workaround this you can create multiple custom versions of a connection.  The RVD Target Configuration Guide covers how to do this.

* Semihosted input
You can not currently script the provision of semihosted input.  For example where the code on the target calls scanf().

How do I run a script?
There are several ways of calling a script.  The simplest is to do so manually, either through the GUI or directly from the command line (Cmd tab of the Output pane):

  Tools menu -> Include Commands from File...

  inc 'c:path oscript.txt'     <-- notice the use of single quotes

A script can also be associated with a connection, in which case it will be run every time you connect to that target.  This is done through Connection Properties:

  <connection> -> Advanced_Information -> Default -> Commands  = inc 'c:path oscript.txt'
It is also possible to pass a script to RVD at launch, which will be executed as soon as RVD has started up:

  rvdebug -inc='c:path oscript.txt'

When passing a script at launch it is common also to pass the 'aws' flag.  This starts RVD with either a blank workspace (-aws=-) or a specific workspace (-aws=<filename>).  This gives you a known starting configuration.  See the RVD User Guide for more information on workspaces.  Further information on Workspaces can be found in the following FAQ:


Attached to this FAQ is set of three scripting examples.  A description of each of the examples, and instructions on how to use them, is given in the included readme.txt file.

Zip file icon Download examples


Article last edited on: 2011-09-12 16:58:05

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential