Ethercat installation from repositories - how to step by step

More
22 Nov 2022 22:38 #257390 by rodw
Your question is way off topic for this thread.
Please raise a seperate thread so this one is not cliuttered up with irrellevant posts.

Please Log in or Create an account to join the conversation.

More
24 Nov 2022 19:06 #257571 by endian
I know, I am sorry for mismatching but I can not find any relevan source of .xml syntax. Can you recommend me anything if you have better overview please? Do you thing it is good idea to create new topic only for this reason?

Regards Foxington

Please Log in or Create an account to join the conversation.

More
24 Nov 2022 19:35 #257575 by db1981
maybe some mod can move this later..

<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>

dcconf is per slave and has to be in correspondening <slave> description.

assignActivate statement tells the master the dcmode of the slave, this has to be found in the slave's manual.

sync0Cycle = *1 or *2 = x times from apptime period (ethercat cycle) , an number without * gives an custom cycle time.
The following user(s) said Thank You: endian

Please Log in or Create an account to join the conversation.

More
16 Dec 2022 16:28 - 16 Dec 2022 17:21 #259651 by nartburg
As of 16.Dec 2022

sudo apt update

yields

Not found : download.opensuse.org/repositories/home:...:/EtherLab/Debian_10 ./Packages 404 Not found [IP: 195.135.221.134 443]

can anyone confirm or knows a different source before I start my own build?

Some hicup with the Pubkey caused this

Martin
Last edit: 16 Dec 2022 17:21 by nartburg. Reason: clarification and solution

Please Log in or Create an account to join the conversation.

More
16 Dec 2022 20:51 #259674 by rodw
Please try again and check the detail carefully. I think you have a malformed URL somewhere
Share your errors in side CODE statements so we can see the raw output. I thought there is a space that should not be there.
NOthing has changed I can see.
The repo is there. 

Please Log in or Create an account to join the conversation.

More
26 Dec 2022 11:45 #260315 by cncLab
Hello rodw

I try to install EtherCat driver as per your instructions. Everything is going fine up to the point

cd ~/dev/linuxcnc-ethercat
make clean
sudo make install <
cd ..

I get error : configure.mk:32: *** Unable to get modinc path. Stop.
Looking at configure.mk file it seems that in my system the command COMP is missing (?)

do you have any idea what is missing here?
My system in high level consists of :
Debian 11 Bullseye
with
Linux debian 5.10.0-20-rt-amd64 #1 SMP PREEMPT_RT Debian 5.10.158-2 (2022-12-13) x86_64 GNU/Linux
Thanks in advance

Please Log in or Create an account to join the conversation.

More
26 Dec 2022 11:55 #260317 by rodw
I think you need to open the spoiler and replace the contents of realtime.mk with the contents in the spoiler.
This was part of the standard instructions until I found it caused issues more recently on Bookworm.
But I definitely had to do it in Bullseye.

Please Log in or Create an account to join the conversation.

More
26 Dec 2022 13:05 #260323 by cncLab
Hello Rod, thanks for your reply...

I did as you suggest (replace the contents of src/realtime.mk with the spoiler content) with the same result as realtime.mk includes ../config.mk) first line

Still the command (?) COMP does not exist in the system

config.mk -> line 30 MODINC=$(shell $(COMP) --print-modinc)
or
config.mk -> line 5 COMP = $(shell which comp)

find / -name COMP returns nothing and related search in the net does not seem to indicate any findings

Can you please think of what can be the problem here ?
Thanks in advance

Please Log in or Create an account to join the conversation.

More
15 Jan 2023 11:05 - 15 Jan 2023 11:26 #262031 by BaxEDM
Hi Rod,

I followed your installation steps but get stuck early on in the process. I do not know how to resolve. Here's the relevant last part of the terminal output were errors started appearing:

