
VxWorks
BSP Developer’s Guide, 6.0
28
The routine romStart( ) is essentially a loader. It performs the necessary
decompression and relocation for the ROM images. First, it copies the text and data
segments from ROM to RAM. Then, it clears those parts of the main RAM not
otherwise used. Finally, romStart( ) decompresses the compressed portion of the
image. Different configuration options can modify how these operations are
performed.
usrConfig.c
The usrConfig.c file contains the usrInit( ) and usrRoot( ) routines. When
usrRoot( ) completes, the VxWorks boot is complete. Both usrInit( ) and usrRoot( )
are architecture-independent, and thus should not need to be changed.
During BSP development, the usrConfig.c file is usually copied into the BSP
directory and modified to allow the user to control what hardware is initialized
(this is achieved by removing portions of usrRoot( ) using #if FALSE/#endif
pairs). The temporary copy must be discarded when the BSP is complete.
Therefore, changes should be limited to debug code only.
2.3.2 Derived Files
The most obvious files derived from the BSP files are the VxWorks images. There
may be multiple copies of VxWorks images present in a BSP directory, each
representing a different build type. For example, it is possible for the BSP directory
to contain bootrom, bootrom_uncmp, vxWorks (and its vxWorks.sym file),
vxWorks.st, and vxWorks.res_rom as well as several other images all at the same
time.
In addition, building the source files in the BSP directory generates object files.
There is not a one-to-one correspondence between source files and object files. As
mentioned in sysLib.c, p.25, the sysLib.c file uses the #include compiler
preprocessor directive to include other source files, especially the sysDev.c files.
For example, in the wrSbc8260 BSP, there is a file called sysIOPort.c that contains
interface code for the PowerPC 8260 I/O port drivers. The #include is as follows:
NOTE: The bootInit.c file is shared by all BSPs. Because of this, you must ensure
that changes made to bootInit.c do not impact the functionality of other BSPs.
NOTE: The usrConfig.c file is shared by all BSPs. Because of this, you must ensure
that changes made to usrConfig.c do not impact the functionality of other BSPs.
Comentários a estes Manuais