4.5. Windriver VxWorks
Real-time Ethernet Driver for VxWorks are available. If none of the Real-time Ethernet Driver can be used, the SNARF Ethernet Driver must be selected.
The identification of the Real-time Ethernet Driver is done like this:
4.5.1. VxWorks native
The BSP has to be prepared to support Real-time Ethernet Driver:
To use a Real-time Ethernet Driver the adapter memory has to be mapped into VxWorks memory space (VxWorks 5.x only). I.e. for the Intel Pro/100 Ethernet Driver this can be achieved by setting the INCLUDE_FEI_END macro in the BSP configuration file config.h.
To avoid conflicts with the VxWorks network driver which normally will be loaded when INCLUDE_FEI_END is set the file configNet.h has to be adjusted in a way that the network driver is not loaded. The network driver entry has to be removed from the endDevTbl[]:
END_TBL_ENTRY endDevTbl [] =
{
: : :
: : :
: : :
/*
#ifdef INCLUDE_FEI_END
{0, FEI82557_LOAD_FUNC, FEI82557_LOAD_STRING, FEI82557_BUFF_LOAN,
NULL, FALSE},
#endif /* INCLUDE_FEI_END */
*/
: : :
: : :
Warning
Do not call muxDevUnload() for a device managed by a VxBus driver. VxBus drivers expect to call muxDevUnload() themselves in their {vxbDrvUnlink}( ) methods, and instability may result if muxDevUnload() is called for a VxBus network device instance by other code.
See also
The VxWorks Device Driver Developer’s Guide for more information about unloading VxBus network devices
4.5.2. SNARF Ethernet Driver
The SNARF Ethernet Driver is only needed if none of the Real-time Ethernet Driver can be used. The appropriate network adapter drivers have to be added to the VxWorks image.
4.5.3. OS Compiler settings
Besides the general settings from OS Compiler settings the following settings are necessary to build the example application for VxWorks.
- Extra include paths
<InstallPath>/SDK/INC/VxWorks <InstallPath>/Examples/Common/VxWorks
- Extra source paths
<InstallPath>/Examples/Common/VxWorks <InstallPath>/Sources/OsLayer/VxWorks
- Extra library paths to the main EtherCAT components
<InstallPath>/SDK/LIB/VxWorks/<ARCH>
- GNU/PowerPC
-mlongcallcompiler option may be needed to avoid relocation offset errors when downloading.outfiles.