5.5
BSP DEVELOPER’S GUIDE
VxWorks
®
Copyright 2002 Wind River Systems, Inc.
ALL RIGHTS RESERVED. No part of this publication may be copied in any form, by photocopy,
microfilm, retrieval system, or by any other means now known or hereafter invented without the prior
written permission of Wind River Systems, Inc.
AutoCode, Embedded Internet, Epilogue, ESp, FastJ, IxWorks, MATRIX
X
, pRISM, pRISM+, pSOS,
RouterWare, Tornado, VxWorks, wind, WindNavigator, Wind River Systems, WinRouter, and Xmath are
registered trademarks or service marks of Wind River Systems, Inc. or its subsidiaries.
Attaché Plus, BetterState, Doctor Design, Embedded Desktop, Emissary, Envoy, How Smart Things Think,
HTMLWorks, MotorWorks, OSEKWorks, Personal JWorks, pSOS+, pSOSim, pSOSystem, SingleStep,
SNiFF+, VSPWorks, VxDCOM, VxFusion, VxMP, VxSim, VxVMI, Wind Foundation Classes, WindC++,
WindManage, WindNet, Wind River, WindSurf, and WindView are trademarks or service marks of Wind
River Systems, Inc. or its subsidiaries. This is a partial list. For a complete list of Wind River trademarks
and service marks, see the following URL:
http://www.windriver.com/corporate/html/trademark.html
Use of the above marks without the express written permission of Wind River Systems, Inc. is prohibited.
All other trademarks, registered trademarks, or service marks mentioned herein are the property of their
respective owners.
Corporate Headquarters
Wind River Systems, Inc.
500 Wind River Way
Alameda, CA 94501-1153
U.S.A.
toll free (
U.S.): 800/545-WIND
telephone: 510/748-4100
facsimile: 510/749-2010
For additional contact information, please visit the Wind River URL:
http://www.windriver.com
For information on how to contact Customer Support, please visit the following URL:
http://www.windriver.com/support
VxWorks BSP Developer’s Guide, 5.5
9 Aug 02
Part #: DOC-14695-ND-00
iii
1 Overview .................................................................................................................. 1
2 BSP Organization ................................................................................................. 11
3 Creating a New BSP ............................................................................................. 41
4 Hardware Guidelines ............................................................................................ 63
5 Driver Guidelines .................................................................................................. 89
6 Components ........................................................................................................ 111
7 Validation Testing ............................................................................................... 139
8 Writing Portable C Code .................................................................................... 159
9 Documentation Guidelines ................................................................................173
10 Product Packaging ............................................................................................. 195
A Upgrading a BSP for Tornado 2.0 ..................................................................... 203
B Upgrading a BSP for Tornado 2.2 ..................................................................... 211
C Upgrading a BSP for the VxWorks Network Stack .......................................... 221
D VxWorks Boot Sequence ................................................................................... 223
E Component Language ........................................................................................ 231
F Generic Drivers ................................................................................................... 247
G Upgrading 4.3 BSD Network Drivers ................................................................. 257
H Implementing a MUX-Based Network Interface Driver .................................... 267
I Writing a SCSI-2 Device Driver .......................................................................... 317
VxWorks 5.5
BSP Developer’s Guide
iv
J BSP Validation Test Suite Reference Entries ......................................................... 365
K BSP Validation Checklists ....................................................................................... 401
L Refgen ....................................................................................................................... 415
M BSP Product Contents ............................................................................................. 423
Index .......................................................................................................................... 427
v
Contents
1 Overview ................................................................................................................... 1
1.1 Introduction ...................................................................................................... 1
New Features for Tornado 2.x .......................................................... 2
Prerequisites ........................................................................................ 4
BSP Kit Components ......................................................................... 4
Documentation ................................................................................... 5
Documentation Conventions ........................................................... 7
2 BSP Organization ..................................................................................................... 11
2.1 Introduction ...................................................................................................... 11
2.2 BSP Components .............................................................................................. 11
2.2.1 BSP Source and Include Files ........................................................... 12
Files in the target/config/all Directory .......................................... 13
Files in the target/config/comps/vxWorks Directory ................. 14
Files in the target/config/comps/src Directory ........................... 14
Files in the target/config/bspname Directory .............................. 15
2.2.2 Derived Files ....................................................................................... 28
2.2.3 Required Routines ............................................................................. 30
2.2.4 Optional Routines .............................................................................. 31