Ethercat build from source instructions - Updated for 2024

  • CORBETT
  • CORBETT's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
11 Dec 2024 00:28 #316439 by CORBETT
I did this a little different because of the forum changing the format

 

This browser does not support PDFs. Please download the PDF to view it: Download PDF

Attachments:
The following user(s) said Thank You: besriworld, Aciera

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

  • CORBETT
  • CORBETT's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
11 Dec 2024 00:34 - 11 Dec 2024 01:18 #316440 by CORBETT
For the impatient, here are all the commands after installing the OS with a GUI

"The forum always changes the hyperlinks, so when you do the "git" clone commands, type out the full hyperlink"


sudo apt update
sudo apt dist-upgrade
sudo apt install linux-image-rt-amd64
sudo apt install linux-headers-rt-amd64
sudo reboot
uname -a
dpkg --list | grep linux-image
sudo apt remove --purge linux-image-(THE REST OF THE KERNEL NAME FROM GREP)
sudo apt install git build-essential
git clone github.com/LinuxCNC/linuxcnc.git   linuxcnc-dev
cd linuxcnc-dev
git checkout master
cd debian
./configure uspace no-docs  
cd ..
dpkg-checkbuilddeps  
sudo apt install  "LIST OF DEPS COPIED FROM DPKG-CHECKBUILDDEPS"
dpkg-checkbuilddeps  
cd src
./autogen.sh
./configure --with-realtime=uspace --disable-build-documentation-translation
make
sudo make setuid
. ../scripts/rip-environment
linuxcnc   (this will fail and you run the script below to get LCNC working)
~/linuxcnc-dev/lib/python/qtvcp/designer/install_script
(YOU CAN CHOOSE 1 OR 2 DEPENDING ON IF YOU WANT TO EDIT OR NOT)
cd ~
git clone gitlab.com/etherlab.org/ethercat.git ethercat-master
cd ethercat-master
git checkout stable-1.6
./bootstrap
sudo lspci -v
./configure --sysconfdir=/etc/ --disable-8139too --enable-userlib --enable-generic
make all modules
sudo su
make modules_install install
depmod
exit
ip a
sudo pico /etc/ethercat.conf
   (FIX YOUR MAC ADDRESS AND DEVICE NAME, THEN SAVE AND EXIT)
sudo systemctl enable ethercat.service
sudo systemctl start ethercat.service
sudo systemctl status ethercat.service
sudo chmod 666 /dev/EtherCAT0
ethercat master
sudo pico /etc/udev/rules.d/99-ethercat.rules
   (ADD THIS TO THE ABOVE FILE)
KERNEL=="EtherCAT[0-9]", MODE="0777"
   (THEN SAVE AND EXIT PICO)
sudo udevadm control --reload-rules
cd ..
git clone github.com/linuxcnc-ethercat/linuxcnc-ethercat.git linuxcnc-ethercat
cd linuxcnc-ethercat/src/
sudo pico Makefile
   (Now comment out part of lines.  Just add the “#” where shown below:)
   (At line 83 of the code, comment out “lcec configgen”)

user: lcec_conf lcec_devices #lcec_configgen
   (At line 92 of the code, comment out the whole line)
# cp lcec_configgen $(DESTDIR)/usr/bin/
   (At lines 113 - 121 of the code, comment out the whole line)
#lcec_configgen: configgen/*.go configgen/*/*.go
# (cd configgen ; go build lcec_configgen.go)
# cp configgen/lcec_configgen .
#configgen/devicelist: configgen/devicelist.go
# (cd configgen ; go build devicelist.go)
#configgen/drivers/drivers.go: configgen/devicelist lcec_devices
# (cd configgen ; go generate)
   (THEN SAVE AND EXIT)
cd ..
make clean
make
make install
sudo pico /etc/ld.so.conf
   (ADD THIS TO THE ABOVE “ld.so.conf” FILE)
/usr/local/lib
   (THEN SAVE AND EXIT PICO)
sudo su
ldconfig -v
exit

Then you setup your XML and LCNC config and that's it...
Last edit: 11 Dec 2024 01:18 by CORBETT.
The following user(s) said Thank You: tommylight, rodw, besriworld, endian

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

Time to create page: 0.070 seconds
Powered by Kunena Forum