瑞萨RZ/G2L开发板在工控领域的应用-基于SOEM的EtherCAT主站
2023-07-27
767
来源:米尔电子
本篇测评由优秀测评者“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-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. 产品升级与性能提升米尔
2024-10-31
4K视频为何越来越糊?SGMII与HEVC如何重拾高码流体验
1.引言随着网络视频平台的发展,用户对于4K高清画质的需求日益增长。然而,许多用户发现,即使购买了视频平台的会员,观看4K内容时画质却不如预期,有时甚至还会出现模糊、卡顿的情况。这种现象背后涉及到视频编码、网络带宽、和视频传输的诸多因素。近期“影视飓风”发布的视频《清晰度不如4年前!视频变糊是你的错觉吗?》因讨论视频平台降低码率和改变编码格式以压缩视频画质,影响了内容表达。4K视频清晰度下降的一个
2024-10-24
新品!米尔RK3576核心板8核6T高算力,革新AIoT设备
随着科技的快速发展,AIoT智能终端对嵌入式模块的末端计算能力、数据处理能力等要求日益提高。近日,米尔电子发布了一款基于瑞芯微RK3576核心板和开发板。核心板提供4GB/8GB LPDDR4X、32GB/64GB eMMC等多个型号供选择。瑞芯微RK3576核心优势主要包括高性能数据处理能力、领先的AI智能分析、多样化的显示与操作体验以及强大的扩展性与兼容性。下面详细介绍这款核心板的优势。6T
2024-10-24
TI研讨会正在进行中,米尔诚邀您参与
让嵌入式的未来成为可能!10月22日,2024德州仪器嵌入式技术创新发展研讨会如约而至!探讨 TI 嵌入式新产品和应用方案。这里有全面的 TI 嵌入式处理器产品组合、热门的无线连接、微控制器、处理器技术以及毫米波传感器解决方案、前沿的系统解决方案、新一代产品介绍以及方便易用的平台及工具,满足您各类设计需求,助力每个项目的快速上市!米尔作为领先的嵌入式处理器模组厂商,出席了此次会议,米尔电子在现场展