3.10. EC-Master MainDevice Stack Source Code
In a source code delivery the MainDevice stack sources are divided into 4 parts:
SDK Header files
Real-time Ethernet Driver files (multiple Real-time Ethernet Drivers may be shipped)
Link OS driver files (only valid for the Real-time Ethernet Drivers)
MainDevice stack files (configuration, core and interface layer)
OS layer files (only valid for the MainDevice stack)
The MainDevice stack can be ported to several different operating systems and CPU architectures with different compilers and development environments. Typically no supported build environment files like IDE projects are shipped with the source code.
To build the MainDevice stack the appropriate build environment for the target operating system has to be used. If an integrated development environment (IDE) exists (Visual Studio, Eclipse, etc.) several projects containing all necessary files are needed to build the artefacts. If no integrated development environment is available makefiles and dependency rules may have to be created which contain the necessary MainDevice stack source and header files.
3.10.1. Components
For most platforms three separate independent binaries will have to be generated:
Real-time Ethernet Driver Binary (e.g. a downloadable object module in VxWorks or a DLL in Windows). The Real-time Ethernet Driver binary will be dynamically bound to the application at runtime. (currently not for On Time RTOS-32 which uses static libraries)
MainDevice Stack Library
Remote API Server Library
3.10.1.1. Real-time Ethernet Driver Binaries
The following files have to be included into an IDE project or makefile:
Real-time Ethernet Driver files. Only one single Real-time Ethernet Driver must be selected even if multiple Real-time Ethernet Drivers are shipped. For each Real-time Ethernet Driver a separate binary has to be created.
Link OS layer files
Windows: a dynamic link library (
.dll) has to be created. The name of the DLL has to beemllXxxx.dllwhereXxxxshall be replaced by the Real-time Ethernet Driver type (e.g.emllI8255x.dllfor the I8255x Real-time Ethernet Driver).VxWorks: a downloadable kernel module (
.out) has to be created. The name of the module has to beemllXxxx.outwhereXxxxshall be replaced by the Real-time Ethernet Driver type (e.g.emllI8255x.outfor the I8255x Real-time Ethernet Driver).sysLoSalAdd.cshould be included in the BSP if needed and should not be compiled within the Real-time Ethernet Driver binary.Linux/QNX: a shared object library (
.so) has to be created.RTX: an RTX dynamic link library (
.rtdll) has to be created. The name of the DLL has to beemllXxxx.dllwhereXxxxshall be replaced by the Real-time Ethernet Driver type (e.g.emllI8255x.dllfor the I8255x Real-time Ethernet Driver).INtime: a shared library (
.rsl) has to be created. The name of the RSL has to beemllXxxx.rslwhereXxxxshall be replaced by the Real-time Ethernet Driver type (e.g.emllI8255x.rslfor the I8255x Real-time Ethernet Driver).
3.10.1.2. MainDevice Stack Binaries
The following files have to be included into an IDE project or makefile:
MainDevice stack files
OS layer files
For all platforms a static library has to be created. This library will have to be linked together with the application.
3.10.1.3. Remote API Server Binaries
The following files have to be included into an IDE project or makefile:
Remote API server files.
For all platforms a static library has to be created. This library will have to be linked together with the application.
See also
Platform and Operating Systems (OS) for required tool chain settings
3.10.2. Excluding features
It is possible to reduce the footprint of the MainDevice library and improve its execution performance by compiling less features.
- EXCLUDE_EOE_ENDPOINT
FP-EoE-Endpoint
- EXCLUDE_HOTCONNECT
FP-Hot-Connect
- EXCLUDE_JUNCTION_REDUNDANCY
FP-Cable-Redundancy
- EXCLUDE_MASTER_OBD
- EXCLUDE_RED_DEVICE
FP-Cable-Redundancy
- EXCLUDE_SPLITTED_FRAME_PROCESSING
FP-Split-Frame-Processing
- EXCLUDE_DC_SUPPORT
Class-A
The following defines and their impact are described below:
- EXCLUDE_ADS_ADAPTER
emAdsAdapterStart()emAdsAdapterStop()- EXCLUDE_AOE_SUPPORT
- EXCLUDE_BAD_CONNECTIONS
- EXCLUDE_CONFIG_EXTEND
- EXCLUDE_DCX
- DCM DCX mode
- EXCLUDE_EEPROM_SUPPORT
- EXCLUDE_EOE_DEFFERED_SWITCHING
- EXCLUDE_EOE_ENDPOINT
emEoeRegisterEndpoint()- EXCLUDE_EXECJOB_REENTRANCY_SUPPORT
- EXCLUDE_FOE_SUPPORT
- EXCLUDE_FORCE_PROCESSDATA
- EXCLUDE_FRAME_LOGGING
- EXCLUDE_FRAME_LOSS_SIMULATION
- EXCLUDE_GEN_OP_ENI
- EXCLUDE_INTERFACE_LOCK
- No API protection against InitMaster/DeinitMaster
- EXCLUDE_LINE_CROSSED_DETECTION
- No line crossed detection
- EXCLUDE_LOG_MESSAGES
- No Log messages generated
- EXCLUDE_MAILBOX_STATISTICS
- EXCLUDE_MASTER_OBD
- EXCLUDE_MASTERSYNCUNITS
- EXCLUDE_MEMORY_PROVIDER
- EXCLUDE_MULTIPLE_CYC_ENTRIES
- EXCLUDE_PORT_OPERATION
- EXCLUDE_RAWMBX_SUPPORT
- EXCLUDE_RED_DEVICE
- EXCLUDE_RESCUE_SCAN
- EXCLUDE_S2SMBX_SUPPORT
- EXCLUDE_SLAVE_HANDLING
- EXCLUDE_SLAVE_IDENTIFICATION
/EtherCATConfig/Config/Slave/Info/Identification- EXCLUDE_SLAVE_STATISTICS
- EXCLUDE_SOE_SUPPORT
- EXCLUDE_SPLITTED_FRAME_PROCESSING
- EC_IOCTL_SET_SPLITTED_FRAME_PROCESSING_ENABLED
- EXCLUDE_TEXT
ecatGetNotifyText()- EXCLUDE_TRACE_DATA
- EXCLUDE_TRACE_DATA_VARINFO
- EXCLUDE_VARREAD
- EXCLUDE_VOE_SUPPORT
- EXCLUDE_WKCSTATE