[Home]Mesa7i80 Driver For Linuxcnc On Xenomai

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Difference (from prior major revision) (no other diffs)

Changed: 1,109c1

Installing the beta version of Hostmot2 driver for 7i80 board




!! At this point tested only on realtek 8139 ethernet card, but should work the same with other support cards.
Tests on other support cards will be soon.

Supported boards by RTnet:
Intel 8255x EtherExpress? Pro100
Intel PRO/1000 (Gigabit Ethernet)
DEC 21x4x Tulip
RealTek? RTL8139
RealTek? RTL8169 (Gigabit Ethernet)
AMD PCnet32/PCnetPCI?
VIA Rhine
NatSemi? DP8381x
MPC8xx (SCC and FEC Ethernet)
MPC8260 (FCC Ethernet)
MPC5200
SMSC LAN91C111

Required steps




* installing the Xenomai realtime operating system
* installing rtnet from source
* fetching and compiling linuxcnc

installing the Xenomai realtime operating system




Follow instructions on XenomaiKernelPackages to install Xenomai realtime kernel

As of 07/01/2013 to build rtnet the kernel headers need to be installed

$ sudo apt-get install linux-headers-3.5.7-xenomai-2.6.2.1

and a symlink pointing to them in a 'build' directory

$ sudo ln -s /usr/src/linux-headers-3.5.7-xenomai-2.6.2.1/ /lib/modules/3.5.7-xenomai-2.6.2.1/build

installing rtnet from source




Download Rtnet source from git repository
$ git clone git://rtnet.git.sourceforge.net/gitroot/rtnet/rtnet rtnet-0.9.13
$ cd rtnet-0.9.13

Ncurses was also needed for the menuconfig (at least on 12.04)

$ sudo apt-get install libncurses5-dev

Configure:
$ make menuconfig

Make sure of this config changes
--- Real-Time Extension ---> Variant (Xenomai 2.1 or better)
--- RTnet Parameters ---> (/usr/rtnet) Installation Path of RTnet

The hm2_eth driver assumes /usr/rtnet as installation path - adjust accordingly in the above menu.

$ make
$ sudo make install

fetching and compiling linuxcnc




get source
$ git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-rtnet
$ cd linuxcnc-rtnet

switch to linuxcnc under xenomai development branch
$ git branch --track rtos-master-v0 origin/rtos-master-v0
$ git checkout rtos-master-v0

for 12.04 I needed these dependencies
$ sudo apt-get install build-essential autoconf libpth-dev libglib2.0-dev libgtk2.0-dev tcl-dev tk-dev bwidget libreadline-dev python-tk python-dev libgl1-mesa-dev libglu1-mesa-dev libxmu-dev libudev-dev libmodbus-dev libboost-python-dev libboost-serialization-dev libboost-thread-dev

If apt-get cannot find libmodbus-dev and you don't need modbus, use the option --with-libmodbus=no when you run ./configure below

patch it with upload: upload:hm2_7i80_support_on_rtos_merged_to_master.patch

$ patch -p1 < hm2_7i80_support_on_rtos_merged_to_master.patch

compile it
$ cd src
$ ./autogen.sh
$ ./configure
$ make

edit linuxcnc-rtnet/scripts/start_net.sh
--- on line 5 enter the rtnet module for the interface you are using for rtnet
--- on line 7 enter IP address which your rteth0 interface will have
--- on line 10 enter IP of your 7i80 board

<comment - andypugh> I am not sure what the two different IP addresses are, but a 7i80 with W1 and W2 both down wants to be 192.168.1.121
To choose the driver module I looked in my modules list ( lsmod ) and found what my current, normal, ethernet driver was (e1000e in my case) and then chose the matching rtnet module (rt_e1000e)

edit linuxcnc-rtnet/scripts/stop_net.sh
--- on line 5 enter the rtnet module for the interface you are using for rtnet

loading driver



Before run unload ethernet driver for board you will use with rtnet.
If you have RealTek? RTL8139 board you must use command:
$ sudo rmmod 8139too
If you have Intel 8255x EtherExpress? Pro100 board you must use command:
$ sudo rmmod e100

When you will load linuxcnc it will ask for root password
Make sure that board ip address on start_net.sh will be the same as ip in loadrt line

loadrt hostmot2
loadrt hm2_eth ip="192.168.0.2" config="num_encoders=0 num_pwmgens=0 num_stepgens=0"

Rest of loading/operation is the same as with hm2_pci driver
The driver for Mesa ethernet cards in LinuxCNC 2.7 works with uspace realtime and regular linux kernel drivers (though not all network chipsets give acceptable performance). For current documentation, see http://linuxcnc.org/docs/2.7/html/man/man9/hm2_eth.9.html

The driver for Mesa ethernet cards in LinuxCNC 2.7 works with uspace realtime and regular linux kernel drivers (though not all network chipsets give acceptable performance). For current documentation, see http://linuxcnc.org/docs/2.7/html/man/man9/hm2_eth.9.html

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited March 2, 2016 1:09 pm by JeffEpler (diff)
Search:
Published under a Creative Commons License