2.1.1 Launching from the command line

To launch Model Debugger from the command line, type modeldebugger, with options and arguments.

Table 2-1 Command line options

Short Long option Description
 
--cyclelimit cycles
Set a limit on the number of system cycles for a simulation in non-GUI mode.
The cyclelimit option is only enabled if the --nogui option is used.
 
--debug-isim isim_system
Start isim_system and connect Model Debugger remote to the simulation.
 
--debug-sysc systemc
Start systemc Simulation and connect Model Debugger remote to the simulation.
 
--timelimit time
Set a time limit for a simulation in non-GUI mode.
The timelimit option is only enabled if the --nogui option is used.
-a
--application filename
Load the application file filename. To target processors in multiprocessor systems, prefix the name with the path to the instance. For example, foo.bar.core=dhrystone.axf.
-C
--parameter parameter
Set a single parameter of the model. Parameters are specified as a path naming the instance and the parameter name using dot separators. For example, foo.bar.inst.parameter=1000. If it is necessary to set multiple parameters at once, use the --config-file option instead.
-c
--connect simulation_id
Connect to a remote CADI simulation. The simulation to connect to is specified by the simulation_id. Use the --list-connections option to display the list of available connections.
-E
--enable-verbose msgClass
Use verbose messages if displaying message text for message classes msgClass. if used without an argument, lists all classes.
-e
--env-connect
Connect to remote CADI simulation using the following environment variables:
  • CADI_CLIENTPORT_TCP – port number
  • CADI_INSTANCEID – component instance name
  • CADI_APPLICATIONFILENAME – application file name
-F
--stdout-to-file FILE
Print all application output to FILE instead of the StdIO pane in the Output Window.
-f
--config-file filename
Use model parameters from the configuration file filename.
-h
--help
Print the available options and exit.
-i
--instance
Specify the instance.
-L
--cadi-log
Log all CADI calls into an XML logfile CADILog-nnnn.xml, where nnnn is a set of four digits. The logfile is created in the same directory as the model.
-l
--list-connections
List possible connections to remote CADI simulations on the local machine and exit afterwards. Each simulation is given a unique simulation ID.
 
--list-instances
List target instances.
 
--list-params
List target instances and their parameters.
-m
--model filename
Load the model library in the file named filename.
-N
--nogui
Run the simulation without displaying the GUI.
Use the --script option to load and run a script on startup.
-n
--no-params-dialog
Do not display the parameter configuration dialog at startup.
-O
--stdout-to-stdout
Print all application output to stdout instead of the StdIO pane in the Output Window.
-p
--project filename
Load the project file filename.
-q
--quiet
Suppress all Model Debugger and Model Shell output.
-s
--script filename
Execute the commands from the script named filename.
 
--plugin
Specify trace plug-ins. All plug-ins specified with this command line option or in environment variable FM_TRACE_PLUGINS are loaded.
-V
--verbose
Equivalent to --enable-verbose “MaxView”.
-v
--version
Print the tool version and exit.
-x
--force-reg-hex
Force registers with initial integer display to be hexadecimal format instead.
-Y
--layout filename
Load the layout file filename.
-y
--no-target-dialog
Suppress the Select Target dialog box that normally appears when a model is loaded. Model Debugger automatically connects to targets that have the executes_software flag set. From the GUI, you can use the Other Settings check box in the Preferences dialog box to suppress the Select Target dialog box.

String syntax

Filenames, and similar strings, included when starting Model Debugger from the command line must be within double quotes if there is white space in the string.

For example:
modeldebugger -a "my application file.axf"
There is, however, no requirement to use quotes if your parameter is a single word with no spaces. This means both of the following forms are valid:
modeldebugger --script myscript.txt
modeldebugger --script "myscript.txt"

Configuration file syntax

You can configure a model that you start from the command line with Model Debugger by including a reference to an optional plain text configuration file. Each line of the configuration file must contain the name of the component instance, the parameter to be modified, and its value.

Use this format:
instance.parameter=value
The instance can be a hierarchical path, with each level separated by a dot “.” character. If value is a string, additional formatting rules might apply.
You can include comment lines in your configuration file. Such lines begin with a # character. Boolean values can be set using either true/false or 1/0. A sample configuration file including a variety of syntax examples looks like this:
# Disable semihosting using true/false syntax
coretile.core.semihosting-enable=false
#
# Enable VFP at reset using 1/0 syntax
coretile.core.vfp-enable_at_reset=1
#
# Set the baud rate for UART 0
baseboard.uart_0.baud_rate=0x4800
Related reference
String syntax

Running Model Debugger without a GUI

Running a simulation using Model Debugger can be scripted with the MxScript language.

A scripted simulation typically does not require control of the target system beyond the provided script. Model Debugger can therefore be run without a Graphical User Interface (GUI). This mode is triggered by the command line option --nogui.

Note

A simulation platform hosted by Model Debugger in non-GUI mode does not require a script. You can therefore also run Model Debugger in non-GUI mode without any scripted interaction.
To limit the duration of a simulation in non-GUI mode, specify the amount of seconds or system cycles using the command line options:
  • --timelimit time_in_seconds
  • --cyclelimit number_of_system_cycles
The timelimit and cyclelimit options are only enabled in --nogui mode.
Non-ConfidentialPDF file icon PDF versionARM DUI0314Q
Copyright © 2007-2014 ARM. All rights reserved.