pi@raspberrypi:/tmp $ sudo apt-get install ethercat-dkms libethercat libethercat-dev ethercat-master git
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.20.1-2+deb10u6).
The following NEW packages will be installed:
dkms ethercat-dkms ethercat-master libethercat libethercat-dev
raspberrypi-kernel-headers
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.6 MB of archives.
After this operation, 130 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
ethercat-dkms libethercat ethercat-master libethercat-dev
Install these packages without verification? [y/N] y
Get:1 deb.debian.org/debian buster/main arm64 dkms all 2.6.1-4 [74.4 kB]
Get:2 archive.raspberrypi.org/debian buster/main arm64 raspberrypi-kernel-headers arm64 1:1.20220308~buster-1 [9,348 kB]
Get:3 download.opensuse.org/repositories/home:...:/EtherLab/Debian_10 ./ ethercat-dkms 1.6.0-3 [1,066 kB]
Get:4 download.opensuse.org/repositories/home:...:/EtherLab/Debian_10 ./ libethercat 1.6.0-3 [20.9 kB]
Get:5 download.opensuse.org/repositories/home:...:/EtherLab/Debian_10 ./ ethercat-master 1.6.0-3 [115 kB]
Get:6 download.opensuse.org/repositories/home:...:/EtherLab/Debian_10 ./ libethercat-dev 1.6.0-3 [19.2 kB]
Fetched 10.6 MB in 9s (1,204 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 114135 files and directories currently installed.)
Preparing to unpack .../0-dkms_2.6.1-4_all.deb ...
Unpacking dkms (2.6.1-4) ...
Selecting previously unselected package ethercat-dkms.
Preparing to unpack .../1-ethercat-dkms_1.6.0-3_all.deb ...
Unpacking ethercat-dkms (1.6.0-3) ...
Selecting previously unselected package libethercat.
Preparing to unpack .../2-libethercat_1.6.0-3_arm64.deb ...
Unpacking libethercat (1.6.0-3) ...
Selecting previously unselected package ethercat-master.
Preparing to unpack .../3-ethercat-master_1.6.0-3_arm64.deb ...
Unpacking ethercat-master (1.6.0-3) ...
Selecting previously unselected package libethercat-dev.
Preparing to unpack .../4-libethercat-dev_1.6.0-3_arm64.deb ...
Unpacking libethercat-dev (1.6.0-3) ...
Selecting previously unselected package raspberrypi-kernel-headers.
Preparing to unpack .../5-raspberrypi-kernel-headers_1%3a1.20220308~buster-1_arm64.deb ...
Unpacking raspberrypi-kernel-headers (1:1.20220308~buster-1) ...
Setting up dkms (2.6.1-4) ...
Setting up raspberrypi-kernel-headers (1:1.20220308~buster-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103-v7+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103-v7l+
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.10.103-v8+
Setting up ethercat-dkms (1.6.0-3) ...
Loading new ethercat-dkms-1.6.0 DKMS files...
Building for 5.15.65-rt49-v8+
Building initial module for 5.15.65-rt49-v8+
Error! Bad return status for module build on kernel: 5.15.65-rt49-v8+ (aarch64)
Consult /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log for more information.
Adding Module to DKMS build system
Error! DKMS tree already contains: ethercat-dkms-1.6.0
You cannot add the same module/version combo more than once.
Doing initial module build
Error! Bad return status for module build on kernel: 5.15.65-rt49-v8+ (aarch64)
Consult /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log for more information.
Installing initial module
Error! Bad return status for module build on kernel: 5.15.65-rt49-v8+ (aarch64)
Consult /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log for more information.
Done.
Setting up libethercat (1.6.0-3) ...
Setting up libethercat-dev (1.6.0-3) ...
Setting up ethercat-master (1.6.0-3) ...
ethercat.service is a disabled or a static unit, not starting it.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1+deb10u1) ...
pi@raspberrypi:/tmp $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether e4:5f:01:f4:67:ed brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether e4:5f:01:f4:67:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.2.17/24 brd 192.168.2.255 scope global dynamic noprefixroute wlan0
valid_lft 85747sec preferred_lft 74947sec
inet6 2a02:a456:e14f:1:bb76:52be:fe2c:1eef/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 252660sec preferred_lft 166260sec
inet6 fe80::d84e:d142:7a9:91bc/64 scope link
valid_lft forever preferred_lft forever
pi@raspberrypi:/tmp $ sudo geany /etc/ethercat.conf
pi@raspberrypi:/tmp $ sudo systemctl enable ethercat.service
Created symlink /etc/systemd/system/multi-user.target.wants/ethercat.service → /lib/systemd/system/ethercat.service.
pi@raspberrypi:/tmp $ sudo systemctl start ethercat.service
Job for ethercat.service failed because the control process exited with error code.
See "systemctl status ethercat.service" and "journalctl -xe" for details.
pi@raspberrypi:/tmp $


Here is the contents of /var/lib/dkms/ethercat-dkms/1.6.0/build/make.log

DKMS make.log for ethercat-dkms-1.6.0 for kernel 5.15.65-rt49-v8+ (aarch64)
Sun 15 Jan 2023 11:15:57 AM CET
make: Entering directory '/usr/src/linux-headers-5.15.65-rt49-v8+'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: aarch64-linux-gnu-gcc (GCC) 8.4.0
  You are using:           gcc (Debian 8.3.0-6) 8.3.0
  CC [M]  /var/lib/dkms/ethercat-dkms/1.6.0/build/examples/mini/mini.o
Assembler messages:
Error: unknown architecture `armv8.5-a'

Error: unrecognized option -march=armv8.5-a
make[3]: *** [scripts/Makefile.build:289: /var/lib/dkms/ethercat-dkms/1.6.0/build/examples/mini/mini.o] Error 1
make[2]: *** [scripts/Makefile.build:552: /var/lib/dkms/ethercat-dkms/1.6.0/build/examples/mini] Error 2
make[1]: *** [scripts/Makefile.build:552: /var/lib/dkms/ethercat-dkms/1.6.0/build/examples] Error 2
make: *** [Makefile:1896: /var/lib/dkms/ethercat-dkms/1.6.0/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.65-rt49-v8+'
Last edit: 15 Jan 2023 11:26 by BaxEDM. Reason: added the contents of make.log

Please Log in or Create an account to join the conversation.

More
15 Jan 2023 11:45 #262033 by rodw
It seems a bit odd.
You are running kernel 5.15 yet buster was only kernel 4.9
I can not see that you installed the linux_headers for the 5,15 kernel before trying to install ethercat?
My guess is the linux-headers are wrong for your kernel.
this does not look right and seems out of order: raspberrypi-kernel-headers
you must be installing ethercat for the kernel you run and seems to easilly get confused hence using $(uname -r)


what does lsb_release -a say

Please Log in or Create an account to join the conversation.

Time to create page: 0.120 seconds
Powered by Kunena Forum