【米尔MYD-YG2LX开发板】在工控领域的应用-在PLC上的应用
<div class='showpostmsg'><h1><b>前言</b></h1><p >本文介绍基于【米尔MYD-YG2LX开发板】在工控领域的应用</p>
<p >,在PLC领域的应用。开发环境基于WSL2. 使用<b>Beremiz。</b></p>
<h1 ><b>Beremiz</b></h1>
<h2 ><b>官网</b></h2>
<p ><a href="https://beremiz.org/"><u>https://beremiz.org/</u></a></p>
<p > </p>
<h2 ><b>下载</b></h2>
<p ><a href="https://github.com/beremiz/beremiz/releases"><u>https://github.com/beremiz/beremiz/releases</u></a></p>
<p > </p>
<p > </p>
<p >如果下载不稳定经常断,可以使用wget下载</p>
<p >wget https://github.com/beremiz/beremiz/releases/download/1.3-beta.22.05.26/Beremiz-22.05.26.exe</p>
<p >下载到文件为Beremiz-22.05.26.exe</p>
<h2 ><b>安装</b></h2>
<p >双击打开Beremiz-22.05.26.exe</p>
<p > </p>
<p > </p>
<p > </p>
<p > </p>
<p > </p>
<p > </p>
<p >双击桌面图标打开</p>
<p > </p>
<p > </p>
<p > </p>
<p > </p>
<h1 ><b>安装ARM交叉编译工具链</b></h1>
<h2 ><b>下载编译器</b></h2>
<p ><a href="https://developer.arm.com/downloads/-/gnu-a"><u>https://developer.arm.com/downloads/-/gnu-a</u></a></p>
<p > </p>
<p > </p>
<h2 ><b>解压</b></h2>
<p >可以在wsl中解压,假设压缩包放在了D盘</p>
<p >cd /mnt/d</p>
<p > tar xvJf gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-linux-gnu.tar.xz gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-linux-gnu/</p>
<p > </p>
<h2 ><b>设置系统环境变量</b></h2>
<p >Path添加D:\gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-linux-gnu\bin</p>
<p > </p>
<p > </p>
<p >重启</p>
<h2 ><b>测试</b></h2>
<p >arch64-none-linux-gnu-gcc-10.3.1.exe -v</p>
<p > </p>
<p >PS C:\Users\qinyunti> aarch64-none-linux-gnu-gcc-10.3.1.exe -v</p>
<p >Using built-in specs.</p>
<p >COLLECT_GCC=D:\gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-linux-gnu\bin\aarch64-none-linux-gnu-gcc-10.3.1.exe</p>
<p >COLLECT_LTO_WRAPPER=d:/gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-linux-gnu/bin/../libexec/gcc/aarch64-none-linux-gnu/10.3.1/lto-wrapper.exe</p>
<p >Target: aarch64-none-linux-gnu</p>
<p >Configured with: /data/jenkins/workspace/GNU-toolchain/arm-10-2/src/gcc/configure --target=aarch64-none-linux-gnu --prefix= --with-sysroot=/aarch64-none-linux-gnu/libc --with-build-sysroot=/data/jenkins/workspace/GNU-toolchain/arm-10-2/build-mingw-aarch64-none-linux-gnu/install//aarch64-none-linux-gnu/libc --with-bugurl=<a href="https://bugs.linaro.org" target="_blank">https://bugs.linaro.org</a>/ --enable-gnu-indirect-function --enable-shared --disable-libssp --disable-libmudflap --enable-checking=release --enable-languages=c,c++,fortran --with-gmp=/data/jenkins/workspace/GNU-toolchain/arm-10-2/build-mingw-aarch64-none-linux-gnu/host-tools --with-mpfr=/data/jenkins/workspace/GNU-toolchain/arm-10-2/build-mingw-aarch64-none-linux-gnu/host-tools --with-mpc=/data/jenkins/workspace/GNU-toolchain/arm-10-2/build-mingw-aarch64-none-linux-gnu/host-tools --with-isl=/data/jenkins/workspace/GNU-toolchain/arm-10-2/build-mingw-aarch64-none-linux-gnu/host-tools --host=i686-w64-mingw32 --enable-fix-cortex-a53-843419 --with-libiconv-prefix=/data/jenkins/workspace/GNU-toolchain/arm-10-2/build-mingw-aarch64-none-linux-gnu/host-tools --with-pkgversion='GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)'</p>
<p >Thread model: posix</p>
<p >Supported LTO compression algorithms: zlib</p>
<p >gcc version 10.3.1 20210621 (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29))</p>
<p >PS C:\Users\qinyunti></p>
<h1 ><b>编译程序</b></h1>
<p >打开Beremiz</p>
<p >文件->Tutorials and Examples->1:first_steps</p>
<p > </p>
<p > </p>
<p >双击如下位置进入配置界面</p>
<p > </p>
<p > </p>
<p >设置编译和链接器</p>
<p > </p>
<p > </p>
<p >编译</p>
<p >点击如下图标看到编译成功</p>
<p > </p>
<p >至此基本的开发环境搭建完成,只需要实现RTE运行时环境即可。</p>
<h1 ><b>运行环境</b></h1>
<p >由于支持的Python库不足,且不能pip安装,所以暂时不能使用官方默认的Python的RTE实现,后面我们实现C的RTE。</p>
<h1 ><b>总结</b></h1>
<p >本开发板接口资源丰富,性能强,特别适合工控领域的应用,比如PLC上的应用。由于系统默认的Python环境支持的库不足,暂时不能使用官方默认的Python的RTE实现,后面我们实现C的RTE。</p>
<p > </p>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> <p>系统默认的Python环境支持的库不足,是用于PLC的库么</p>
Jacktang 发表于 2023-6-12 07:36
系统默认的Python环境支持的库不足,是用于PLC的库么
<p><strong>Beremiz官方的RTE是Python实现,但是依赖了很多包,本开发板原生并没有安装这些包,也没有pip不能pip在线安装,所以暂时不能直接使用。嵌入式环境使用C实现RTE更合适,可移植性兼容性更好。</strong></p>
<p><strong>如果是完整的Ubuntu环境则很方便pip install,apt在线安装即可。</strong></p>
页:
[1]