package xdc.cfg |
|
Configuration Object Model elements
This package contains the modules necessary to populate the XDC
Configuration Object Model. In addition, this package supplies a
C/C++ header,
global.h, that facilitates the creation of portable
sources that need to reference global values defined as part of
a configuration (
xdc.cfg.Program.global).
[
more ... ]
package xdc.cfg [1, 0, 2, 0] {
// The Program object for the configuration object model
}
DETAILS
This package contains the modules necessary to populate the XDC
Configuration Object Model. In addition, this package supplies a
C/C++ header,
global.h, that facilitates the creation of portable
sources that need to reference global values defined as part of
a configuration (
xdc.cfg.Program.global).
COMPATIBILITY CHECKS
During configuration certain compatibility checks are made. These checks
include:
- target compatibility among all packages that are included in the
configuration
- package compatibility among all packages included in the
configuration
- package compatibility with respect to the set of packages used to
build the packages that are part of the configuration set.
By default, if any of the checks above fail, the configuration step fails.
It is possible, however, to selectively exclude particular
packages from these checks and/or treat check failures as non-fatal
warnings.
There are two "environment" variables that control these checks:
- xdc.cfg.check.exclude
-
a regular expression that is used to select packages that should
be excluded from the set of packages checked during configuration.
- xdc.cfg.check.fatal
-
if set to "false", force any incompatibilities detected to be
treated as warnings only; otherwise incompatibilities are fatal
Of course, it is also possible to use both options together to achieve
a desired effect.
To define these environment variables one must pass the appropriate
-D
options to the XDCscript shell (
xs) which is used to run the
configuro command line configuration tool.
If, on the other hand, you are using
xdc to run the configuration step
you can set these variables by setting the
xsopts attribute of an
xdc.bld.Executable within a build script.
CONTROLLING COMPATIBILITY CHECKS
To treat compatibility check failures as warnings for the executable
app:
Pkg.addExecutable("app", targ, targ.platform, {
xsopts: "-Dxdc.cfg.check.fatal=false"
});
To ignore any incompatibilities triggered by targets used by the
ti.targets.rts* packages:
Pkg.addExecutable("app", targ, targ.platform, {
xsopts: "-Dxdc.cfg.check.exclude='ti.targets.rts.*'"
});
In this case, the xdc.cfg.check.exclude option is regular expression used
to exclude any package whose names matches the regular expression from the
checks.
Finally, if you don't want to set
xsopts on each executable, it is
possible to set it for all executables within a package by setting the
xsopts attribute of the
xdc.bld.PackageContents (a.k.a.
Pkg)
object. For example, to turn all compatibility checks into warnings for
all executables in a package, add the following line to the package's
build script:
Pkg.attrs.xsopts = "-Dxdc.cfg.check.fatal=false";
THROWS
XDCException exceptions are thrown for fatal errors. The following error
codes are reported in the exception message:
- xdc.cfg.CONFIG_ERROR
-
This is a general error reported when the program configuration
fails. This error is caused by one or more configuration errors.
The list of those specific errors preceds this error.
- xdc.cfg.INCOMPATIBLE_TARGET_VERSION
-
This is an error or a warning usually reported when the version of
the compiler used in the current build is not compatible with the
version of the compiler used to build some of the loaded packages.
The compiler version might be encoded in the compatibility keys
displayed in the error message, but it is not required. Please
check the documentation of the current target's package for the
content of the compatibility keys.
SEE
generated on Wed, 06 Jan 2010 18:40:45 GMT