<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 15 (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;}
/* 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.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-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.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;}
/* List Definitions */
@list l0
        {mso-list-id:759646683;
        mso-list-type:hybrid;
        mso-list-template-ids:712167940 67567631 67567641 67567643 67567631 67567641 67567643 67567631 67567641 67567643;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">Hi Scott,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">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;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">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;mso-fareast-language:EN-US">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;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">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;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">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;mso-fareast-language:EN-US">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;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">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;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">Regards and good luck,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">Patrick Bruenn<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US">[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;mso-fareast-language:EN-US">[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;mso-fareast-language:EN-US">[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;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:EN-US"><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 [mailto:etherlab-users-bounces@etherlab.org]
<b>On Behalf Of </b>Tillman, Scott<br>
<b>Sent:</b> Mittwoch, 20. Mai 2015 17:07<br>
<b>To:</b> etherlab-users@etherlab.org<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>
</div>
<br>
<span style="FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt">Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff<br>
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075</span> <br>
<br>
</body>
</html>