Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RDC
rt-smart
全志_RISCV_D1_D1S
快来尝鲜!!使用 D1s (RDC2022 纪念版) 运行 RT-Smart
发布于 2023-01-17 15:57:19 浏览:6859
订阅该版
[tocm] ## 出厂固件上手指南 ### 软件环境: * Ubuntu20.0.4 * win10 ### 硬件环境: * RDC2022 纪念版开发板 * Type-c 头数据线 ![board.png](https://oss-club.rt-thread.org/uploads/20230117/e5c61fb3163baf240f797cab63a24635.png.webp) #### 驱动安装 1. 上电前,按住下载模式按钮。然后使用 Type-c 数据线插入下载接口给开发板上电。 2. 打开资料包中的 `zadig` 软件/ [zadig](https://zadig.akeo.ie/downloads/) 官网下载。然后参照如下所示的 “驱动安装示意图”,安装 fel 驱动。 ![screenshot_fel_driver.png](https://oss-club.rt-thread.org/uploads/20230117/66ea6f46e96dc3fe36ffbc267332959b.png.webp) #### 连接串口工具 打开 **MobaXterm** /其他终端工具,将 Type-C 数据线插入开发板下方的串口调试口,并连接到对应的端口,选择波特率为:500000。 ![screenshot_mobaxterm.png](https://oss-club.rt-thread.org/uploads/20230117/429d0ec0db8fb623bf6ac54ac7821c5c.png.webp) 可以按一下开发板的 RST 按钮,可以看到终端输出以下的信息,即为出厂固件 ![screenshot_start.png](https://oss-club.rt-thread.org/uploads/20230117/6a3899d6562ee99ea3408b118ca6ffc4.png) ## 二次开发指南 ### 下载代码 1.下载 RT-Smart 用户态应用代码: ```shell git clone https://github.com/RT-Thread/userapps.git ``` 2.进入 userapps 目录,下载 RT-Smart 内核代码(RT-Smart 现在已经合入 master,可以直接使用主线代码) ```shell cd userapps && git clone https://github.com/RT-Thread/rt-thread.git ``` ### 配置工具链 运行 userapps\tools 目录下 get_toolchain.py 的脚本,会下载对应的工具链并展开到userapps\tools\gun_gcc 目录。 因为 D1S 是 RISCV-64 架构的,所以输入下面的命令: ```shell python3 tools/get_toolchain.py riscv64 ``` 在 userapps 目录下,运行 smart-env.sh 配置工具链路径 ```shell source smart-env.sh riscv64 ``` ### 编译内核程序 进入 rt-thread/bsp/allwinner/d1s 目录下 ```shell cd rt-thread/bsp/allwinner/d1s ``` 使用 `scons --menuconfig` 查看配置 smart 使用的串口为 UART3 ,对应引脚为 PG8 和 PG9。 1. 检查 UART3 是否开启,以及引脚是否正确 ![screenshot_uart.png](https://oss-club.rt-thread.org/uploads/20230117/14117a528c96f0ee58ce6ec734eda152.png) 2. 检查终端使用串口是否为 `uart3` ![screenshot_kernel.png](https://oss-club.rt-thread.org/uploads/20230117/5f7a96da8d4a7fa6d144d75b6958a64d.png) 3. 使用 scons 命令编译 BSP 编译完内核之后,会自动执行打包命令 `./mksdimg.sh` 打包出 sd.bin 镜像文件。此文件将在后面借助下载工具,下载到 D1s 上运行。 ![screenshot_build.png](https://oss-club.rt-thread.org/uploads/20230117/b5ab2a41b0da0cc502ae14910d4cf4a1.png.webp) ### 烧录系统内核 接下来借助 fel 工具烧录系统内核。 ``` boot0_sdcard_sun20iw1p1_f133.bin ---- 第一次烧录需要烧录此boot文件(后面不需要再烧录) sd.bin ---- 打包好的系统内核镜像 xfel.exe ---- 烧录工具 ``` 在 window 中的 `xfel_v1.2.9` 目录下,打开终端使用以下命令烧录固件: - 烧录boot镜像: xfel.exe write 8192 boot0_sdcard_sun20iw1p1_f133.bin - 烧录内核镜像: xfel.exe sd write 57344 sd.bin ![screenshot_download.png](https://oss-club.rt-thread.org/uploads/20230117/f740d0cf43ecca8a82304dc8ea92085b.png) > 注意:执行烧录命令前,需要使开发板处于fel下载模式(按住下载按钮并上电) ### 运行用户态应用(可选) 将 D1s BSP 目录下的 `./mksdcard.sh` 拷贝到 `userapps` 下。运行该脚本,将生成的 `sdroot.bin` ,复制到 window 中的 `xfel_v1.2.9` 目录下,使用以下命令即可烧录用户态程序到存储设备 : ``` xfel.exe sd write 8388608 sdroot.bin ``` ![screenshot_sdroot.png](https://oss-club.rt-thread.org/uploads/20230117/2566de67121fa4dc90413b3bfd8469eb.png) 参照下面的运行日志,运行对应的用户态应用: ```shell msh />ls Directory /: hello.elf 341224 ping.elf 347336 pong.elf 342160 umailbox.elf 357440 vi.elf 517464 webclient.elf 393032 webserver.elf 489416 msh /bin>hello.elf msh /bin>hello world! ``` 可以看到 hello world 程序已经成功运行,至此我们的用户态程序已经跑起来了。 文章中涉及到的软件以及开发板资料下载: [RDC资料.7z](https://club.rt-thread.org/file_download/50cbb5ff37a84911) > 欢迎小伙伴们基于 RDC 2022 开发板分享更多有意思的应用/案例。最后祝大家新春愉快,新的一年 RT-Thread 继续与你同行!!
42
条评论
默认排序
按发布时间排序
登录
注册新账号
关于作者
xiaorui
小睿手办 https://item.taobao.com/item.htm?id=674889867009
文章
8
回答
350
被采纳
71
关注TA
发私信
相关文章
1
rt-smart发布时间
2
rt-smart qemu-vexpress-a9 编译报错
3
rt-smart分支编译rasp4-32bsp报错
4
rt-smart qemu-vexpress-a9 win10编译脚本问题
5
rt-smart qemu-vexpress-a9 linux 下crtl+c
6
rt-smart + pthread 编译报错
7
rt-smart的rt_channel实现问题
8
关于rt-smart的musl-libc
9
RT-Smart Windows 编译 qemu-vexpress-a9 出错
10
用户程序在RT-Smart存在的方式
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
WIZnet_W5500
ota在线升级
cubemx
PWM
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
keil_MDK
SFUD
msh
ulog
C++_cpp
MicroPython
本月问答贡献
三世执戟
5
个答案
1
次被采纳
KunYi
4
个答案
1
次被采纳
RTT_逍遥
3
个答案
1
次被采纳
xiaorui
1
个答案
1
次被采纳
JonasWen
1
个答案
1
次被采纳
本月文章贡献
出出啊
1
篇文章
3
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
3
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
2
次点赞
回到
顶部
发布
问题
投诉
建议
回到
底部