4.7. Xenomai
The system must be setup first the same way as for EC-Simulator for Linux, especially installation of the atemsys module and Real-time Ethernet Driver usage preparation.
See also
Chapter Linux
The binaries are built using the following versions:
- armv6-vfp-eabihf:
Xenomai 2.6.3, tested on Linux Kernel 3.8.13-xenomai-2.6.4
- x64:
Xenomai 3.0.2, tested on Linux Kernel 3.18.20 (Cobalt)
EVL r0.44 (Xenomai 4), tested on Linux Kernel 5.15.106
- x86:
Xenomai 2.6.2.1, tested on Linux Kernel 3.5.7
Xenomai 3.0.2, tested on Linux Kernel 3.18.20 (Cobalt) and 3.10.32-rt31 (Mercury)
4.7.1. Setting up and running EcSimulatorHilDemo
- Prepare system
Prepare the system to run EcSimulatorHilDemo on Linux as described in chapter Linux
- Compile EcSimulatorHilDemo
As a starting point there is the Eclipse project for EcSimulatorHilDemo for Xenomai located at
Workspace/Xenomai/
. EnsureOPERATING_SYSTEM
,ARCH
,CFLAGS
,LDFLAGS
,LD_LIBRARY_PATH
are set accordingly (export ARCH=x86, …) when compiling using Eclipse! For Xenomai 4 the environment variable ELV_PATH should contain path of the libevl. Also ensure the following define is present:EC_VERSION_XENOMAI=4
- Run using GDB
Provide search path for Xenomai libraries and prevent GDB to stop execution on SIGXCPU:
export LD_LIBRARY_PATH=../../Bin/Xenomai/x86:/usr/xenomai/lib:. gdb --args ./EcSimulatorHilDemo -intelgbe 2 1 -f eni.xml -v 3 [...] (gdb) handle SIGXCPU nostop noprint nopass (gdb) run
See also
4.7.2. OS compiler settings
Besides the general settings from OS Compiler settings the following settings are necessary to build the example application for Xenomai.
- Extra include paths
<InstallPath>/SDK/INC/Xenomai <InstallPath>/Examples/Common/Xenomai
- Extra source paths
<InstallPath>/Examples/Common/Xenomai <InstallPath>/Sources/OsLayer/Xenomai
- Extra library paths to the main EtherCAT components
Xenomai 2 and 3:
<InstallPath>/SDK/LIB/Xenomai
Xenomai 4:
<InstallPath>/SDK/LIB/Xenomai4
- Extra libraries (in this order)
Xenomai 2:
EcSimulatorRasServer EcSimulator pthread dl rt native xenomai
Xenomai 3:
EcSimulatorRasServer EcSimulator pthread dl rt
xeno-config --cflags
andxeno-config --ldflags
of the Xenomai installation return the neededCFLAGS
andLDFLAGS
. If further information is needed, please refer to http://xenomai.org/ .Xenomai 4:
EcSimulatorRasServer EcSimulator pthread evl dl