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);
the number of command-line options listed with argv[].
command-line options.
a string that follows the option list when printing help message (--help option).
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
use FILE to set Cycles Per Instruction (CPI) classes.
maximum number of CPU (User + System) seconds to run, excluding startup and shutdown. Defaults to unlimited.
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.
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.
print run statistics on simulation exit.
-S, --cadi-server
start CADI server allowing debuggers to connect to targets in the simulation.
maximum number of seconds to simulate. Defaults to unlimited.
-T, --timelimit
maximum number of seconds to run, excluding startup and shutdown. Defaults to unlimited.
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 version100965_1105_00_en
Copyright © 2014–2018 Arm Limited or its affiliates. All rights reserved.