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.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

To set appropriate values for these constants, consider the following:<br />

END_LOAD_FUNC<br />

Specifies the name of your driver’s endLoad( ) entry point. For example, if<br />

your driver’s endLoad( ) entry point were ln7990EndLoad( ), you would edit<br />

config.h to include the line:<br />

#define END_LOAD_FUNC ln7990EndLoad<br />

END_LOAD_STRING<br />

Specifies the initialization string passed into muxDevLoad( ) as the initString<br />

parameter.<br />

You must also edit the definition of the endTbl (a table in configNet.h that specifies<br />

the ENDs included in the image) to include the following:<br />

END_TBL_ENTRY endTbl<br />

{<br />

{ 0, LOAD_FUNC_0, LOAD_STRING_0, <strong>BSP</strong>_0, FALSE},<br />

{ 1, LOAD_FUNC_1, LOAD_STRING_1, <strong>BSP</strong>_1, FALSE},<br />

{ 0, END_TBL_END, 0, NULL},<br />

};<br />

The number at the beginning of each line specifies the unit number for the device.<br />

The first line specifies a unit number of 0. Thus, the device it loads is deviceName0.<br />

The FALSE at the end of each entry indicates that the entry has not been processed.<br />

After the system has successfully loaded a driver, it changes this value to TRUE in<br />

the run-time version of this table. If you want to prevent the system from<br />

automatically loading your driver, set this value to TRUE.<br />

Finally, you must edit your <strong>BSP</strong>’s config.h file to define INCLUDE_END. 1 This tells<br />

the build process to include the END/MUX interface. A this point, you are ready<br />

to rebuild VxWorks to include your new drivers. When you boot this rebuilt image,<br />

it calls muxDevLoad( ) for each device specified in the table in the order listed. 2<br />

NOTE: If you do not rebuild your boot ROMs, they cannot contain your new END.<br />

This means you must boot from a non-END driver already resident in the boot<br />

ROMs. To do this, you must define END_OVERRIDE in your <strong>BSP</strong>’s config.h. After<br />

the system actually boots, it can use the new END device that you included in the<br />

VxWorks image.<br />

1. By default, the config.h file for an END <strong>BSP</strong> undefines INCLUDE_END.<br />

2. For a description of the parameters to muxDevLoad( ), see the appropriate reference entry.<br />

274

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

Saved successfully!

Ooh no, something went wrong!