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 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
-C, --parameter
set parameter, format: -C INST.PARAM=VALUE
--cpi-file
use FILE to set Cycles Per Instruction (CPI) classes.
--cpulimit
maximum number of CPU (User + System) seconds to run, excluding startup and shutdown. Defaults to unlimited.
--data
raw data to load, format: --data [INST=]FILE@[MEMSPACE:]ADDRESS
-D, --allow-debug-plugin
allow a plug-in to debug the simulation.
-h, --help
print help message and exit.
-K, --keep-console
keep console window open after completion (Microsoft Windows only).
-l, --list-params
print list of platform parameters to standard output and exit.
-L, --cadi-log
log all CADI calls to XML log files.
--plugin
plug-in to load, format: --plugin [NAME=]FILE
-P, --prefix
prefix semihosting output with the name of the instance.
-p, --print-port-number
print TCP port number the CADI server is listening to.
-R, --run
run simulation immediately after CADI server starts.
--stat
print run statistics on simulation exit.
-S, --cadi-server
start CADI server allowing debuggers to connect to targets in the simulation.
--simlimit
maximum number of seconds to simulate. Defaults to unlimited.
-T, --timelimit
maximum number of seconds to run, excluding startup and shutdown. Defaults to unlimited.
--trace-plugin
the predecessor of --plugin FILE

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

This function calls std::exit(EXIT_SUCCESS) to exit (options --list-params, --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 versionARM 100965_1101_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.