[etherlab-users] Problem running examples::mini

Uriel Roque Uriel.Roque at itk-engineering.de
Wed Apr 3 11:14:22 CEST 2013


Hi,
I am new in ethercat and I am getting problems with the example mini.
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.
I follow the installation instructions and manage to configure and make modules. I start the master manually with ethercat start and get following system messages with dmesg:

[11789.921570] EtherCAT: Master driver 1.5.2 2eff7c993a63
[11789.921708] EtherCAT: 1 master waiting for devices.
[11789.927170] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 2eff7c993a63
[11789.927193] EtherCAT: Accepting 5C:26:0A:1E:C7:E0 as main device for master 0.
[11789.927205] ec_generic: Binding socket to interface 2 (eth0).
[11789.928833] EtherCAT 0: Starting EtherCAT-IDLE thread.
[11789.928892] EtherCAT 0: Link state of ecm0 changed to UP.
[11789.932772] EtherCAT 0: 2 slave(s) responding on main device.
[11789.932778] EtherCAT 0: Slave states on main device: PREOP.
[11789.933336] EtherCAT 0: Scanning bus.
[11790.660653] EtherCAT 0: Bus scanning completed in 728 ms.
[11790.660658] EtherCAT 0: Using slave 0 as DC reference clock.

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 make modules after installing ethercat. I run make modules again and obtain many undefined:

root at ethercat-test:~/Desktop/ethercat/ethercat-1.5.2/examples/mini# make modules
make -C "/usr/src/linux-headers-3.5.0-23-generic" M="/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini" modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-23-generic'
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "ecrt_master_receive" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_master_create_domain" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_master_send" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_domain_queue" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_master_send_ext" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_domain_reg_pdo_entry_list" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_domain_process" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_domain_state" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_master_callbacks" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_master_state" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_slave_config_state" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_master_slave_config" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_slave_config_pdos" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_domain_external_memory" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_domain_size" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_master_activate" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_release_master" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
WARNING: "ecrt_request_master" [/home/ethercat/Desktop/ethercat/ethercat-1.5.2/examples/mini/ec_mini.ko] undefined!
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-23-generic'

All these undefined mean to me the module was not well built, isn't it?

In spite of having problems building the module, I tried anyway insmod  and get an error:

root at ethercat-test:~/Desktop/ethercat/ethercat-1.5.2/examples/mini# insmod ec_mini.ko
insmod: error inserting 'ec_mini.ko': -1 Invalid parameters

What could be wrong?

Thanks for any advice

Uriel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130403/9f5ca5d0/attachment-0002.htm>


More information about the Etherlab-users mailing list