瑞萨RZ/G2L开发板在工控领域的应用-基于SOEM的EtherCAT主站
2023-07-27
745
来源:米尔电子
本篇测评由优秀测评者“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-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 嵌入式处理器产品组合、热门的无线连接、微控制器、处理器技术以及毫米波传感器解决方案、前沿的系统解决方案、新一代产品介绍以及方便易用的平台及工具,满足您各类设计需求,助力每个项目的快速上市!米尔作为领先的嵌入式处理器模组厂商,出席了此次会议,米尔电子在现场展
2024-10-16
米尔T527系列核心板,高性能车载视频监控、部标一体机方案
在国内对于特种车辆有重点安全防范要求,"两客一危"是对道路运输车辆的一种分类方式,其中“两客”指的是客运车辆和公交车辆,而“一危”指的是危险货物运输车辆。这种分类方式主要用于强调这些车辆在道路运输中的特殊地位,因为它们通常需要满足更高的安全标准。在国内,“两客一危"车辆通常需要安装"部标机”,也就是满足特定部门标准的设备。这些设备可能包括但不限于定位设备、驾
2024-10-16
米尔NXP i.MX 93核心板亮相2024恩智浦工业和物联网技术峰会
2024年10月11日(周五),恩智浦在北京举办“恩智浦工业和物联网技术峰会”,洞见技术发展趋势,共促未来市场发展!本次技术峰会将聚焦前沿性的赋能技术,覆盖智能工业、智能家居、医疗保健等热门应用。活动现场,深圳市米尔电子有限公司作为恩智浦的金牌合作伙伴出席了此次峰会,并携带最新产品米尔基于NXP i.MX 93核心板及开发板亮相。该核心板凭借高性能处理器、集成NPU、丰富的接口类型以及小巧的尺寸等
2024-10-11
原生17路UART和4路CAN FD,解锁新唐MA35D1多种应用场景
米尔电子发布了基于新唐MA35D1处理器设计的MYC-LMA35核心板,MA35D1处理器集成了双核Cortex-A35和Cortex-M4,原生17路UART和4路CAN FD接口,可实现多种设备的高效互联并满足通信需求,此外,MYC-LMA35核心板还提供了丰富的外设资源:RGMII/USB/SDIO/I2S/I2C/EADC/EPWM/SPI等,丰富的外设资源使得MYC-LMA35核心板能够
2024-10-11
10/14 Demo秀,米尔边缘盒子将亮相2024慕尼黑华南电子展
2024年10月14-16日,四方维Supplyframe将在慕尼黑华南电子展会上,举办demo演示交流会。米尔电子将携带新品MYD-LR3576开发板与创客进行面对面交流,展示【6Tops边缘计算盒子方案】。MYD-LR3576-B边缘计算盒是米尔电子基于高性能AI应用芯片RK3576打造的一款人工智能技术的智能设备。集成了瑞芯微RK3576处理器,内置6Tops高效AI加速NPU,配备大容量、