BSP and Device Driver Development Guide
The initialization code is the first piece of code executed when there's a reset/reboot. Its purpose is to initialize the board for the application. This chapter contains a narrative description of the initialization process followed by a description of each of the files and routines commonly found in the BSP related to initialization. The remainder of this chapter covers special issues which require attention such as interrupt vector table and chip select initialization.
Most of the examples in this chapter will be based on the SPARC/ERC32 and m68k/gen68340 BSP initialization code. Like most BSPs, the initialization for these BSP is divided into two subdirectories under the BSP source directory. The BSP source code for these BSPs is in the following directories:
c/src/lib/libbsp/m68k/gen68340 c/src/lib/libbsp/sparc/erc32
Both BSPs contain startup code written in assembly language and C.
The gen68340 BSP has its early initialization start code in the
start340
subdirectory and its C startup code in the startup
directory. In the start340
directory are two source files.
The file startfor340only.s
is the simpler of these files as it only
has initialization code for a MC68340 board. The file start340.s
contains initialization for a 68349 based board as well.
Similarly, the ERC32 BSP has startup code written in assembly language
and C. However, this BSP shares this code with other SPARC BSPs.
Thus the Makefile.am
explicitly references the following files
for this functionality.
../../sparc/shared/start.S ../../sparc/shared/bspclean.c
NOTE: In most BSPs, the directory named start340
in the
gen68340 BSP would be simply named start
or start followed by a
BSP designation.
BSP and Device Driver Development Guide
Copyright © 1988-2008 OAR Corporation