Hello, just copying here in case someone is also looking for a way to have raspberry pi 4 rt as ethercat master.
/thk to chimeno and icshwi
tldr:
1 )
github.com/thanhtam-h/rpi4-4.19.58-rt
2 )
github.com/icshwi/etherlabmaster
# Starting from fresh 2020-02-13-raspbian-buster-full.img install
# configure language, keyboard, wifi, enable VNC
# to reproduce the full experience while listening to Billie and Finneas
#
#install subversion (svn)
sudo apt-get install subversion
# just because I forgot (it's the first thing to do)
sudo apt-get update
sudo apt-get upgrade
svn checkout
github.com/thanhtam-h/rpi4-4.19.58-rt
cd prebuilt/
chmod +x deploy.sh
./deploy.sh
***************new from
www.simplerobot.net/2019/11/raspberry-pi-4-support.html
********We need to fix Linux header before we can use it to build module native on rpi in future:
cd /usr/src/linux-headers-4.19.58-rt22-v7l+
sudo make -i modules_prepare
# the pi will reboot by itself... at the end of deploy.sh
uname -a
Linux raspberrypi 4.19.58-rt22-v7l+ #1 SMP PREEMPT RT Fri Nov 1 14:58:37 KST 2019 armv7l GNU/Linux
# install mercurial with mq extensions
sudo apt-get install mercurial
hg config --edit
#PRESS 1
#ADD under
#[extensions]
mq =
save file /home/pi/.hgrc
./get_source.sh
## new try from :https://github.com/icshwi/etherlabmaster DOES WORK!!!
#Installing on Raspbian
#Tests have been performed on:
#Raspberry-pi 4b running Raspbian version 4.19.97-v7l+ (ARM arch).
#generic driver
#works on 4.19.58-rt22-v7l+
#
#Prepare:
# Tools
$ sudo apt install -y build-essential libtool automake tree dkms
# Hg
$ sudo apt-get install mercurial
# Kernel headers are needed:
$ sudo apt install raspberrypi-kernel-headers
#Note: TSC is not available for ARM so the option "ENABLE_CYCLES=NO" is #needed.
# !!!!!!IMPORTANT TSC not availbe in ARM (Set ENABLE_CYCLES=NO)!!!!!!!
#$ echo "ENABLE_CYCLES = NO" > configure/CONFIG_OPTIONS.local
#Install etherlab master:
$ git clone
github.com/icshwi/etherlabmaster
$ cd etherlabmaster
$ make init
# !!!!!!IMPORTANT TSC not availbe in ARM (Set ENABLE_CYCLES=NO)!!!!!!!
$ echo "ENABLE_CYCLES = NO" > configure/CONFIG_OPTIONS.local
$ make build
$ make install
$ echo "ETHERCAT_MASTER0=eth0" > ethercatmaster.local
$ make dkms_add
$ make dkms_build
$ make dkms_install
$ make setup
# Reboot or start manually
$ sudo systemctl start ethercat
Next up trying to setup linuxcnc-ethercat...
So I made an xml with the beckhoffs and started the thing... (seems I end up having the same issue as others in the same thread about 1 year ago... which is somehow comforting after 4 nights of work...)
pi@raspberrypi:~/linuxcnc-dev/configs/sim/axis $ linuxcnc
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/pi/linuxcnc-dev/configs/sim/axis'
Machine configuration file is 'my_xyz.ini'
check_config: (trivkins kinematics) WARNING:
Unspecified [JOINT_0]MAX_VELOCITY, default used: 1.0
Unspecified [JOINT_0]MAX_ACCELERATION, default used: 1.0
Unspecified [JOINT_1]MAX_VELOCITY, default used: 1.0
Unspecified [JOINT_1]MAX_ACCELERATION, default used: 1.0
Unspecified [JOINT_2]MAX_VELOCITY, default used: 1.0
Unspecified [JOINT_2]MAX_ACCELERATION, default used: 1.0
Starting LinuxCNC...
emc/iotask/ioControl.cc 702: can't load tool table.
Found file(LIB): /home/pi/linuxcnc-dev/lib/hallib/basic_sim.tcl
setup_kins: cmd=loadrt trivkins coordinates=XYZ
Note: Using POSIX realtime
Found file(REL): ./postgui.hal
lcec: dlopen: /home/pi/linuxcnc-dev/rtlib/lcec.so: undefined symbol: ecrt_slave_config_sdo