栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Ethercat 移植到linux PC端

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Ethercat 移植到linux PC端

        移植到ARM开发板上一直报错,现在移植到PC端试试水。

ubuntu18.04 内核版本5.4.10-rt5

步骤:

一、源码下载编译

git clone http://gitlab.com/etherlab.org/ethercat.git
./bootstrap
    #--with-linux-dir是指定安装的linux内核目录 可以打开configure查看详细配置项
./configure --prefix=/home/fc/test/pc/ethercat/output  --enable-8139too=no --enable-generic=yes --enable-cycles --enable-hrtimer 
make
make all modules
sudo make modules_install install
sudo depmod

二、创建链接安装

sudo ln -fs /home/fc/test/pc/ethercat/output/etc/init.d/ethercat /etc/init.d
sudo mkdir /etc/sysconfig
sudo ln -fs /home/fc/test/pc/ethercat/output/etc/sysconfig/ethercat /etc/sysconfig/
sudo ln -fs /home/fc/test/pc/ethercat/output/bin/ethercat /bin/
sudo -i
echo KERNEL=="EtherCAT[0-9]*", MODE="0664" > /etc/udev/rules.d/99-EtherCAT.rules

三、网络配置

ifconfig   #查询有线网卡的MAC地址
sudo gedit /etc/sysconfig/ethercat
在其中添加MASTER0_DEVICE=”网卡地址“
        DEVICE_MODULES=”generic”

四、启动测试

sudo /etc/init.d/ethercat start|stop|restart

显示...done 成功

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/757723.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号