2.3.2. Setting model configuration options from Model Shell

The initial state of the RTSM can be controlled by configuration settings provided on the command line or in the CADI properties for the model.

Using a configuration file

To configure a model that you start from the command line with Model Shell, include a reference to an optional plain text configuration file as described in Getting started with Model Shell.

Comment lines in the configuration file must begin with a # character.

Each non-comment line of the configuration file contains:

  • the name of the component instance

  • the parameter to be modified and its value.

    Boolean values can be set using either true/false or 1/0. Strings must be enclosed in double quotes if they contain whitespace.

Example 2.2 shows a typical configuration file:

Example 2.2. Configuration file

# Disable semihosting using true/false syntax
# Enable the boot switch using 1/0 syntax
# Set the boot switch position

Using the command line

You can use the -C switch to define model parameters when you invoke the model. You can also use --parameter as a synonym for the -C switch. See Getting started with Model Shell. Use the same syntax as for a configuration file, but each parameter must be preceded by the -C switch.

Example 2.3 shows how to configure a MPS RTSM using Model Shell.

Example 2.3. Using Model Shell to boot a model from a flash image

# Boot from a flash image
model_shell \
    --parameter "coretile.core.semihosting-cmd_line="\
    --parameter "coretile.fname=flash.bin" \
    --parameter "coretile.mps_sysregs.user_switches_value=4" \
    --parameter "coretile.mps_sysregs.memcfg_value=0" \
    --parameter "mpsvisualisation.disable-visualisation=false" \
    --parameter "mpsvisualisation.rate_limit-enable=0" \

Copyright © 2011 ARM. All rights reserved.ARM DUI 0575C