
2 Overview of a BSP
2.3 Components of a BSP
21
2
files, a custom usrAppInit.c file, another makefile for use with the project facility,
and directories containing object modules.
In addition to the BSP directory, there are several other directories that contain files
related to the BSP.
The target/config/all directory contains some source and header files that are used
by the BSPs for default configuration. The files in this directory should never be
changed. If changes to a file are necessary, copy the file to the BSP directory and
make changes to the local copy. There is a mechanism in the makefile that allows
you to use the local copy instead of the common version. The macros
USRCONFIG,
BOOTCONFIG, BOOTINIT, and DATASEGPAD refer to the files usrConfig.c,
bootConfig.c, bootInit.c, and dataSegPad.c, respectively, and allow you to
designate a private copy of each file for use in the BSP. For example, to use a private
version of usrConfig.c, set the macro
USRCONFIG to usrConfig.c in Makefile as
follows:
USRCONFIG = usrConfig.c
2.3.1 Source and Include Files
BSP routines are contained in a number of C and assembly files that you may need
to modify or create. These routines are located in a relatively small number of
source files. This section provides a list of these source files as well as a detailed
description of each file. Each file is also documented extensively in the reference
and template BSPs (see the code comments in each file).
The following files, in target/config/bspname, may need to be created or modified:
README Documentation file
Makefile Makefile for building the BSP
config.h Header file for configuring the OS
bspname.h Header file for non-configurable definitions
romInit.s This file contains the romInit( ) routine and any
subroutines used by romInit( ).
sysALib.s If required, this file contains assembly routines that are not
part of romInit( ).
sysLib.c This file contains the sysHwInit( ) routine and additional C
language routines specific to the target hardware.
Kommentare zu diesen Handbüchern