
TPMC500-SW-42 - VxWorks Device Driver
Page 5 of 19
2 Installation
Following files are located on the distribution media:
tp500drv.c
TPMC500 Device Driver Source
tp500def.h
TPMC500 Local Include File
tpmc500.h
TPMC500 Application Include File
tp500pci.c
TPMC500 PCI MMU mapping for Intel x86 based targets
tpxxxhwdep.c Collection
of
hardware dependent functions
tpxxxhwdep.h
Include for hardware dependent functions
tp500exa.c Example
Application
For installation the files have to be copied to the desired target directory.
2.1 Hardware dependent Configuration
The driver is written to be used on TEWS carrier boards and others, but sometimes it is necessary to
adapt the software. The following points have to be guaranteed:
!
full access to the PMC I/O area of the card
!
full access to PMC memory area of the card (correction data address space)
!
interrupt must be connected
Most systems should work without any changes, but it may be necessary to setup address offsets or
an offset between interrupt level and vector. Information for these values should be available in you
BSP manual and/or CPU board manual. If such an adaptation is necessary you will get a warning
while compilation.
The values that have to be modified can be found in
tpxxxhwdep.h
. There are three values that will be
explicitly undefined after installation. To use these values, you have to define them with an appropriate
value.
USERDEFINED_MEM_OFFSET
This value defines the offset between CPU-bus and
PCI-bus address for memory accesses.
USERDEFINED_IO_OFFSET
This value defines the offset between CPU-bus and
PCI-bus address for 16-bit I/0 accesses.
USERDEFINED_LEV2VEC
This value defines the value that should be added
to the interrupt level number to get the interrupt
vector number.
If everything works fine while the values are undefined, and warnings are generated, you can define
these values with a value of 0;
2.2 Including the driver in VxWorks
How to include the device drive in the VxWorks system is described in the VxWorks and Tornado
manuals.