<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=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am new in ethercat and I am getting problems with the example mini.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am using ethercat 1.5.2, Ubunto 12.04.2, linux kernel version 3.5.0-23-generic, the generic Ethernet driver and two proprietary ethercat slaves.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I follow the installation instructions and manage to
<i>configure </i>and <i>make modules</i>. I start the master manually with <i>ethercat start</i> and get following system messages with
<i>dmesg</i>:<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">[11789.921570] EtherCAT: Master driver 1.5.2 2eff7c993a63<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.921708] EtherCAT: 1 master waiting for devices.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.927170] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 2eff7c993a63<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.927193] EtherCAT: Accepting 5C:26:0A:1E:C7:E0 as main device for master 0.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.927205] ec_generic: Binding socket to interface 2 (eth0).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.928833] EtherCAT 0: Starting EtherCAT-IDLE thread.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.928892] EtherCAT 0: Link state of ecm0 changed to UP.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.932772] EtherCAT 0: 2 slave(s) responding on main device.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.932778] EtherCAT 0: Slave states on main device: PREOP.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11789.933336] EtherCAT 0: Scanning bus.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11790.660653] EtherCAT 0: Bus scanning completed in 728 ms.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[11790.660658] EtherCAT 0: Using slave 0 as DC reference clock.<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">I then change the processing data part of mini.c to match my hardware (slave positions, vendor and products ids). I then delete the .o files generated in my initial
<i>make modules</i> after installing ethercat. I run <i>make modules</i> again and obtain many undefined:<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">root@ethercat-test:~/Desktop/ethercat/ethercat-1.5.2/examples/mini# make modules<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">make -C "/usr/src/linux-headers-3.5.0-23-generic" M="/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini" modules<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">make[1]: Entering directory `/usr/src/linux-headers-3.5.0-23-generic'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Building modules, stage 2.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> MODPOST 1 modules<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_receive" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_create_domain" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_send" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_domain_queue" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_send_ext" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_domain_reg_pdo_entry_list" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_domain_process" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_domain_state" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_callbacks" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_state" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_slave_config_state" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_slave_config" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_slave_config_pdos" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_domain_external_memory" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_domain_size" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_master_activate" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_release_master" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: "ecrt_request_master" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-23-generic'<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">All these undefined mean to me the module was not well built, isn’t it?<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">In spite of having problems building the module, I tried anyway
<i>insmod</i> and get an error: <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">root@ethercat-test:~/Desktop/ethercat/ethercat-1.5.2/examples/mini# insmod ec_mini.ko<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">insmod: error inserting 'ec_mini.ko': -1 Invalid parameters<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">What could be wrong? <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 for any advice<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">Uriel<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>