-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from aisuneko/stash
m0sense: Add RT-Thread
- Loading branch information
Showing
7 changed files
with
240 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Arch Linux Milk-V Duo S 测试报告 | ||
# Arch Linux Milk-V Duo 256M 测试报告 | ||
|
||
## 测试环境 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# openEuler Milk-V Duo S 测试报告 | ||
# openEuler Milk-V Duo 256M 测试报告 | ||
|
||
## 测试环境 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
--- | ||
sys: rtthread | ||
sys_ver: null | ||
sys_var: standard | ||
|
||
status: basic | ||
last_update: 2024-12-05 | ||
--- | ||
|
||
# RT-Thread M0sense Test Report | ||
|
||
## Test Environment | ||
|
||
### Operating System Information | ||
- Source Code Link: https://github.com/RT-Thread/rt-thread | ||
- Reference Installation Document: https://github.com/RT-Thread/rt-thread/blob/master/bsp/bouffalo_lab/README.md | ||
- Toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz | ||
|
||
### Hardware Information | ||
|
||
- Sipeed M0sense (BL702) | ||
- A USB A to C or C to C cable | ||
- One Dupont Line | ||
|
||
## Installation Steps | ||
|
||
The following steps are tested on Arch Linux, but should be applicable to all major Linux distributions. | ||
|
||
### Preparing the System Environment | ||
|
||
Install the required packages: | ||
|
||
```shell | ||
sudo apt install -y scons libncurses5-dev device-tree-compiler | ||
# or on Arch Linux: sudo pacman -S scons dtc ncurses | ||
``` | ||
|
||
Get the toolchain: | ||
|
||
```shell | ||
wget https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz | ||
|
||
tar -xzvf Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz | ||
``` | ||
|
||
Update the following paths as needed: | ||
```bash | ||
export RTT_CC_PREFIX=riscv64-unknown-elf- | ||
export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1/bin | ||
``` | ||
|
||
### Fetching the Source Code and Compiling the Firmware | ||
|
||
```shell | ||
git clone --depth=1 https://github.com/RT-Thread/rt-thread | ||
cd rt-thread/bsp/bouffalo_lab/bl70x | ||
scons --menuconfig | ||
source ~/.env/env.sh | ||
pkgs --update | ||
scons -j$(nproc) --verbose | ||
``` | ||
The generated firmware file is at `./rtthread.bin` | ||
|
||
### Flash firmware | ||
|
||
Short the `BOOT` pin and the `3V` pin on the board with a Dupont cable, then power it on to enter flashing mode. | ||
|
||
Flash the firmware to board (the board has built-in serial device): | ||
```shell | ||
cd ../ | ||
sudo ./bouffalo_flash_cube.sh bl702 /dev/ttyACM0 | ||
``` | ||
(The script will automatically detect and download `bouffalo_flash_cube` to the compilation directory.) | ||
|
||
### Logging into the System | ||
|
||
Logging into the system via the serial port. | ||
|
||
## Expected Results | ||
|
||
The system should boot normally and allow login through the serial port. | ||
|
||
## Actual Results | ||
|
||
The system booted successfully, and login through the serial port was successful. | ||
|
||
### Boot Log | ||
|
||
Note that user inputs may not be able to echo immediately in `msh`. | ||
```log | ||
Now can [init] goio set o[rgbled_task] start loop | ||
Now: command not found. | ||
bouffalolab /> | ||
bouffalolab />help | ||
shell commands list: | ||
memtrace | ||
help | ||
bouffalolab />memtrace | ||
write memory: 0x42000000 0xabcd 10 | ||
read memory: 0x42000000 10 | ||
bouffalolab />hello | ||
``` | ||
|
||
## Test Criteria | ||
|
||
Successful: The actual result matches the expected result. | ||
|
||
Failed: The actual result does not match the expected result. | ||
|
||
## Test Conclusion | ||
|
||
Test successful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# RT-Thread M0sense 测试报告 | ||
|
||
## 测试环境 | ||
|
||
### 操作系统信息 | ||
- 源码链接:https://github.com/RT-Thread/rt-thread | ||
- 参考安装文档:https://github.com/RT-Thread/rt-thread/blob/master/bsp/bouffalo_lab/README.md | ||
- 工具链:https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz | ||
|
||
### 硬件信息 | ||
|
||
- Sipeed M0sense (BL702) | ||
- USB A to C 或 C to C 线缆一根 | ||
- 杜邦线一根 | ||
|
||
## 构建步骤 | ||
|
||
以下步骤在 Arch Linux 上测试通过,但应适用各大主流 Linux 发行版。 | ||
|
||
### 准备系统环境 | ||
|
||
获取工具链并配置: | ||
```bash | ||
wget https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395512373/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz | ||
|
||
tar -xzvf Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1-20240115.tar.gz | ||
``` | ||
|
||
自行更改以下路径: | ||
```bash | ||
export RTT_CC_PREFIX=riscv64-unknown-elf- | ||
export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.8.1/bin | ||
``` | ||
|
||
获取依赖: | ||
```bash | ||
sudo apt install -y scons libncurses5-dev device-tree-compiler | ||
# 在 Arch Linux 上为:sudo pacman -S scons dtc ncurses | ||
``` | ||
|
||
### 拉取源码并编译固件 | ||
|
||
```shell | ||
git clone --depth=1 https://github.com/RT-Thread/rt-thread | ||
cd rt-thread/bsp/bouffalo_lab/bl70x | ||
scons --menuconfig | ||
source ~/.env/env.sh | ||
pkgs --update | ||
scons -j$(nproc) --verbose | ||
``` | ||
生成的固件文件位于 `./rtthread.bin`。 | ||
|
||
|
||
### 烧写固件 | ||
|
||
将 M0sense 上的 BOOT 引脚与 3V 引脚用杜邦线短接,上电即进入烧写模式。同时连接串口以便观察输出。 | ||
烧写固件至开发板(板载有串口设备): | ||
```shell | ||
cd ../ | ||
sudo ./bouffalo_flash_cube.sh bl702 /dev/ttyACM0 | ||
``` | ||
|
||
(该脚本会自动检测并下载 `bouffalo_flash_cube` 工具至编译目录) | ||
|
||
### 登录系统 | ||
|
||
通过串口登录系统。 | ||
|
||
## 预期结果 | ||
|
||
系统正常启动,能够通过串口登录。 | ||
|
||
## 实际结果 | ||
|
||
系统正常启动,成功通过串口登录。 | ||
|
||
### 启动信息 | ||
|
||
注意 `msh` 输出可能不立即回显,属正常现象。 | ||
```log | ||
Now can [init] goio set o[rgbled_task] start loop | ||
Now: command not found. | ||
bouffalolab /> | ||
bouffalolab />help | ||
shell commands list: | ||
memtrace | ||
help | ||
bouffalolab />memtrace | ||
write memory: 0x42000000 0xabcd 10 | ||
read memory: 0x42000000 10 | ||
bouffalolab />hello | ||
``` | ||
|
||
## 测试判定标准 | ||
|
||
测试成功:实际结果与预期结果相符。 | ||
|
||
测试失败:实际结果与预期结果不符。 | ||
|
||
## 测试结论 | ||
|
||
测试成功。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters