02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2<br />

<strong>BSP</strong> Organization<br />

Files in the target/config/all Directory<br />

The files in target/config/all are delivered as part of the VxWorks architecture<br />

product. Do not alter these files unless absolutely necessary. Of special concern is<br />

configAll.h. This file sets the default configuration for all VxWorks images. The<br />

values you define here should be generic and therefore true for most if not all<br />

VxWorks developers at your site. If you need a VxWorks image that differs from<br />

the default configuration, use your <strong>BSP</strong>’s config.h to override (#define or #undef)<br />

the default values in configAll.h.<br />

Files in config/all are not directly used when building a project. They are scanned<br />

only once when a new project is made from a <strong>BSP</strong>. Any changes to the files in<br />

target/config/all after a project has been created do not affect the project. If a<br />

change is desired, the user must make the change directly in the project area.<br />

2<br />

! CAUTION: Changing configAll.h from the command line can have unpleasant<br />

side effects for other VxWorks users at your site. This note only applies to building<br />

from the command line. One benefit of the Tornado project facility is that changes<br />

do not affect existing projects. Only new projects created from a <strong>BSP</strong> after the<br />

change to configAll.h inherit that change.<br />

bootConfig.c – Main Initialization for Boot ROM Images<br />

The bootConfig.c file is the main initialization and control file for all boot ROM<br />

images. It includes the complete boot ROM shell task. It contains a table (NETIF)<br />

for network device initialization. This module is a subset of usrConfig.c. Boot<br />

ROM images do not provide all of the optional features available in the full<br />

VxWorks images. Of particular note is that boot images do not use MMU libraries<br />

(except for SPARC).<br />

The Tornado project facility does not have the ability to create and manipulate a<br />

boot ROM project. For projects created from a <strong>BSP</strong>, there is a button that performs<br />

the traditional command-line creation of a boot ROM image from the Build menu.<br />

Please take note that project-specific configuration information has no effect at all<br />

when the boot ROM image gets built. Only the traditional config.h, configAll.h,<br />

bootConfig.c, and bootInit.c files affect the building of a boot ROM image.<br />

bootInit.c – Second-Stage ROM Initialization<br />

The bootInit.c file is the second stage of boot ROM initialization, after romInit.o.<br />

The romInit( ) routine in romInit.s terminates by jumping to romStart( ), defined<br />

in this file. The routine romStart( ) performs the necessary code uncompression<br />

and relocation for ROM images. First it copies the text and data segments from<br />

13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!