<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-NZ" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">If the module uses CCAT you could try the patch I wrote for the CX2100 power module. Attached.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">The patch was written for etherlab master 1.5.2 - 2526, used under linux 2.6.32.11.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I submitted it to this forum some time ago but it didn’t get included.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Note: we had problems with about 4 or 5 CX2020 computers (using the CX2100 units) where every now and then on very cold boots they would fail to send the ethercat frames to the CX2100. This turned out to be
a bug with the CX2020’s bios or some firmware. Never really did find out exactly what it was.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Graeme.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> etherlab-users [mailto:etherlab-users-bounces@etherlab.org]
<b>On Behalf Of </b>Patrick Brünn<br>
<b>Sent:</b> Thursday, 21 May 2015 10:39 p.m.<br>
<b>To:</b> Tillman, Scott; etherlab-users@etherlab.org<br>
<b>Cc:</b> Heiko Wilke<br>
<b>Subject:</b> Re: [etherlab-users] Intel I210 + RTAI<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi Scott,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Have you tried to use the generic EtherLab driver on top of the standard igb driver?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">That interface is controlled by the CCAT. And there are two drivers available for that FPGA:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span lang="EN-US" style="color:#1F497D">1.</span><span lang="EN-US" style="font-size:7.0pt;font-family:"Times New Roman","serif";color:#1F497D">
</span><span lang="EN-US" style="color:#1F497D">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.</span><span lang="EN-US"> </span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span lang="EN-US" style="color:#1F497D">2.</span><span lang="EN-US" style="font-size:7.0pt;font-family:"Times New Roman","serif";color:#1F497D">
</span><span lang="EN-US" style="color:#1F497D">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.
<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US" style="color:#1F497D">A mercurial bundle[3] to add a patched version of the driver to EtherLab is available, too.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">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. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Regards and good luck,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Patrick Bruenn<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">[1] <a href="https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/ec_bhf.c">
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/ec_bhf.c</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">[2] <a href="ftp://ftp.beckhoff.com/Software/embPC-Control/Solution/Linux/CCAT/ccat-0.12.tar.gz">
ftp://ftp.beckhoff.com/Software/embPC-Control/Solution/Linux/CCAT/ccat-0.12.tar.gz</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">[3] <a href="ftp://ftp.beckhoff.com/Software/embPC-Control/Solution/Linux/CCAT/ccat-0.12.hg">
ftp://ftp.beckhoff.com/Software/embPC-Control/Solution/Linux/CCAT/ccat-0.12.hg</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> etherlab-users [<a href="mailto:etherlab-users-bounces@etherlab.org">mailto:etherlab-users-bounces@etherlab.org</a>]
<b>On Behalf Of </b>Tillman, Scott<br>
<b>Sent:</b> Mittwoch, 20. Mai 2015 17:07<br>
<b>To:</b> <a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br>
<b>Subject:</b> [etherlab-users] Intel I210 + RTAI<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So I’m looking for suggestions on how to proceed:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Figure out how to modify the igb driver:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Figure out how to remove the RTAI dependency:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Support both RTAI and RT-Preempt:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Suggestions?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Scott Tillman<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="DE" style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
</span><span lang="DE" style="font-size:8.0pt;font-family:"Arial","sans-serif"">Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff<br>
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075</span><span lang="DE" style="font-size:12.0pt;font-family:"Times New Roman","serif"">
<o:p></o:p></span></p>
</div>
</body>
</html>