User`s guide
VxWorks
BSP Developer’s Guide, 6.0
42
boot record. For architecture-specific information, see the appropriate VxWorks
Architecture Supplement and the VxWorks Hardware Considerations Guide.
2.3.6 Optional Routines
Most BSPs provide routines beyond those that are required. Typically, an auxiliary
clock and a serial port are provided. In addition, some kind of Ethernet interface is
supported. Other hardware is often made available as well. Descriptions of the
routines required to support these hardware features are included in the
3.3.9 Providing Additional Optional Device Support, p.99, and in the VxWorks Device
Driver Developer’s Guide.
2.3.7 Hardware Considerations
There are a number of hardware issues that relate to BSP development. For the
most part, these issues are more relevant during board design than during BSP
development. However, some BSP issues must be addressed. If the design of your
target hardware in not already in place, it is worthwhile to ensure that the
hardware is designed in a way that will simplify BSP development. For more
information regarding target board design and VxWorks, see the VxWorks
Hardware Considerations Guide.
When developing a BSP, you must know how the boot type is passed to
romStart( ). This depends on the processor's architecture, but is generally passed
either in a register or on the stack. If the boot type is passed in a register, the register
is determined by the C function calling convention for your processor. If it is
passed on the stack, the stack is usually placed such that it begins before the text
section and grows in the opposite direction.
A bank of LED indicators that can be used without any hardware initialization is a
good feature to have in your target hardware. The first stage in BSP development
should always be to write, test, and debug code that can set, clear, and modify the
LEDs. This is the case even if an on-chip debugging (OCD) device, or another type
of hardware debugger, is available.
Most boards use dynamic memory for the main bank of RAM, rather than static
memory. When dynamic memory is used, a memory controller is required in order
to provide memory refresh cycles. The memory controller must be initialized very
early during system initialization, usually before any C code is run. For this reason,
it is customary to write the memory controller initialization code in assembly, to be