The configuration of VxWorks is determined by the configuration header files installDir/target/config/all/configAll.h and installDir/target/config/bspname/config.h. These files are used by the usrConfig.c, bootConfig.c, and bootInit.c modules as they run the initialization routines distributed in the directory installDir/target/src/config to configure VxWorks.
The VxWorks distribution includes the configuration files for the default development configuration. You can create your own versions of these files to better suit your particular configurations; this is described in the following subsections. In addition, if you need multiple configurations, environment variables are provided so you can move easily between them.
|
NOTE: To rebuild VxWorks for your own configuration, follow the procedures described in the Tornado User's Guide: Projects (recommended) or see 8.7 Building a VxWorks System Image.
|
||||||||||||||||||
Including optional components in your VxWorks image can significantly increase the image size. If you receive a warning from vxsize when building VxWorks, or if the size of your image becomes greater than that supported by the current setting of RAM_HIGH_ADRS, be sure to see 8.6.1 Scaling Down VxWorks and 8.9 Creating Bootable Applications for information on how to resolve the problem.
In a development environment, you may have several different configurations you wish to test, or you may wish to specify different target code in different situations. In order to build VxWorks to these different specifications, you need to modify your environment.
In general, your Tornado environment consists of three parts: the host code (Tornado), the target code, and the configuration files discussed in this section. If you use the default environment, your UNIX environment variables are defined as follows:
|
|||||||||||||||||||
|
|||||||||||||||||||
On Windows hosts, the IDE automatically locates Tornado code in the following locations:
|
|||||||||||||||||||
|
|||||||||||||||||||
To use different versions of usrConfig.c, bootConfig.c, and bootInit.c, store them in a different directory and change the value of CONFIG_ALL. To use different target code, point to the alternate directory by changing the value of TGT_DIR.
You can change the value of CONFIG_ALL by changing it either in your makefile or on the command line. The value of TGT_DIR must be changed on the command line.
|
NOTE: Changing TGT_DIR will change the default value of CONFIG_ALL. If this is not what you want, reset CONFIG_ALL as well.
|
||||||||||||||||||
To change CONFIG_ALL in your makefile, add the following command:
CONFIG_ALL = $WIND_BASE/target/config/newDir
To change CONFIG_ALL on the command line, do the following:
% make ... CONFIG_ALL = $WIND_BASE/target/config/newDir
To change TGT_DIR on the command line, do the following:
% make ... TGT_DIR = $ALT_DIR/target
The configAll.h header file, in the directory installDir/target/config/all, contains default definitions that apply to all targets, unless redefined in the target-specific header file config.h. The following options and parameters are defined in configAll.h:
There is also a BSP-specific header file, config.h, in the directory installDir/target/config/bspname. This file contains definitions that apply only to the specific target, and can also redefine default definitions in configAll.h that are inappropriate for the particular target. For example, if a target cannot access a device controller at the default I/O address defined in configAll.h because of addressing limitations, the address can be redefined in config.h.
The config.h header file includes definitions for the following parameters:
|
CAUTION: If any options from configAll.h need to be changed for this one BSP, then any previous definition of that option should be undefined and redefined as necessary in config.h. Unless options are to apply to all BSPs at your site, do not change them in installDir/target/config/all/configAll.h.
|
||||||||||||||||||
VxWorks ships with optional features and device drivers that can be included or omitted from the target system. These are controlled by macros in the project facility or the configuration header files that cause conditional compilation in the installDir/target/config/all/usrConfig.c module.
The distributed versions of the configuration header files configAll.h and config.h include all the available software options and several network device drivers. If you are not using the project facility (see Tornado User's Guide: Projects), you define a macro by moving it from the EXCLUDED FACILITIES section of the header file to the INCLUDED SOFTWARE FACILITIES section.1 For example, to include the ANSI C assert library, make sure the macro INCLUDE_ANSI_ASSERT is defined; to include the Network File System (NFS) facility, make sure INCLUDE_NFS is defined. Modification or exclusion of particular facilities is discussed in detail in 8.6 Alternative VxWorks Configurations.
Macros shown in Table 8-6 that end in XXX are not valid macros but represent families of options where the XXX is replaced by a suffix declaring a specific routine. For example, INCLUDE_CPLUS_XXX refers to a family of macros that includes INCLUDE_CPLUS_MIN and INCLUDE_CPLUS_STL.
Use VxWorks configuration header files to configure your VxWorks system to meet your development requirements. Users should not resort to changing the WRS-supplied usrConfig.c, or any other module in the directory installDir/target/config/all. If an extreme situation requires such a change, we recommend you copy all the files in installDir/target/config/all to another directory, and add a CONFIG_ALL macro to your makefile to point the make system to the location of the modified files. For example, add the following to your makefile after the first group of include statements:
# ../myAll contains a copy of all the ../all files CONFIG_ALL = ../myAll
1: For a partial listing of the configuration macros, see Table 8-6. To see all the available macros with their descriptions, see installDir/target/config/all/configAll.h (for macros applicable to all bsps) and installDir/target/config/bspname/config.h (for macros applicable to a specific BSP).