[etherlab-users] Intel I210 + RTAI

Patrick BrĂ¼nn P.Bruenn at beckhoff.com
Thu May 21 12:39:19 CEST 2015

Hi Scott,
Have you tried to use the generic EtherLab driver on top of the standard igb driver?

If you need a native EtherLab driver and it's no requirement to use the two igb ports for your EtherCAT connection, I would suggest to use the Bus terminal interface on the right side of the CX50xx.
That interface is controlled by the CCAT. And there are two drivers available for that FPGA:

1.       Darek Marcinkiewicz wrote "ec_bhf" [1], which is part of the official Linux Kernel since 3.15. AFAIK this driver is specialized to be used with SOEM, but I am sure Darek is willing to help to make it run with EtherLab, too.

2.       Beckhoff provides a driver called "ccat" [2]. That driver registers the CCAT as common Ethernet device and offers access to other functions of the FPGA like GPIOs or SRAM.

A mercurial bundle[3] to add a patched version of the driver to EtherLab is available, too.

If that's an option for you and you have any further questions, don't hesitate to ask. But please note that my response might take until 15th of June, as I am leaving the office for vacation within the next hours. In the meantime Heiko Wilke might help you.

Regards and good luck,
Patrick Bruenn

[1] https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/ec_bhf.c
[2] ftp://ftp.beckhoff.com/Software/embPC-Control/Solution/Linux/CCAT/ccat-0.12.tar.gz
[3] ftp://ftp.beckhoff.com/Software/embPC-Control/Solution/Linux/CCAT/ccat-0.12.hg

From: etherlab-users [mailto:etherlab-users-bounces at etherlab.org] On Behalf Of Tillman, Scott
Sent: Mittwoch, 20. Mai 2015 17:07
To: etherlab-users at etherlab.org
Subject: [etherlab-users] Intel I210 + RTAI

We have a large-ish codebase of real-time components based on Linux with RTAI.  I am attempting to add EtherCAT support on various hardware including the Beckhoff CX5020/30/40.  This hardware contains the Intel I210 (82575), which is supported by the igb.ko driver under Linux.  This driver seems to be related to the e1000e driver, but etherlab currently doesn't have a native replacement for the igb driver.

So I'm looking for suggestions on how to proceed:

Figure out how to modify the igb driver:
Most obvious, but I have no familiarity with Linux network hardware drivers so I'm uncomfortable doing this myself from scratch.  This seems like a fairly common piece of hardware, so maybe someone is already working on this.  I'd happily test & help debug if so.

Figure out how to remove the RTAI dependency:
The RT-Preempt patches are eroding support for RTAI, but I'm kind of stuck with existing code.  Perhaps there exist wrappers/libraries for emulating the RTAI services using only the RT-Preempt kernel?  This seems unlikely, but not impossible.  I'd prefer this, since I believe RTAI support will only continue to decline.  Anyone know of something like this?

Support both RTAI and RT-Preempt:
This would allow existing, legacy RTAI code and use of the generic driver via RT-Preempt.  However, I've not seen anyone actually talking about doing this.  I've not tried applying both the RTAI patches and the RT-preempt patches, but I strongly suspect they will have conflicts.   Also, I'm using 3.16 currently but the RT-Preempt patches are only available for 3.14 and 3.18 (naturally).  The basic idea here is worrying, but I guess it might work...


-Scott Tillman

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20150521/04589f46/attachment-0003.htm>

More information about the Etherlab-users mailing list