02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C<br />

Upgrading a <strong>BSP</strong> for the<br />

VxWorks Network Stack<br />

Adding your driver to the target VxWorks system is much like adding any other<br />

application. The first step is to compile and include the driver code in the VxWorks<br />

image. For a description of the general procedures, see the Tornado User’s <strong>Guide</strong>:<br />

Projects, which tells you how to compile source code to produce target-suitable<br />

object code.<br />

Including most software modules in the VxWorks image is usually just a matter of<br />

setting a few #define statements. Adding a network interface driver does not<br />

require much more. However, because VxWorks allows you to create more than<br />

one network device, you must also set up a table that groups the #define<br />

statements into device-specific groups. This table is defined in<br />

target/src/config/<strong>BSP</strong>/configNet.h, where <strong>BSP</strong> is the name of your board support<br />

package, such as mv162 and pc486.<br />

For example, if you wanted VxWorks to create two network devices, one that<br />

supported buffer loaning and one that did not, you would first edit configNet.h to<br />

include the following statements:<br />

/* Parameters for loading the driver supporting buffer loaning. */<br />

#define LOAD_FUNC_0 ln7990EndLoad<br />

#define LOAD_STRING_0 "0xfffffe0:0xffffffe2:0:1:1"<br />

#define <strong>BSP</strong>_0 NULL<br />

/* Parameters for loading the driver NOT supporting buffer loaning. */<br />

#define LOAD_FUNC_1 LOAD_FUNC_0<br />

#define LOAD_STRING_1 "0xffffee0:0xfffffee2:4:1:1"<br />

#define <strong>BSP</strong>_1 NULL<br />

221

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

Saved successfully!

Ooh no, something went wrong!