beckhoff / ccat Goto Github PK
View Code? Open in Web Editor NEWBeckhoff CCAT FPGA Kernel mode driver to run EtherCAT Master on CX devices
License: Other
Beckhoff CCAT FPGA Kernel mode driver to run EtherCAT Master on CX devices
License: Other
Hello All.
Thanks a lot for linux implementation of ccat driver.
I noticed that the driver eats up a lot of resources because of polling (~30 - 40% on CX5020).
Are there plans to add interrupts support instead of polling mechanism?
Or may be there is a way to synchronize polling time with ethercat cycle?
How do you do it in Twincat?
best regards,
Alexey
Hi.
Im trying to install CCAT and etherlab on a CX5130 im using ubuntu server 18.04.4 lts with fully preempt linux-4.19.106-rt45 kernel installed for realtime operation.
i run the installation of ccat
$make
and
sudo make install
I can see that the ccat modules have been installed (see bellow)
$lsmod | grep ccat
ccat_update 16384 0
ccat_systemtime 16384 0
ccat_sram 16384 0
ccat_gpio 16384 0
ccat_netdev 16384 0
ccat 16384 2 ccat_sram,ccat_update
After this im trying to install etherlab master in the using the guide from the documentation
$hg clone http://etherlabmaster.hg.sourceforge.net/hgweb/etherlabmaster/etherlabmaster ethercat-hg
$cd ethercat-hg
$hg update stable-1.5
$patch -p1 < ../CCAT/etherlab-patches/0001-convert-ccat-to-mfd.patch
$patch -p1 < ../CCAT/etherlab-patches/0002-zalloc.patch
$./bootstrap
$./configure --disable-8139too --enable-ccat_netdev --enable-kernel --enable-cycles --enable-hrtimer --prefix /opt/etherlab
$make
$make modules
$make install
$make modules_install
$mkdir /etc/sysconfig
$cd /opt/etherlab
$cp etc/sysconfig/ethercat /etc/sysconfig/
$ln -s etc/init.d/ethercat /etc/init.d/
Then i change the MASTER0_DEVICE variable to the mac address of the port i want to use and DEVICE_MODULES variable to "ccat" in /etc/sysconfig/ethercat
And finally i try to start it with /etc/init.d/ethercat start
but i just get the error
Starting EtherCAT master 1.5.2 modinfo: ERROR: Module ec_ccat not found.
done
And the modules do not show up when i run
$lsmod | grep ccat
I uninstalled it to try another way with https://github.com/icshwi/etherlabmaster
$echo "ETHERCAT_MASTER0=enp3s0" > ethercatmaster.local
$make init
$echo "WITH_DEV_GENERIC = NO" > configure/CONFIG_OPTIONS.local
$echo "WITH_DEV_CCAT = YES" >> configure/CONFIG_OPTIONS.local
$make ccat_patch
$make build
$make install
$make dkms_add
$make dkms_build
$make dkms_install
$make setup
Everything installs fine with and i end up with the modules installed
$lsmod | grep ccat
ec_ccat_netdev 20480 0
ec_master 258048 1 ec_ccat_netdev
ccat_update 16384 0
ccat_systemtime 16384 0
ccat_sram 16384 0
ccat_gpio 16384 0
ccat 16384 2 ccat_sram,ccat_update
I can't seem to get the ethercat to work after this
and dmesg
gives me this
[ 21.195204] ccat: loading out-of-tree module taints kernel.
[ 1547.697135] PKCS#7 signature not signed with a trusted key
[ 1547.729268] EtherCAT: Master driver 1.5.2 unknown
[ 1547.740860] EtherCAT: 1 master waiting for devices.
[ 1547.876607] PKCS#7 signature not signed with a trusted key
Am i missing something? or am i doing something wrong?
Regards Gustav
Hello,
After compiling the drivers (with UBUNTU 20.04) the drivers don't load.
error:
`
[ 5412.520911] ccat_gpio: loading out-of-tree module taints kernel.
[ 5412.520979] ccat_gpio: module verification failed: signature and/or required key missing - tainting kernel
[ 5412.521157] ccat_gpio: unknown parameter 'ccat' ignored
[ 5412.521159] ccat_gpio: unknown parameter 'ccat_netdev' ignored
[ 5412.521164] ccat_gpio: unknown parameter 'ccat_sram' ignored
[ 5412.521166] ccat_gpio: unknown parameter 'ccat_systemtime' ignored
[ 5412.521167] ccat_gpio: unknown parameter 'ccat_update' ignored
`
Regards,
Gustavo
We are trying to get a Beckhoff CX2030 Industrial PC running Ubuntu to accept input from Beckhoff EL3024 modules using Etherlab with the CCAT modules. However, we haven't been able to initialise the EtherCAT connection, the EtherCAT messages stop at EtherCAT: 1 master waiting for devices.
Could you give us a hand troubleshooting this issue?
Below are the steps we took to install Etherlab and CCAT on a clean Ubuntu 14.04.5 install on the CX2030.
sudo apt install mercurial automake libtool build-essential
wget http://etherlab.org/download/ethercat/ethercat-1.5.2.tar.bz2
tar -xjf ethercat-1.5.2.tar.bz2
hg update stable-1.5
wget https://github.com/Beckhoff/CCAT/raw/master/etherlab.bundle
hg unbundle etherlab.bundle
hg update
./bootstrap
./configure --disable-8139too --enable-ccat
make
make modules
sudo make install
sudo make modules_install
The last line raises the following error, but apparently that can be ignored
testuser@ubuntu:~/ethercat-hg$ sudo make modules_install
make -C "/usr/src/linux-headers-4.4.0-31-generic" M="/home/testuser/ethercat-hg" \
INSTALL_MOD_DIR="ethercat" modules_install
make[1]: Entering directory `/usr/src/linux-headers-4.4.0-31-generic'
INSTALL /home/testuser/ethercat-hg/devices/ccat/ec_ccat.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:169
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:172
sign-file: certs/signing_key.pem: No such file or directory
INSTALL /home/testuser/ethercat-hg/devices/ec_generic.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:169
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:172
sign-file: certs/signing_key.pem: No such file or directory
INSTALL /home/testuser/ethercat-hg/examples/mini/ec_mini.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:169
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:172
sign-file: certs/signing_key.pem: No such file or directory
INSTALL /home/testuser/ethercat-hg/master/ec_master.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:169
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:172
sign-file: certs/signing_key.pem: No such file or directory
DEPMOD 4.4.0-31-generic
make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-31-generic'
Continue installation:
sudo depmod
sudo mkdir /etc/sysconfig
sudo cp /opt/etherlab/etc/sysconfig/ethercat /etc/sysconfig
sudo ln -s /opt/etherlab/etc/init.d/ethercat /etc/init.d/
Edit /etc/sysconfig/ethercat
:
#------------------------------------------------------------------------------
#
# EtherCAT master sysconfig file
#
# $Id$
#
# vim: spelllang=en spell tw=78
#
#------------------------------------------------------------------------------
MASTER0_DEVICE="00:01:05:2b:b0:35"
DEVICE_MODULES="ccat"
#------------------------------------------------------------------------------
sudo ifconfig eth0 192.168.100.164 up
sudo /etc/init.d/ethercat start
dmesg
:[ 216.979012] EtherCAT: Master driver 1.5.2 a1079c6242a5
[ 216.979117] EtherCAT: 1 master waiting for devices.
And that's where it stops. Ethercat is never able to
If I use the generic
module instead, ethercat at least recognises that there are slaves on the bus, but the initialisation doesn't complete successfully:
[ 77.947636] EtherCAT: Master driver 1.5.2 a1079c6242a5
[ 77.948481] EtherCAT: 1 master waiting for devices.
[ 77.952178] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 a1079c6242a5
[ 77.952193] EtherCAT: Accepting 00:01:05:2B:B0:35 as main device for master 0 .
[ 77.952207] ec_generic: Binding socket to interface 2 (eth0).
[ 77.961825] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 77.961865] EtherCAT 0: Link state of ecm0 changed to UP.
[ 77.965837] EtherCAT 0: 2 slave(s) responding on main device.
[ 77.965841] EtherCAT 0: Slave states on main device: INIT.
[ 77.966014] EtherCAT 0: Scanning bus.
[ 78.267722] EtherCAT WARNING 0: 1 frame CORRUPTED!
[ 78.297973] EtherCAT ERROR 0-1: Failed receive FMMU clearing datagram.
[ 78.298020] EtherCAT 0: Bus scanning completed in 332 ms.
[ 78.298022] EtherCAT 0: No DC reference clock found.
[ 78.337994] EtherCAT ERROR 0-0: Failed receive FMMU clearing datagram.
[ 78.374011] EtherCAT ERROR 0-1: Failed receive FMMU clearing datagram.
[ 78.414032] EtherCAT ERROR 0-0: Failed receive FMMU clearing datagram.
[ 78.450049] EtherCAT ERROR 0-1: Failed receive FMMU clearing datagram.
Hi,
Simple question: does CCAT works on CX52XX devices?
When I try to run "make unittest", i get a "chmod: cannot access '/dev/ccat_*': no such file or directory.
I am not sure of what it means. I get no complain at make/make install
I am trying to get my Beckhoff CX2030 with Debian Jessie running using CCAT modules. Here is my process for acquiring Etherlab and CCAT.
The problem arises when I try to unbundle the etherlab.bundle
hg clone http://hg.code.sf.net/p/etherlabmaster/code ethercat-hg
cd ethercat-hg
hg update stable-1.5
wget https://github.com/Beckhoff/CCAT/blob/master/etherlab.bundle
hg unbundle etherlab.bundle
The error I receive is:
abort: etherlab.bundle: unknown bundle version 20
Do you know what might cause this, or how to solve?
Hello,
I integrated this module to our Buildroot tree and it compiled fine. However, after running modprobe, nothing happens. I would expect an interface to be created (such as ecat, ecat0 or whatever) or at least a message in dmesg.
I am working with a CX9020 (no DMA). I tried to comment all lines except the one refering to emi in the ccat_driver structure at the top of module.c. It don't see any difference
Do you have any clues?
Have a nice day,
Vincent
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.