TPMC866-SW-42 - VxWorks Device Driver
Page 5 of 37
2 Installation
Following files are located on the distribution media:
Directory path ‘TPMC866-SW-42’:
tpmc866drv.c
TPMC866 device driver source
tpmc866def.h
TPMC866 driver include file
tpmc866.h
TPMC866 include file for driver and application
tpmc866pci.c
TPMC866 PCI MMU mapping for Intel x86 based targets
tpmc866exa.c
Example application
include/tdhal.h
Hardware dependent interface functions and definitions
TPMC866-SW-42-2.0.1.pdf PDF copy of this manual
ChangeLog.txt
Release history
Release.txt
Release information
2.1 Include device driver in Tornado IDE project
For Including the TPMC866-SW-42 device driver into a Tornado IDE project follow the steps below:
(1) Copy the files from the distribution media into a subdirectory in your project path.
(For example: ./TPMC866)
(2) Add the device driver’s C-files to your project.
Make a right click to your project in the ‘Workspace’ window and use the ‘Add Files ...’ topic.
A file select box appears, and the driver files can be selected.
(3) Now the driver is included in the project and will be built with the project.
For a more detailed description of the project facility please refer to your Tornado User’s
Guide.
2.2 Special installation for Intel x86 based targets
The TPMC866 device driver is fully adapted for Intel x86 based targets. This is done by conditional
compilation directives inside the source code and controlled by the VxWorks global defined macro
CPU_FAMILY
. If the content of this macro is equal to
I80X86
special Intel x86 conforming code and
function calls will be included.
The second problem for Intel x86 based platforms can’t be solved by conditional compilation
directives. Due to the fact that some Intel x86 BSP’s doesn’t map PCI memory spaces of devices
which are not used by the BSP, the required device memory spaces can’t be accessed.
To solve this problem an MMU mapping entry has to be added for the required TPMC866 PCI memory
spaces prior the MMU initialization (
usrMmuInit()
) is done.
The C source file
tpmc866pci.c
contains the function
tp866PciInit().
This routine finds out all
TPMC866 devices and adds MMU mapping entries for all used PCI memory spaces. Please insert a
call to this function after the PCI initialization is done and prior to MMU initialization (
usrMmuInit()
).
The right place to call the function
tp866PciInit()
is at the end of the function
sysHwInit()
in
sysLib.c
(it
can be opened from the project
Files
window).