There are two different things that need to be installed. The IgH EtherCAT Master and sittner's EtherCAT HAL Driver.
IgH Etherlab EtherCAT Master
1. Download Etherlab Ethercat from the website
www.etherlab.org/en/ethercat/
2. Extract the tarball
Code:
tar xjf ethercat-1.5.2.tar.bz2
cd ethercat-1.5.2/
3. Run the configuration tool and build (omit the --enable-r8169 if not using the Realtek 8169 driver)
Code:
./configure --enable-r8169
make all modules
4. Become root
5. Install the software
Code:
make modules_install install
depmod
6. Install the system service
Code:
mkdir /etc/sysconfig/
cp /opt/etherlab/etc/sysconfig/ethercat /etc/sysconfig/ethercat
ln -s /opt/etherlab/etc/init.d/ethercat /etc/init.d/ethercat
7. Check HWaddr of network device
8. Edit EtherCAT master config to use the MAC address of your chosen network device
Code:
sudo nano /etc/default/ethercat
9. Add your MAC address
Code:
MASTER0_DEVICE="00:00:00:00:00:00"
10. Edit the DEVICE_MODULES line, adding the r8169 device (again, omit if not using the Realtek 8169 driver)
Code:
DEVICE_MODULES=”r8169”
11. Update Configuration
Code:
sudo update-ethercat-config
12. Give normal users read access to EtherCAT character devices
Code:
echo KERNEL==\"EtherCAT[0-9]*\", MODE=\"0664\" > /etc/udev/rules.d/99-EtherCAT.rules
13. Make the master executable
Code:
chmod +x /opt/etherlab/etc/init.d/ethercat
14. Start the master service
Code:
/etc/init.d/ethercat start
15. Operation can be observed by viewing the Syslog messages
LinuxCNC EtherCAT HAL Driver
1. Download the latest version from github
Code:
cd && git clone https://github.com/sittner/linuxcnc-ethercat.git
2. Install etherlabmaster-dev
Code:
sudo apt-get install etherlabmaster-dev
3. Open the git directory
Code:
cd linuxcnc-ethercat/src
4. Build
Code:
make
sudo make install
5. Copy the built binary to the ethercat directory
Code:
sudo cp lcec_conf /usr/bin/