-
Notifications
You must be signed in to change notification settings - Fork 16
Setup the ECMC
Jeong Han Lee edited this page Sep 28, 2019
·
4 revisions
This page will describe a bit complicated procedure if one should not be familiar with the standard EPICS building system. However, we will show these steps with commands, which one can use them to follow up these exact steps by oneself.
- Select one network device for an ethercat master. For example, I have selected
enp4s0
as the master via
$ ip link
....
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> ...
....
- Clone it and
cd
intoetherlabmaster
$ git clone https://github.com/icshwi/etherlabmaster
$ cd etherlabmaster
- Set the master device
etherlabmaster (master)$ echo "ETHERCAT_MASTER0=enp4s0" > ethercatmaster.local
This local file will override the ETHERCAT_MASTER0
variable in scripts/ethercatmaster.conf
There are many options which one can select, but we don't test them all. Thus, we recommend to use the default one instead of customized one. Once we understand how one configure the etherlab ethercat master, one could this with various options.
- Check the default options
etherlabmaster (master) $ make showopts
Please see README.md for more detailed options.
- Do initialization : this step allows us to download the upstream etherlab master codes from https://sourceforge.net/projects/etherlabmaster/. One needs to install
m4
,mercurial
,autoconf
, and other packages.
etherlabmaster (master) $ make init
- Build & Install
etherlabmaster (master) $ make build
etherlabmaster (master) $ make install
- Build & Setup Kernel modules : Kernel modules are built via dkms. Note that the system should install the
dkms
package first.
etherlabmaster (master)$ make dkms_add
etherlabmaster (master)$ make dkms_build
etherlabmaster (master)$ make dkms_install
etherlabmaster (master)$ make setup
- Start
ethercat
system : one should start the ethercat via
etherlabmaster (master)$ sudo systemctl start ethercat
And one can check the master status as follows:
etherlabmaster (master)$ ethercat master
- Remove & Clean up all : in order to remove the ethercat userspace libraries, application, and kernel modules, and to remove all configuration for them, please run the following command.
etherlabmaster (master)$ sudo systemctl stop ethercat
etherlabmaster (master)$ sudo systemctl disable ethercat
etherlabmaster (master)$ make dkms_uninstall
etherlabmaster (master)$ make dkms_remove
etherlabmaster (master)$ make setup_clean
Note that one should use the EXACT same configuration, and its version.
- Advanced Configuration and others : for the native driver with different Linux OS, and the ethernet user patchset, and so on, please check README.md