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 />

For boards without NVRAM, include the file mem/nullNvRam.c so that calls to<br />

NVRAM routines return ERROR. This file is provided on the <strong>BSP</strong> Kit CD-ROM in<br />

the target/src/drv/mem directory.<br />

There is a generic NVRAM driver called templateNvRam.c. See comments in this<br />

file for a description of the requirements and macros needed to use this driver. The<br />

templateNvRam.c file is appropriate for all boards where NVRAM is byte<br />

accessible, as opposed to block accessible.<br />

NV_RAM_SIZE<br />

The total bytes of NVRAM available. Define NV_RAM_SIZE in config.h. For<br />

boards without NVRAM, define NV_RAM_SIZE as NONE.<br />

BOOT_LINE_SIZE<br />

The number of bytes of NVRAM that are reserved for the VxWorks boot line.<br />

The default value is 255 and is defined in configAll.h. BOOT_LINE_SIZE must<br />

be less than or equal to NV_RAM_SIZE. To override the default value of<br />

BOOT_LINE_SIZE, first undefine the macro in config.h, then define it.<br />

2<br />

NV_BOOT_OFFSET<br />

The byte offset to the beginning of the VxWorks boot line in NVRAM. The<br />

default value is 0 and is defined in configAll.h.<br />

Default Bootline Parameters. The DEFAULT_BOOT_LINE macro provides an<br />

example bootline, which end users can alter to reflect their target environment.<br />

This is particularly useful for targets without NVRAM, because it means the end<br />

user does not have to re-enter the boot parameters on each power cycle.<br />

Timestamp Support. Each <strong>BSP</strong> should have timestamp support for the WindView<br />

product. The user configures timestamp support by defining or undefining the<br />

macro INCLUDE_TIMESTAMP. See the comments in the timer driver source file for<br />

a description of the additional support required by that specific driver.<br />

External Bus Address Mapping. VMEbus mapping is controlled by a series of nine<br />

macros for master window mapping and another set of nine standard macros for<br />

slave window mapping. The user configures VME by defining INCLUDE_VME in<br />

config.h. The VME mappings for A16, A24, and A32 space master access are<br />

controlled by a sequence of three macros each.<br />

It is assumed that the <strong>BSP</strong> honors all of these macros. If the hardware is fixed and<br />

one or more sets of these macros must have fixed values, then those macros should<br />

be moved from config.h to bspname.h. Only macros that the user can reasonably<br />

change should be in config.h.<br />

21

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

Saved successfully!

Ooh no, something went wrong!