STM32MP157A-DK1测评+开箱与SDK安装(1)
<div class='showpostmsg'><p>STM32MP157A-DK1测评+开箱与SDK安装</p><p>收到开发板后打开包装盒,取出开发板后发现开发板的供电使用的是USB-C接口的。开发板带的线为双头USB-C类型。没有这种线就到街上买了两条,USB-C转USB-A的类型线。</p>
<p>本次测评用到器材:</p>
<p>USB-C转USB-A线;网线一条;USB-B线;HDMI线;</p>
<p>显示器22寸;USB鼠标;USB键盘;</p>
<p>实验步骤:</p>
<p>一、通电测试</p>
<p>1、将USB-C接头插入电源接口,注意:不是USB-C功能接口。</p>
<p>下载:ssh工具,我使用的是putty.exe,当让你可以使用linux主机。</p>
<p>2、使用putty.exe工具,设置串口115200,N,8,1</p>
<p>打开STLink虚拟串口</p>
<p>3、使用ifconfig命令查看机器的IP,当然你也可以使用其它的方式。查看设置</p>
<p></p>
<p>4、使用ssh连接开发板</p>
<p>使用root账号登陆,root没有设置密码</p>
<p>如果成功就可以进行文件的上传和管理了</p>
<p>二、安装SDK</p>
<p>SDK的安装,linux的开发可是一个很麻烦的事。主要的障碍是开发环境的建立。</p>
<p>主要参考资料<a href="https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Develop_on_Arm®_Cortex®-A7/Install_the_SDK" target="_blank">Install the SDK</a>站点的步骤,个别步骤有出入。</p>
<p>资料中的apt安装的是ST的SDK工具,我对linux上的IDE不感兴趣。所以直接安装SDK</p>
<p>先到<a href="https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Develop_on_Arm®_Cortex®-A7/Install_the_SDK" target="_blank">STLinux SDK下载</a> SDK安装包</p>
<p>建立~/tmp安装临时目录</p>
<p>wget -c https://www.st.com/content/ccc/resource/technical/software/sw_development_suite/group0/51/d4/96/18/27/ab/49/93/stm32mp1dev_yocto_sdk/files/SDK-x86_64-stm32mp1-openstlinux-20-02-19.tar.xz/jcr:content/translations/en.SDK-x86_64-stm32mp1-openstlinux-20-02-19.tar.xz</p>
<p>1、下载安装包 :en.SDK-x86_64-stm32mp1-openstlinux-20-02-19.tar.xz</p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">tar xvf en.</span><span class="mw-lingo-term" data-hasqtip="4" data-lingo-term-id="f20e3c5e54c0ab3d375d660b3f896f6a" style="border-bottom-color: rgb(187, 187, 255); border-bottom-style: dotted; border-bottom-width: 1px; box-sizing: inherit; color: rgb(88, 88, 90); cursor: default; font-family: &quot;courier&quot;,&quot;monospace&quot;; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;">SDK</span><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">-x86_64-stm32mp1-openstlinux-20-02-19.tar.xz</span></p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">解压到当前步骤</span></p>
<p>2、直接执行安装文件:</p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">./st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.6-openstlinux-20-02-19.sh</span></p>
<p>3、转到安装目录</p>
<p>cd /opt/st/stm32mp1/2.6-openstlinux-20-02-19/</p>
<p>找到<span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi文件</span></p>
<p>这个文件是环境配置文件!很重要的文件。</p>
<p>使用source设置环境 </p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">source </span><span class="mw-lingo-term" data-hasqtip="48" data-lingo-term-id="f20e3c5e54c0ab3d375d660b3f896f6a" style="border-bottom-color: rgb(187, 187, 255); border-bottom-style: dotted; border-bottom-width: 1px; box-sizing: inherit; color: rgb(88, 88, 90); cursor: default; font-family: &quot;courier&quot;,&quot;monospace&quot;; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;">SDK</span><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi</span></p>
<p>4、使资料的步骤检查环境是不是安装完成</p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">echo $ARCH</span></p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">echo $CROSS_COMPILE</span></p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">$CC --version</span></p>
<p><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">echo $OECORE_</span><span aria-describedby="qtip-52" class="mw-lingo-term" data-hasqtip="52" data-lingo-term-id="f20e3c5e54c0ab3d375d660b3f896f6a" style="border-bottom-color: rgb(187, 187, 255); border-bottom-style: dotted; border-bottom-width: 1px; box-sizing: inherit; color: rgb(88, 88, 90); cursor: default; font-family: &quot;courier&quot;,&quot;monospace&quot;; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;">SDK</span><span style="display: inline !important; float: none; background-color: rgb(249, 249, 249); color: rgb(88, 88, 90); font-family: "Courier","monospace"; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4285; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;">_VERSION</span></p>
<p>检查环境是不是完成<br />
先写个Hello,world吧。</p>
<p></p>
<p><b><font color="#5e7384">此内容由EEWORLD论坛网友<font size="3">bigbat</font>原创,如需转载或用于商业用途需征得作者同意并注明出处</font></b></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>很强</p>
<p>这个不带屏幕吗</p>
<p>这个板子上面带HDMI接口,可以接显示器的。</p>
<p>板子上面已经装好系统了吗?没看见有EMMC啊...我看别的帖子说还得需要插SD卡才能启动</p>
donatello1996 发表于 2020-3-26 10:25
板子上面已经装好系统了吗?没看见有EMMC啊...我看别的帖子说还得需要插SD卡才能启动
<p>我的板子上面有一块写好程序的SD卡。板子打开时,看到板子上有地方还有锡咋,有棉丝挂在板子上,有洗板水的痕迹。和以往的板子比做工稍差一点。</p>
bigbat 发表于 2020-3-26 10:37
我的板子上面有一块写好程序的SD卡。板子打开时,看到板子上有地方还有锡咋,有棉丝挂在板子上,有洗板水 ...
<p>你的SD卡上面烧写的系统镜像,是通过STM32CubeProg软件烧写的吗?</p>
donatello1996 发表于 2020-3-26 10:41
你的SD卡上面烧写的系统镜像,是通过STM32CubeProg软件烧写的吗?
<p>不是,是SD卡上烧好的。我有一片空白的SD卡有空的时候,试试把en.FLASH-stm32mp1-openstlinux-20-02-19.tar.xz写到SD卡上。重新编译一下内核。</p>
<p> STM32MP157A什么价?<img height="28" src="https://bbs.eeworld.com.cn/static/editor/plugins/hkemoji/sticker/facebook/expressionless-face_1f611.png" width="28" /></p>
页:
[1]