summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMan, Jianting (Meco) <[email protected]>2022-10-18 21:40:42 -0400
committerGitHub <[email protected]>2022-10-18 18:40:42 -0700
commit2bcc22f6b039b36cb3526888daeb1e0463c3b6eb (patch)
tree9ba3e5a02c5ec86ce8f4106455c2daa252c4e563
parentafd1666918abbef5323de4bfa7d47234dd8ee737 (diff)
[ch32v307][readme] 增加vscode编译介绍 (#6540)
-rw-r--r--bsp/wch/risc-v/ch32v307v-r1/README.md28
-rw-r--r--bsp/wch/risc-v/ch32v307v-r1/README_zh.md17
-rw-r--r--bsp/wch/risc-v/ch32v307v-r1/figures/vscode-terminal.pngbin0 -> 44862 bytes
3 files changed, 30 insertions, 15 deletions
diff --git a/bsp/wch/risc-v/ch32v307v-r1/README.md b/bsp/wch/risc-v/ch32v307v-r1/README.md
index 4343717b83..e0e555c081 100644
--- a/bsp/wch/risc-v/ch32v307v-r1/README.md
+++ b/bsp/wch/risc-v/ch32v307v-r1/README.md
@@ -2,7 +2,7 @@
**English** | [中文](README_zh.md)
-## Introduction
+## 1 Introduction
CH32V307V-R1 is a RISC-V core-based development board with a maximum main frequency of 144Mhz. It delivers the best value for developers to try and get started with RISC-V architecture.
@@ -29,7 +29,7 @@ By reading the Quickly Get Started section developers can quickly get their hand
For more details about this board, please refer to: [CH32V307](https://www.wch.cn/products/CH32V307.html)
-## Compiling
+## 2 Compiling
The BSP supports the RISC-V GCC development environment, here's the specific version information:
@@ -37,18 +37,18 @@ The BSP supports the RISC-V GCC development environment, here's the specific ver
| ------------ | -------------------- |
| GCC | WCH RISC-V GCC 8.2.0 |
-## Quickly Get Started
+## 3 Quickly Get Started
-#### 3.1 Using [Env](https://www.rt-thread.io/download.html?download=Env) to compile BSP
+### 3.1 Using [Env](https://www.rt-thread.io/download.html?download=Env) to compile BSP
This section is about to introduce how to use Env to compile the BSP.
#### 3.1.1 Compile BSP
-1. [Download WCH Compile Toolchain](https://github.com/NanjingQinheng/sdk-toolchain-RISC-V-GCC-WCH/archive/refs/tags/V1.0.0.zip)
+1. [Download WCH Compile Toolchain](https://github.com/NanjingQinheng/sdk-toolchain-RISC-V-GCC-WCH/releases)
2. [Download the Env tool latest version](https://github.com/RT-Thread/env-windows/releases)
3. [Download the RT-Thread latest code](https://github.com/RT-Thread/rt-thread/archive/refs/heads/master.zip)
-4. Open the Env tool in the current BSP root directory and execute the `scons --exec-path=D:sdk-toolchain-RISC-V-GCC-WCH-1.0.0bin` command, compile it directly while specifying the toolchain location.
+4. Open the Env tool in the current BSP root directory and execute the `scons -j12 --exec-path=D:\sdk-toolchain-RISC-V-GCC-WCH-1.0.0bin` command, compile it directly while specifying the toolchain location.
5. After compilation, the **rtthread.bin** file will be generated
![sconscompile](./figures/sconscompile.jpg)
@@ -72,11 +72,19 @@ In the terminal tool, open the onboard wch-link serial port (WCHDapLink SERIAL,
![end](./figures/end.png)
-<!-- ### 3.2 Import RT-Thread Studio Project
+### 3.2 Use VSCode to edit and compile the project
+
+In the Env terminal, type command `scons --target=vsc` to generate the VSCode project. Then, type command `code .` in the Env terminal to open the VSCode.
+
+Use **VSCode terminal** to type command `scons -j12 --exec-path=D:\sdk-toolchain-RISC-V-GCC-WCH-1.0.0bin` to compile the project in VSCode.
+
+![vscode-terminal](./figures/vscode-terminal.png)
+
+<!-- ### 3.3 Import RT-Thread Studio Project
**CH32V307V-R1 is pending upgrade in Studio. It's not encouraged now to use Studio to compile this BSP.**
-#### 3.2.1 Import
+#### 3.3.1 Import
Open RT-Thread Studio and click: File-> Import:
@@ -93,7 +101,7 @@ Fill in the project info, the BSP root directory is \rt-thread\bsp\wch\risc-v\ch
![config](./figures/config.png)
-#### 3.2.2 Compilation Environment
+#### 3.3.2 Compilation Environment
工程导入后进行编译环境的设置,首先点击“打开构建设置”进入设置界面:
@@ -114,7 +122,7 @@ Set the tool:
![toolset](./figures/toolset.png)
-#### 3.2.3 Compiling
+#### 3.3.3 Compiling
The result is shown as below:
diff --git a/bsp/wch/risc-v/ch32v307v-r1/README_zh.md b/bsp/wch/risc-v/ch32v307v-r1/README_zh.md
index 11656eaa1c..e8311fc3ee 100644
--- a/bsp/wch/risc-v/ch32v307v-r1/README_zh.md
+++ b/bsp/wch/risc-v/ch32v307v-r1/README_zh.md
@@ -63,9 +63,17 @@ CH32V307V-R1 是 WCH 推出的一款基于 RISC-V 内核的开发板,最高主
![end](./figures/end.png)
-### 3.2 导入 RT-Thread Studio 工程
+### 3.2 使用VSCode编译工程
-#### 3.2.1 导入
+在Env终端中敲入命令 `scons --target=vsc` 来生成VSCode工程. 接着敲入命令 `code .` 来打开VSCode.
+
+使用 **VSCode 终端** 敲入命令 `scons -j12 --exec-path=D:\sdk-toolchain-RISC-V-GCC-WCH-1.0.0bin` 来编译工程。
+
+![vscode-terminal](./figures/vscode-terminal.png)
+
+### 3.3 导入 RT-Thread Studio 工程
+
+#### 3.3.1 导入
打开 RT-Thread Studio 后点击:文件->导入:
@@ -79,8 +87,7 @@ CH32V307V-R1 是 WCH 推出的一款基于 RISC-V 内核的开发板,最高主
![config](./figures/config.png)
-
-#### 3.2.2 配置环境
+#### 3.3.2 配置环境
工程导入后进行编译环境的设置,首先点击“打开构建设置”进入设置界面:
@@ -98,7 +105,7 @@ CH32V307V-R1 是 WCH 推出的一款基于 RISC-V 内核的开发板,最高主
![toolset](./figures/toolset.png)
-#### 3.2.3 编译
+#### 3.3.3 编译
编译结果如下:
diff --git a/bsp/wch/risc-v/ch32v307v-r1/figures/vscode-terminal.png b/bsp/wch/risc-v/ch32v307v-r1/figures/vscode-terminal.png
new file mode 100644
index 0000000000..a227260d84
--- /dev/null
+++ b/bsp/wch/risc-v/ch32v307v-r1/figures/vscode-terminal.png
Binary files differ