7.6.13 scx::scx_parse_and_configure

This function parses command-line options and configures the simulation accordingly.

void scx_parse_and_configure(int argc,
                             char *argv[],
                             const char *trailer = NULL,
                             bool sig_handler = true);
argc
the number of command-line options listed with argv[].
argv
command-line options.
trailer
a string that follows the option list when printing the help message (--help option).
sig_handler
whether to enable signal handler function. true to enable (default), false to disable.

The application must pass the values of the options from function sc_main() as arguments to this function.

-a, --application
application to load, format: -a [INST=]FILE. For SMP cores: -a INST*=FILE.
-A, --iris-allow-remote
allow remote connections from another machine to the Iris server. Defaults to not allowed.
-b, --break
set a breakpoint, format: -b [INST=]ADDRESS. This option can be specified multiple times.
-C, --parameter
set a parameter, format: -C INST.PARAM=VALUE. This option can be specified multiple times.
--check-regs
the same as --list-regs but does more consistency checks on the CADI register API.
--cpi-file
use FILE to set Cycles Per Instruction (CPI) classes, format: --cpi-file FILE
--cpulimit
maximum number of CPU (User + System) seconds to run, excluding startup and shutdown, format: --cpulimit NUM. Defaults to unlimited.
--cyclelimit
number of cycles to run, ignored if the debug server has started, format: --cyclelimit NUM. Defaults to unlimited.
-D, --allow-debug-plugin
allow a plug-in to debug the simulation.
--data
raw data to load, format: --data [INST=]FILE@[MEMSPACE:]ADDRESS
--dump
dump a section of memory into FILE, format: --dump [INST=]FILE@[MEMSPACE:]ADDRESS,SIZE. This option can be specified multiple times.
-f, --config-file
load model parameters from configuration file FILE, format: --config-file FILE
-h, --help
print help message and exit.
-i, --iris-log
Iris log level. This option can be specified multiple times, for example: -ii for log level 2.
-I, --iris-server
start an Iris server, allowing debuggers to connect to targets in the simulation.
-K, --keep-console
keep the console window open after completion. This option applies to Microsoft Windows only.
-l, --list-params
print the list of platform parameters to standard output and exit.
-L, --cadi-log
log all CADI calls to XML log files.
--list-instances
print list of target instances to standard output.
--list-memory
print model memory information to standard output.
--list-regs
print model register information to standard output.
-o, --output
redirect parameters, memory and instance lists to output file FILE, format: --output FILE
-p, --print-port-number
print the TCP port number the CADI server is listening to.
-P, --prefix
prefix semihosting output with the name of the instance.
--plugin
plug-in to load, format: --plugin [NAME=]FILE
-q, --quiet
suppress informational output.
-r, --restore
restore a checkpoint from DIR on simulation startup, format: --restore DIR
-R, --run
run the simulation immediately after the CADI server starts.
-s, --save
save a checkpoint to DIR on simulation exit, format: --save DIR
-S, --cadi-server
start a CADI server, allowing debuggers to connect to targets in the simulation.
--simlimit
maximum number of seconds to simulate, ignored if the debug server has started, format: --simlimit NUM. Defaults to unlimited.
--start
set initial PC to application start address, format: --start [INST=]ADDRESS
--stat
print run statistics on simulation exit.
-T, --timelimit
maximum number of seconds to run, excluding startup and shutdown, ignored if the debug server has started, format: --timelimit NUM. Defaults to unlimited.
--trace-plugin
deprecated, use --plugin instead.

This function treats all other command-line arguments as applications to load.

This function calls std::exit(EXIT_SUCCESS) to exit, for options --list-params and --help. It calls std::exit(EXIT_FAILURE) if there was an error in the parameter specification, or an invalid option was specified, or if the application or plug-in was not found.

Non-ConfidentialPDF file icon PDF version100965_1180_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.