
TPMC500-SW-42 - VxWorks Device Driver
Page 6 of 19
2.3 Special installation for Intel x86 based targets
The TPMC500 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
. If the contents of this macro is equal to
I80386
,
I80386
or
PENTIUM
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 PCI memory spaces can’t be accessed.
To solve this problem a MMU mapping entry has to be added for the required TPMC500 PCI memory
spaces prior the MMU initialization (
usrMmuInit()
) is done.
Please examine the BSP documentation or contact the BSP Vendor whether the BSP perform
automatic PCI and MMU configuration or not. If the PCI and MMU initialization is done by the BSP the
function
tp500PciInit()
won’t be included and the user can skip to the following steps.
The C source file
tp461pci.c
contains the function
tp461PciInit().
This routine finds out all TPMC461
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()
).
If the Tornado 2.0/2.2 project facility is used, the right place to call the function
tp500PciInit()
is at the
end of the function
sysHwInit()
in
sysLib.c
(can be opened from the project
Files
window).
Be sure that the function is called prior to MMU initialization otherwise the TPCM500 PCI spaces
remains unmapped and an access fault occurs during driver initialization.
Please insert the following call at a suitable place in either
sysLib.c
or
usrConfig.c
:
tp500PciInit();
The function
tp500PciInit()
is designed for and tested on generic Pentium targets. If another
BSP is used, please refer to BSP documentation or contact the technical support for required
adaptation.
If strange errors appeared after system startup with the new build system please carrying out a
VxWorks
build clean
and
build all
.