1.1. Application system configuration
The system image running on the target board is a binary module. In most cases, users will find that the system image takes up with a large space. However, the user can cut the system configuration as needed to reduce the system occupied resources.
The following describes the following aspects for the configuration system image:
Ÿ VxWorks Board Support Pack (BSP).
Ÿ VxWorks profile, option, parameter.
Ÿ VxWorks Some options for selecting.
1.1.1. Board support package BSP
The Config / BSpName contains the board-level support package BSP, which consists of some hardware driver files running VxWorks, such as VME boards, clocks, and other devices with serial lines. Documents include: makefile, syslib.c, sysserial.c, sysalib.s, rominit.s, bspname.h, and config.h.
File syslib.c provides VXWorks and application room contacts in hardware, including:
Ÿ Initialization function
- Initialize hardware to a known state
- Identification system
- Initialization equipment, such as SCSI or conventional equipment
Ÿ Memory / address space function
- Get the size of the memory on the board
- Bus address space
- Set / get non-volatile RAM
- Define the board's memory bitmap (optional)
- Define virtual memory to physical memory mapping for processors with MMU
Ÿ Bus interrupt function
- Open / close the bus interrupt
- Generate bus interruption
Ÿ Clock / timer function
- Enable / not interrupt
- Set the periodicity of the timer
Ÿ Email / location monitoring function (optional)
- Make email / location monitoring interrupt energy
Profiles USRCONFIG.C and BootConfig.c are responsible for boot library functions in directory config / all. Device driver can call memory and bus management functions.
1.1.1.1. Virtual memory
For a single board that supports the MMU, the data structure sysphysmemdesc is used to define the virtual memory to the mapping of physical memory. This data is generally defined in syslib.c, and there are also in a single file MEMDESC.C. It exists in an array of data structural phys_mem_desc. The SYSPHYSMDESC array records the user's system configuration.
1.1.1.2. Serial Equipment
The file sysserial.c provides initialization of the target board serial port. The actual serial port I / O device is under the directory SRC / DRV / SIO. The TTYDRV library uses the serial port I / O device to provide VXWORKS terminal operations.
1.1.1.3. Initialization module
Rominit.s includes complarge-level initialization programs, Sysalib.s contains compilation-level programs for initial parts and specific systems.
1.1.2.4 Configuring VxWorks
VxWorks configured header files for config / all / configAll.h and config / bspname / config.h. These files are called usrconfig.c / bootconfig.c / bootinit.c when the initialization of VxWorks is running. In a development environment, users may have to test several different configurations, or users want to specify different target code in different situations. In order to compile VXWORKs to meet different situations, users must adjust the use environment.
The user Tornado environment includes three parts: host code, target code, and configuration file. The default configuration file is:
Host Code $ Wind_Base / Host / HostType / BIN
Target Code TGT_DIR = $ Wind_Base / Target
Configuration Code
Config_all = TGT_DIR / CONFIG / ALL
The user can modify the universal configuration file configall.h and the specific target board configuration file config.h. Many optional features and devices drive users can be adjusted on demand in the file config / all / usrconfig.c module.
Macro
INCLUDE_ADA ADA Support
INCLUDE_ANSI_XXX Various ANSI C Function Library Select Include_BootP BootP Support
INCLUDE_CACHE_SUPPORT buffer support
INCLUDE_CPLUS C support
INCLUDE_CPLUS_XXX Various C Support
INCLUDE_DEMO uses a simple DEMO program
INCLUDE_FTP_SERVER FTP Server Support
INCLUDE_HW_FP hardware floating point support
InlCude_loader resident target machine target module loading package
INCLUDE_LOGGING Registration Tool
INCLUDE_MMU_BASIC MMU Support
INCLUDE_MSG_Q Message Queue Support
Include_network network support
INCLUDE_POSIX_XXX Various POSIX Selection
INCLUDE_RLOGIN registration with Rlogin remote
INCLUDE_RPC Remote Process Call
INCLUDE_SEM_BINARY binary semaphore
INCLUDE_SEM_COUNTING count semaphore
INCLUDE_SEM_MUTEX mutual exclusive signal
Include_Shell C Language Interpreter
Include_SPY Task Activity Monitor
INCLUDE_WATITCHDOGS watchdog
INCLUDE_WDB target machine agent