source

This command loads and runs a script file to control and debug your target.

The following types of scripts are available:

DS-5

DS-5 Debugger commands.

CMM

CMM is a scripting language supported by some third-party debuggers. DS-5 supports a small subset of CMM-style commands, sufficient for running small target initialization scripts.

Jython

Jython is a Java implementation of the Python scripting language. It provides extensive support for data types, conditional execution, loops and organisation of code into functions, classes and modules, as well as access to the standard Jython libraries. Jython is an ideal choice for larger or more complex scripts.

Show/hideSyntax

source [/v] filename [args]

Where:

v

Specifies verbose output. Script commands are interleaved with the debugger output.

filename

Specifies the script file. The following file extensions must be used to identify the script type:

.ds

for DS-5 scripts

.cmm, .t32

for CMM scripts

.py

for Jython scripts.

args

Zero or more arguments to pass to the script (only supported for Jython scripts).

Show/hideExample

Example 141. source

source myScripts\myFile.ds        # Run DS-5 Debugger commands from myFile.ds
source myScripts\myFile.cmm       # Run CMM-style commands from myFile.cmm
source myScripts\myFile.t32       # Run CMM-style commands from myFile.t232
source /v myFile.ds               # Run DS-5 Debugger commands from myFile.ds and
                                  # display commands interleaved with debugger output
source myScripts\myFile.py        # Run a Jython script from file myFile.py

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0452J
Non-ConfidentialID051612