【中科蓝讯AB32VG1 RISC-V板“碰上”RTT】+开箱与环境安装
本帖最后由 xiyue521 于 2021-4-30 22:58 编辑<p><span style="display: none;"> </span> </p>
<p style="text-align:justify"><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">1.</span><span style="font-family:Calibri">AB32VG1<font face="宋体">开发板是以中科蓝讯(</font><font face="Calibri">Bluetrum</font><font face="宋体">)</font><font face="Calibri"> </font><font face="宋体">公司推出的基于</font><font face="Calibri">RISC-V</font><font face="宋体">架构的高配置芯片</font><font face="Calibri">AB5301A</font><font face="宋体">为核心所组成的。</font></span></span></span></p>
<p></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">板子的资源:</font></span></span></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">本开发板可以用</font></span><span style="font-family:Calibri">RT-Thread Studio </span><span style="font-family:宋体"><font face="宋体">开发,它</font></span><span style="font-family:Calibri"><font face="宋体">主要包括工程创建和管理,代码编辑,</font>SDK<font face="宋体">管理,</font><font face="Calibri">RT-Thread</font><font face="宋体">配置,构建配置,调试配置,程序下载和调试等功能,结合图形化配置系统以及软件包和组件资源,减少重复工作,提高开发效率。</font></span></span></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:Calibri"><font face="宋体">下载地址:</font></span><a href="https://www.rt-thread.org/page/studio.html" target="_blank"><span class="15" style="background:#ffffff"><span style="font-family:Helvetica"><span style="color:#0366d6"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">https://www.rt-thread.org/page/studio.html</span></span></span></span></span></span></a></span></span></p>
<p style="text-align:justify"> </p>
<p style="text-align:justify"><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">2.<font face="宋体">环境搭建:</font></span></span></span></p>
<p style="text-align:justify"><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:Calibri">RT-Thread Studio</span><span style="font-family:宋体"><font face="宋体">安装直接点</font>.exe<font face="宋体">文件,一直点击下一步即可,手把手安装向导。</font></span></span></span></p>
<p></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">第一次打开会让你登入,之后就不用了:</font></span></span></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">3.<font face="宋体">创建工作空间:</font></span></span></span></p>
<p> </p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">4.<font face="宋体">安装</font></span><span style="font-family:Calibri"><font face="宋体">一些依赖包进行</font></span><span style="font-family:宋体"><font face="宋体">,</font></span><span style="font-family:Calibri"><font face="宋体">安装交叉编译工具</font>RISC-V<font face="宋体">,点击进入</font><font face="Calibri">RT-Thread Studio SDK</font><font face="宋体">管理器。</font></span></span></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">4.<font face="宋体">创建新工程:</font></span></span></span></p>
<p></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">选择基于开发板创建:</font></span></span></span></p>
<p> </p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">还可以看到板子上的资源信息和手册,很是方便!点击完成:</font></span></span></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">5.<font face="宋体">配置</font><font face="Calibri">riscv</font><font face="宋体">的工具链路径:</font></span></span></span></p>
<p></p>
<ol start="6">
<li style="text-align:justify"><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">编译:</font></span></span></span></li>
</ol>
<p></p>
<ol start="6">
<li align="justify" style="text-align:justify"><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">下载到开发板:这个板子表特殊,不是用</font>bin<font face="宋体">或</font><font face="Calibri">hex</font><font face="宋体">,而是用</font><font face="Calibri">fcf</font><font face="宋体">后缀的那个文件配合专用的下载软件单总线()</font></span><b><span class="15"><span style="background:#ffffff"><span style="font-family:Helvetica"><span style="color:#1a1a1a"><span style="letter-spacing:0.0000pt"><span style="font-weight:bold"><span style="text-transform:none"><span style="font-style:normal">1 wire program&debug</span></span></span></span></span></span></span></span></b><b><span class="15"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#1a1a1a"><span style="letter-spacing:0.0000pt"><span style="font-weight:bold"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">)</font></span></span></span></span></span></span></span></span></b><span style="font-family:宋体"><font face="宋体">下载:</font></span></span></span></li>
</ol>
<p><span style="font-size:20px;"></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体"><font face="宋体">按下开始:</font></span></span></span></p>
<p><span style="font-size:20px;"></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#1a1a1a"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">现象:</font></span></span></span></span></span><span style="font-family:Helvetica"><span style="color:#1a1a1a"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="Helvetica">看到</font>LED亮灭闪烁</span></span></span></span></span></span></span></span><span style="font-size:20px;"></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">Rtthread<font face="宋体">的强大功能就是可以像</font><font face="Calibri">linux</font><font face="宋体">操作,有一个控制台,可以查看运行的线程,输入</font>help<font face="宋体">查看:</font></span></span></span><span style="font-size:20px;"></span></p>
<p><span style="font-size:26px;"><span style="font-family:Calibri"><span style="font-family:宋体">list_thread<font face="宋体">查看运行的线程和堆栈使用率:</font></span></span></span></p>
<p><span style="font-size:20px;"></span><span style="display: none;"> </span></p>
补充内容 (2021-4-30 22:59):
#include "board.h"
int main(void)
{
uint32_t cnt = 0;
uint8_t pin = rt_pin_get("PE.1");
rt_pin_mode(pin, PIN_MODE_OUTPUT);
rt_kprintf("Hello, world\n");
while (1)
{
... <pre>
<code class="language-cpp">#include "board.h"
int main(void)
{
uint32_t cnt = 0;
uint8_t pin = rt_pin_get("PE.1");
rt_pin_mode(pin, PIN_MODE_OUTPUT);
rt_kprintf("Hello, world\n");
while (1)
{
if (cnt % 2 == 0) {
rt_pin_write(pin, PIN_LOW);
} else {
rt_pin_write(pin, PIN_HIGH);
}
cnt++;
rt_thread_mdelay(1000);
}
return 0;
}</code></pre>
<p> </p>
页:
[1]