RAM 6.0 BUX II Series Betriebsanweisung Seite 110

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 189
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 109
VxWorks
BSP Developer’s Guide, 6.0
102
For more information about adding support for devices, refer to the VxWorks
Device Driver Developer’s Guide.
Generic Driver Introduction
This section provides guidelines for writing generic drivers for the handful of
devices that are common to most BSPs. Although BSPs can differ considerably in
detail, there are some needs that are common to almost all BSPs. For example, most
BSPs require a serial device driver or a timer driver. Ideally, the drivers for these
devices are generic enough to port to a new BSP with a simple recompilation. This
reuse of code reduces maintenance overhead and lets the developer focus on other
efforts.
To help you use generic drivers across multiple similar BSPs, your VxWorks
installation includes source for generic drivers located in the target/src/drv
directory. At compile time, sysLib.c (a file duplicated in every BSP) can include
generic drivers from the target/src/drv directory as needed. As you develop
drivers for your BSP, strive to create drivers that are generic enough to service
multiple BSPs. These drivers can be added to vendor-specific subdirectories in the
target/src/drv directory, as specified in the following note.
However, if you are dealing with atypical hardware or legacy code, it may not be
practical to use a generic driver. Certain hardware designs are just too unique to
work with a generic driver and, although it is sometimes possible to use a generic
driver with legacy code, reworking the BSP to use a generic driver may not be
worth the effort. This is especially true if you are only upgrading the BSP to a new
release of VxWorks. If you are unable to use a generic driver, you must create or
maintain a BSP-specific driver. This type of driver does not reside in the
target/src/drv directory but is kept in a BSP-specific directory (so that the BSP’s
sysLib.c can include the driver when needed).
NOTE: Wind River reserves the right to add files to the target/src/drv
subdirectories. However, if you write a generic driver for use with multiple BSPs,
you can create a company-specific common directory under target/src/drv, and
add your driver to that subdirectory. The name of the directory should include a
abbreviation for your company name (must be three letters or more), followed by
the word “Common”. For example, aswiCommon would be an appropriate
directory name for a company called Acme Software Incorporated.
Seitenansicht 109
1 2 ... 105 106 107 108 109 110 111 112 113 114 115 ... 188 189

Kommentare zu diesen Handbüchern

Keine Kommentare