瑞萨RZ/G2L开发板在工控领域的应用-基于SOEM的EtherCAT主站
2023-07-27
806
来源:米尔电子
本篇测评由优秀测评者“qinyunti”提供。
前言
本文介绍【米尔MYD-YG2LX开发板】在工控领域的应用,实现基于SOEM的EtherCAT主站。开发环境基于WSL2。
下载代码
PC端
编译
cmake ..
lhj@lhj:~/SOEM/build_pc$ cmake .. -- The C compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- OS is linux -- LIB_DIR: lib -- Configuring done -- Generating done -- Build files have been written to: /home/lhj/SOEM/build_pc lhj@lhj:~/SOEM/build_pc$
make
lhj@lhj:~/SOEM/build_pc$ make Scanning dependencies of target soem [ 4%] Building C object CMakeFiles/soem.dir/soem/ethercatbase.c.o [ 9%] Building C object CMakeFiles/soem.dir/soem/ethercatcoe.c.o [ 14%] Building C object CMakeFiles/soem.dir/soem/ethercatconfig.c.o [ 19%] Building C object CMakeFiles/soem.dir/soem/ethercatdc.c.o [ 23%] Building C object CMakeFiles/soem.dir/soem/ethercateoe.c.o [ 28%] Building C object CMakeFiles/soem.dir/soem/ethercatfoe.c.o [ 33%] Building C object CMakeFiles/soem.dir/soem/ethercatmain.c.o [ 38%] Building C object CMakeFiles/soem.dir/soem/ethercatprint.c.o [ 42%] Building C object CMakeFiles/soem.dir/soem/ethercatsoe.c.o [ 47%] Building C object CMakeFiles/soem.dir/osal/linux/osal.c.o [ 52%] Building C object CMakeFiles/soem.dir/oshw/linux/nicdrv.c.o [ 57%] Building C object CMakeFiles/soem.dir/oshw/linux/oshw.c.o [ 61%] Linking C static library libsoem.a [ 61%] Built target soem Scanning dependencies of target simple_ng [ 66%] Building C object test/simple_ng/CMakeFiles/simple_ng.dir/simple_ng.c.o [ 71%] Linking C executable simple_ng [ 71%] Built target simple_ng Scanning dependencies of target slaveinfo [ 76%] Building C object test/linux/slaveinfo/CMakeFiles/slaveinfo.dir/slaveinfo.c.o [ 80%] Linking C executable slaveinfo [ 80%] Built target slaveinfo Scanning dependencies of target eepromtool [ 85%] Building C object test/linux/eepromtool/CMakeFiles/eepromtool.dir/eepromtool.c.o [ 90%] Linking C executable eepromtool [ 90%] Built target eepromtool Scanning dependencies of target simple_test [ 95%] Building C object test/linux/simple_test/CMakeFiles/simple_test.dir/simple_test.c.o [100%] Linking C executable simple_test [100%] Built target simple_test lhj@lhj:~/SOEM/build_pc$
simple_test,slaveinfo,eepromtool为测试Demo。
lhj@lhj:~/SOEM/build_pc$ tree . . |-- CMakeCache.txt |-- CMakeFiles | |-- 3.16.3 | | |-- CMakeCCompiler.cmake | | |-- CMakeDetermineCompilerABI_C.bin | | |-- CMakeSystem.cmake | | `-- CompilerIdC | | |-- CMakeCCompilerId.c | | |-- a.out | | `-- tmp | |-- CMakeDirectoryInformation.cmake | |-- CMakeOutput.log | |-- CMakeTmp | |-- Export | | `-- share | | `-- soem | | `-- cmake | | |-- soemConfig-noconfig.cmake | | `-- soemConfig.cmake | |-- Makefile.cmake | |-- Makefile2 | |-- TargetDirectories.txt | |-- cmake.check_cache | |-- progress.marks | `-- soem.dir | |-- C.includecache | |-- DependInfo.cmake | |-- build.make | |-- cmake_clean.cmake | |-- cmake_clean_target.cmake | |-- depend.internal | |-- depend.make | |-- flags.make | |-- link.txt | |-- osal | | `-- linux | | `-- osal.c.o | |-- oshw | | `-- linux | | |-- nicdrv.c.o | | `-- oshw.c.o | |-- progress.make | `-- soem | |-- ethercatbase.c.o | |-- ethercatcoe.c.o | |-- ethercatconfig.c.o | |-- ethercatdc.c.o | |-- ethercateoe.c.o | |-- ethercatfoe.c.o | |-- ethercatmain.c.o | |-- ethercatprint.c.o | `-- ethercatsoe.c.o |-- Makefile |-- cmake_install.cmake |-- libsoem.a `-- test |-- linux | |-- eepromtool | | |-- CMakeFiles | | | |-- CMakeDirectoryInformation.cmake | | | |-- eepromtool.dir | | | | |-- C.includecache | | | | |-- DependInfo.cmake | | | | |-- build.make | | | | |-- cmake_clean.cmake | | | | |-- depend.internal | | | | |-- depend.make | | | | |-- eepromtool.c.o | | | | |-- flags.make | | | | |-- link.txt | | | | `-- progress.make | | | `-- progress.marks | | |-- Makefile | | |-- cmake_install.cmake | | `-- eepromtool | |-- simple_test | | |-- CMakeFiles | | | |-- CMakeDirectoryInformation.cmake | | | |-- progress.marks | | | `-- simple_test.dir | | | |-- C.includecache | | | |-- DependInfo.cmake | | | |-- build.make | | | |-- cmake_clean.cmake | | | |-- depend.internal | | | |-- depend.make | | | |-- flags.make | | | |-- link.txt | | | |-- progress.make | | | `-- simple_test.c.o | | |-- Makefile | | |-- cmake_install.cmake | | `-- simple_test | `-- slaveinfo | |-- CMakeFiles | | |-- CMakeDirectoryInformation.cmake | | |-- progress.marks | | `-- slaveinfo.dir | | |-- C.includecache | | |-- DependInfo.cmake | | |-- build.make | | |-- cmake_clean.cmake | | |-- depend.internal | | |-- depend.make | | |-- flags.make | | |-- link.txt | | |-- progress.make | | `-- slaveinfo.c.o | |-- Makefile | |-- cmake_install.cmake | `-- slaveinfo `-- simple_ng |-- CMakeFiles | |-- CMakeDirectoryInformation.cmake | |-- progress.marks | `-- simple_ng.dir | |-- C.includecache | |-- DependInfo.cmake | |-- build.make | |-- cmake_clean.cmake | |-- depend.internal | |-- depend.make | |-- flags.make | |-- link.txt | |-- progress.make | `-- simple_ng.c.o |-- Makefile |-- cmake_install.cmake `-- simple_ng 29 directories, 100 files lhj@lhj:~/SOEM/build_pc$
编译
cmake ..
lhj@lhj:~/SOEM/build$ cmake .. -- The C compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc -- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- OS is linux -- LIB_DIR: lib -- Configuring done -- Generating done -- Build files have been written to: /home/lhj/SOEM/build lhj@lhj:~/SOEM/build$
make
lhj@lhj:~/SOEM/build$ make Scanning dependencies of target soem [ 4%] Building C object CMakeFiles/soem.dir/soem/ethercatbase.c.o [ 9%] Building C object CMakeFiles/soem.dir/soem/ethercatcoe.c.o [ 14%] Building C object CMakeFiles/soem.dir/soem/ethercatconfig.c.o [ 19%] Building C object CMakeFiles/soem.dir/soem/ethercatdc.c.o [ 23%] Building C object CMakeFiles/soem.dir/soem/ethercateoe.c.o [ 28%] Building C object CMakeFiles/soem.dir/soem/ethercatfoe.c.o [ 33%] Building C object CMakeFiles/soem.dir/soem/ethercatmain.c.o [ 38%] Building C object CMakeFiles/soem.dir/soem/ethercatprint.c.o [ 42%] Building C object CMakeFiles/soem.dir/soem/ethercatsoe.c.o [ 47%] Building C object CMakeFiles/soem.dir/osal/linux/osal.c.o [ 52%] Building C object CMakeFiles/soem.dir/oshw/linux/nicdrv.c.o [ 57%] Building C object CMakeFiles/soem.dir/oshw/linux/oshw.c.o [ 61%] Linking C static library libsoem.a [ 61%] Built target soem Scanning dependencies of target simple_ng [ 66%] Building C object test/simple_ng/CMakeFiles/simple_ng.dir/simple_ng.c.o [ 71%] Linking C executable simple_ng [ 71%] Built target simple_ng Scanning dependencies of target slaveinfo [ 76%] Building C object test/linux/slaveinfo/CMakeFiles/slaveinfo.dir/slaveinfo.c.o [ 80%] Linking C executable slaveinfo [ 80%] Built target slaveinfo Scanning dependencies of target eepromtool [ 85%] Building C object test/linux/eepromtool/CMakeFiles/eepromtool.dir/eepromtool.c.o [ 90%] Linking C executable eepromtool [ 90%] Built target eepromtool Scanning dependencies of target simple_test [ 95%] Building C object test/linux/simple_test/CMakeFiles/simple_test.dir/simple_test.c.o [100%] Linking C executable simple_test [100%] Built target simple_test lhj@lhj:~/SOEM/build$
root@myir-yg2lx:~# ./slaveinfo eth0 SOEM (Simple Open EtherCAT Master) Slaveinfo Starting slaveinfo ec_init on eth0 succeeded. No slaves found! End slaveinfo, close socket End program
root@myir-yg2lx:~# ./simple_test eth0 SOEM (Simple Open EtherCAT Master) Simple test Starting simple test ec_init on eth0 succeeded. No slaves found! End simple test, close socket End program root@myir-yg2lx:~#
2024-11-28
FacenetPytorch人脸识别方案--基于米尔全志T527开发板
本篇测评由电子工程世界的优秀测评者“小火苗”提供。本文将介绍基于米尔电子MYD-LT527开发板(米尔基于全志T527开发板)的FacenetPytorch人脸识别方案测试。一、facenet_pytorch算法实现人脸识别深度神经网络1.简介Facenet-PyTorch 是一个基于 PyTorch 框架实现的人脸识别库。它提供了FaceNet模型的 PyTorch 实现,可以用于训练自己的人脸
2024-11-28
米尔出席openEuler Summit 2024,携全志T536和RK3562核心模组亮相
汇聚行业智慧,促进技术共享。2024年11月15日-16日,openEuler Summit 2024在北京中关村国际创新中心圆满落幕。本次大会由开放原子开源基金会(以下简称“基金会”)孵化及运营的openEuler社区协同产业伙伴共同主办,以“以智能,致世界”为主题,旨在汇聚全球产业界力量,推动基础软件根技术持续创新,共建全球开源新生态。米尔电子作为领先的嵌入式处理器模组厂商出席了此次活动,并发
2024-11-28
礼品丰厚,米尔将亮相2024瑞萨技术交流会议
工业自动化技术包罗万象,近年来国内“智慧工厂”浪潮不断推高PLC、伺服、数字电源、逆变器、EtherCAT、Profinet、功能安全、HMI等需求。掌握和精通一门颇具前景的前沿技术是嵌入式工程师职业进阶的不二法门,也是企业赢得市场竞争的关键。如果你是这些热门技术/话题的爱好者、项目开发者或专家,那么下面这场干货满满、礼品丰厚的年度工业技术盛会你绝对不容错过!以“智慧控制·绿色可持续”为主题,瑞萨
2024-11-21
后摩尔时代的创新:在米尔FPGA上实现Tiny YOLO V4,助力AIoT应用
学习如何在 MYIR 的 ZU3EG FPGA 开发板上部署 Tiny YOLO v4,对比 FPGA、GPU、CPU 的性能,助力 AIoT 边缘计算应用。(文末有彩蛋)一、为什么选择 FPGA:应对 7nm 制程与 AI 限制在全球半导体制程限制和高端GPU 受限的大环境下,FPGA 成为了中国企业发展的重要路径之一。它可支持灵活的AIoT 应用,其灵活性与可编程性使其可以在国内成熟的 28n
2024-11-21
追加名额丨米尔瑞芯微RK3576开发板有奖试用
米尔与瑞芯微合作发布的新品基于瑞芯微RK3576应用处理器的MYD-LR3576开发板免费试用活动加码啦~~米尔追加了2块价值849元的MYD-LR3576开发板发起试用活动您不仅可以免费体验还可以获得京东购物卡赶快点击链接报名吧~↓↓↓评测活动报名链接:EEWORLD电子工程世界:https://bbs.eeworld.com.cn/elecplay.php?action=show&op
2024-11-12
米尔RK3576开发板双十一特惠活动!
近日,米尔电子发布基于瑞芯微RK3576核心板和开发板,RK3576作为国产热门处理器,其高性能数据处理能力、领先的AI智能分析、强大的扩展性与兼容性受到广大开发者的关注。此次,米尔推出RK3576开发板特价活动,价格699元起,限量抢购。点击链接购买:https://detail.tmall.com/item.htm?id=8461721608876 TOPS超强算力,8核CPU赋能AI瑞芯微R
2024-11-12
有奖丨米尔 瑞芯微RK3576开发板免费试用
米尔与瑞芯微合作发布的新品基于瑞芯微RK3576应用处理器的MYD-LR3576开发板免费试用活动来啦~~米尔提供了7块价值849元的MYD-LR3576开发板发起试用活动您不仅可以免费体验还可以获得京东购物卡赶快点击链接报名吧~↓↓↓评测活动报名链接:面包板:https://mbb.eet-china.com/evaluating/product-193.html#report试用活动信息报名时
2024-11-07
配置上新!米尔-新唐MA35D1核心板512M DDR配置发布!
米尔在2024年8月推出了基于新唐MA35D1芯片设计的嵌入式处理器模块MYC-LMA35核心板及开发板。MA35D1是集成2个Cortex-A35与1个Cortex-M4的异构微处理器芯片。核心板采用创新LGA 252PIN设计,原生17路UART和4路CAN FD等丰富的通讯接口,可广泛应用于新能源充电桩、工程机械控制器、OBD汽车诊断仪、工业网关、运动控制器和电力DTU等场景。配置上新,容量
2024-11-07
基于OpenCV的相机捕捉视频进行人脸检测--米尔NXP i.MX93开发板
本篇测评由与非网的优秀测评者“eefocus_3914144”提供。本文将介绍基于米尔电子MYD-LMX93开发板(米尔基于NXP i.MX93开发板)的基于OpenCV的人脸检测方案测试。OpenCV提供了一个非常简单的接口,用于相机捕捉一个视频(我用的电脑内置摄像头)1、安装python3-opencvaptinstallpython3-opencv2、查看摄像头支持的格式与分辨率root@d
2024-10-31
低至5折!感恩相伴,助力产品长跑,米尔FPGA开发板大减价
文末有礼米尔电子作为行业领先的解决方案供应商,致力于打造高可靠性、长生命周期的FPGA SOM(System on Module)产品,满足工业、汽车、医疗,电力等严苛应用领域的需求。米尔设计开发硬件平台,接口驱动等底层软件作为中间件,客户仅需关注自身业务与行业应用层软件开发,极大减少设计难度,加快了上市周期。支持开发板样件,POC,量产定制,灵活满足客户不同阶段需求。1. 产品升级与性能提升米尔