In the context of the I-MECH project, funded by the European Commission under the ECSEL programme, we have ported the SOEM EtherCAT library on ERIKA.
Such experimental support will be soon released in the next stable version of the RTOS. This page explains how to setup and run the provided demo.
For running the demo, an x86-64 platform with the following characteristics is needed:
- Supporting hardware-assisted virtualization (i.e. VT-x, VT-D, EPT) and capable of running the Xen hypervisor in HVM mode.
- With an Intel i210 network interface.
The provided demo assumes the Intel i210 network interface to be connected to a Beckhoff EL2004 EtherCAT slave. The demo has been tested on Advantech ARK-3520P-U7A1E.
To run the provided EtherCAT master demo, follow the next steps:
- Download the EtherCAT SOEM library for ERIKA3 from the page https://github.com/evidence/erika3-SOEM
- Download the bare-metal x86 toolchain available at this link http://erika-enterprise.com/download/erika3_x86_64_xtools.tar.gz and extract the downloaded archive on a local directory
- (optional) Put the directory containing the toolchain binaries in the
PATHenvironment variable before running RT-Druid.
- Run the RT-Druid tool
- Create a new project by clicking on
RT-Druid v3 Oil and C/C++ Projectas shown in the next Figure:
- Name the new project (e.g.,
mytest) and select the Cross-GCC as shown in the next Figure:
- Check the box for using an existing template and select
EtherCAT SOEM demoas shown in the next Figure:
- Right click the project and select
Propertiesas shown in the following Figure:
Generator properties, enable project specific settings and specify the directory containing the SOEM library for ERIKA3:
- If you didn't put the toolchain in the
PATHdirectory, also set the
GNU Compiler prefixproperty to
- Edit the
main.cfile and set the
SLAVE_NBvariable for the Bechkhoff EL2004 slave (note that the SOEM library numbers slaves starting from
- Follow the instructions at [ERIKA3_on_the_Xen_hypervisor|this page] for building and running the Xen iso image.