var Main = xdc.useModule('iar.tools.configuro.Main');
module-wide config parameters
'[-o outdir (optional)]',
'[-c codegen_dir]',
'[--cc compiler_name_string]',
'[--device device_name]',
'[--compileOptions compile_options_string]',
'[--linkOptions linker_options_string]',
'[--profile profile]',
'[--projFile project_file (optional)]',
'infile.cfg (optional)'
];
module-wide functions
per-instance config parameters
per-instance functions
This command-line tool computes the appropriate configuro options from the
set of options passed from the IAR Workbench (for ex. target/platform
from compile options). With these options, the xdc.tools.configuro tool
is executed to compute the set of libraries, command-line flags and
the other artifacts needed to build the application in IAR Workbench.
xs iar.tools.configuro -c "<codegen_dir>" --cc "<compiler>"
--device "<device_name>" -compileOptions "<compiler_options>"
--linkOptions "<link_options>" --profile "<profile>" infile.cfg
config Main.usage // module-wide |
 |
usage help message
Main.usage = String[] [
'[-o outdir (optional)]',
'[-c codegen_dir]',
'[--cc compiler_name_string]',
'[--device device_name]',
'[--compileOptions compile_options_string]',
'[--linkOptions linker_options_string]',
'[--profile profile]',
'[--projFile project_file (optional)]',
'infile.cfg (optional)'
];
Main.exec() // module-wide |
 |
xs script entry point
Main.exec(Any args) returns Any
DETAILS
This function is called from within other XDCscript scripts and
performs the same operations as
main() except that,
rather than output the return value of
inst.run(), this value
is simply returned to the caller of
exec().
Main.main() // module-wide |
 |
xs shell entry point
Main.main(Any args) returns Any
DETAILS
This function
- creates a no-arg instance, inst, of the module inheriting
this interface;
- parses command line arguments placing all options in the config
params of the inheriting module;
- creates a xdc.tools.Cmdr instance, cmdr;
- calls inst.run() with the cmdr and any command
line command line arguments not parsed as options; and
- outputs the return result from inst.run()
Instance Config Parameters |
 |
var params = new Main.Params;
// Instance config-params object
params.compileOptions = String null;
// Compile options used for building C files
params.compiler = String null;
// The name of the compiler
params.device = String null;
// The name of the device
params.linkOptions = String null;
// Linker options used for linking libraries
params.output = String "";
// Pathname of the output directory
params.profile = String "";
// Build profile
params.projFile = String "";
// IAR Embedded project file
params.rootDir = String null;
// Root directory of the code generation tools
config Main.Params.compileOptions // instance |
 |
Compile options used for building C files
var params = new Main.Params;
...
params.compileOptions = String null;
DETAILS
The compiler options are required to find the target and platform
options for xdc.tools.configuro.
config Main.Params.compiler // instance |
 |
The name of the compiler
var params = new Main.Params;
...
params.compiler = String null;
DETAILS
The compiler name is required to find the target and platform
xdc.tools.configuro options.
config Main.Params.device // instance |
 |
The name of the device
var params = new Main.Params;
...
params.device = String null;
DETAILS
The device name has to be passed to the xdc.tools.configuro tool.
config Main.Params.linkOptions // instance |
 |
Linker options used for linking libraries
var params = new Main.Params;
...
params.linkOptions = String null;
DETAILS
The linker options are required to pull in the correct libraries
during link.
config Main.Params.output // instance |
 |
Pathname of the output directory
var params = new Main.Params;
...
params.output = String "";
DETAILS
A directory containing the generated build artifacts, in particular
the compiler.defs and linker.cmd files.
The last component of the output directory path must be a valid
ANSI C identifier; i.e., it must consist entirely of alphanumeric or
'_' characters and must not start with a number. So, the names
'0app' and 'app-test' are not valid but '0app/config' and
'app-test/config' are valid.
This is optional parameter. By default, the output directory has the
name configPkg and will be within the {#cfgDir} directory.
config Main.Params.profile // instance |
 |
Build profile
var params = new Main.Params;
...
params.profile = String "";
config Main.Params.projFile // instance |
 |
IAR Embedded project file
var params = new Main.Params;
...
params.projFile = String "";
DETAILS
This file is searched for the RTSC configuration file (.cfg).
config Main.Params.rootDir // instance |
 |
Root directory of the code generation tools
var params = new Main.Params;
...
params.rootDir = String null;
DETAILS
The path to the installation directory of the compiler and linker
for the selected target. The definition of "installation directory"
can vary from compiler to compiler, but is most commonly the
directory that contains a "bin" subdirectory.
Main.run() // instance |
 |
Underlying implementation of the command
DETAILS
Since this method is used to support both command line tools and
other XDCscript scripts, it is important to avoid explicit
termination of the JVM via java.lang.System.exit(); doing so
precludes callers from handling failures.
Implementations should instead call