The Tornado 2.0 project facility is correctly preconfigured for building WRS BSPs. However, if you choose not to use the project facility or if you need to customize your build, you may need the information in the following sections. This includes a configuration constant, an environment variable, and compiler options that together specify the information the GNU toolkit requires to compile correctly for SPARC and SPARClite targets.
Setting the preprocessor variable CPU ensures that VxWorks and your applications build with the appropriate architecture-specific features enabled. Define this variable to SPARC for both the SPARC and SPARClite processors.
For example, to define CPU for a SPARC on the compiler command line, specify the following command-line option when you invoke the compiler:
-DCPU=SPARC
To provide the same information in a header or source file instead, include the following line in the file:
#define CPU SPARC
The following is an example of a compiler command line for SPARClite cross-development. The file to be compiled in this example has a base name of applic.
% ccsparc -DCPU=SPARC -I $WIND_BASE/target/h -O2 -nostdinc \ -fno-builtin -msparclite -msoft-float -c applic.language_id
The options shown in the example have the following meanings:1
1: For more information on these and other compiler options, see the GNU ToolKit User's Guide. WRS supports compiler options used in building WRS software; a list of these options is included in the Guide. Other options are not supported, although they are available with the tools as shipped.