did anyone success install linuxcnc-ethercat on rpi4?

More
5 years 7 months ago #203668 by thang
To install linuxcnc-ethercat it requires install etherlabmaster, etherlabmaster-dev, linuxcnc-dev then linuxcnc-ethercat.
Following tutorial is written by Grotius: forum.linuxcnc.org/27-driver-boards/3559...uxcnc-how-to-install . I success to build etherlabmaster.deb and etherlabmaster-dev.deb for rpi4 but stucked when installing etherlabmaster, it return error "Error! Bad return status for module build on kernel:"
I'm using kernel linux-image-4.19.71-rt24-v7l+ for rpi 4

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

More
5 years 7 months ago - 5 years 7 months ago #203673 by Hakan
I did earlier this week. Follow these instructions, they work. I can at least switch on and off digital outputs on the EL2008.
I tried the instructions you link to and didn't succeed either.
forum.linuxcnc.org/24-hal-components/223...er?limit=6&start=882

Actually there is a step missing and that is to apply the linuxcnc-ethercat/patches/add-task-pll-functions-2.8.patch to linuxcnc-dev sources. Also, start with the rt kernel that comes from linuxcnc.
Last edit: 5 years 7 months ago by Hakan.

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

More
5 years 7 months ago #203689 by thang
I did a fresh install following your post.
1. Install linuxcnc official iso image for rpi4: www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
2. Install linux-header correspond realtime kernel
3. following ur link, i success install etherlabmaster
4. Installing linuxcnc-dev 2.8
5. Download linuxcnc-ethercat and make but i get error:
lcec_conf.h:22:10: fatal error: ecrt.h: No such file or directory
What did i miss?
The error above seem relate to etherlabmaster-dev, also the add-task-pll-functions-2.8.patch seem already be in linuxcnc 2.8

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

More
5 years 7 months ago - 5 years 7 months ago #203701 by Hakan
I just redid the compile of linuxcnc-ethercat. Here is what I did - after ". ~/linuxcnc-dev/scripts/rip-environment"
Check the include-directories "-I." etc, you may need to add them to config.mk and realtime.mk , I don't remember the details but there were some mod needed there.


Edit: Also needed to add -L/opt/etherlab/lib to the LDFLAGS line of realtime.mk for it to find libethercat.so
Last edit: 5 years 7 months ago by Hakan.

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

More
5 years 7 months ago - 5 years 7 months ago #203702 by Grotius
I repaired some stuff.

Try this.

You have to set your includepath in the /configure.mk file to point to halcompile if you use the methode below :
For example /usr/include/halcompile
That's all.

$ git clone github.com/grotius-cnc/linuxcnc-ethercat
$ cd linxucnc-ethercat
$ make
$ make install

This will also install the lcec.so in the correct linuxcnc rt dir. Etc.
Last edit: 5 years 7 months ago by Grotius.

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

More
5 years 7 months ago - 5 years 7 months ago #203751 by Hakan
@thang did you get it to work? I checked a bit more and the problem arises because etherlab is installed all under /opt/etherlab. Include files and libraries are not found in the usual places, thus one need to add paths to include files and libraries during build. Unfortunately.

After etherlab is built, an ugly fix is to create links from the common places to /opt/etherlab.
Code:
sudo ln -s /opt/etherlab/include/*.h /usr/include/linuxcnc/ sudo ln -s /opt/etherlab/lib/lib* /usr/lib/

After this, linuxcnc-ethercat build cleanly without modification. Linux with ethercat starts up without further mod as well. It is enough to use linuxcnc-uspace-dev package, it is not necessary to build linuxcnc from source.
Last edit: 5 years 7 months ago by Hakan.
The following user(s) said Thank You: virencq

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

Time to create page: 0.295 seconds
Powered by Kunena Forum