Skip to content

Commit 128fc3f

Browse files
committed
feat: update activation instructions and usage guide in README files
1 parent a10b601 commit 128fc3f

2 files changed

Lines changed: 109 additions & 7 deletions

File tree

README.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ After installation, you need to activate the environment variables.
8686
Run the following command each time you start a new PowerShell session:
8787

8888
```powershell
89-
~/.rt-env/env.ps1
89+
. ~/.rt-env/env.ps1
9090
```
9191

9292
**Option B: Auto Activation on Startup (Recommended)**
@@ -98,7 +98,7 @@ Create or edit a PowerShell configuration file to automatically activate the env
9898
notepad $PROFILE
9999
100100
# Add the following line to the file:
101-
~/.rt-env/env.ps1
101+
. ~/.rt-env/env.ps1
102102
```
103103

104104
**Configuration File Paths:**
@@ -233,7 +233,58 @@ The following are the parameter descriptions common to all installation scripts:
233233

234234
## Env Usage Guide
235235

236-
For detailed usage instructions, please refer to:
236+
After installation completes, follow these steps to start using RT-Thread ENV:
237+
238+
### 1. Activate Environment
239+
240+
**Windows (PowerShell):**
241+
```powershell
242+
# Manual activation each time
243+
. ~/.rt-env/env.ps1
244+
245+
# Or auto-activate on startup (recommended)
246+
# Add to PowerShell profile: ~/.rt-env/env.ps1
247+
```
248+
249+
**Linux/macOS (bash/zsh):**
250+
```bash
251+
# Manual activation each time
252+
source ~/.rt-env/env.sh
253+
254+
# Or auto-activate on login (recommended)
255+
# Add to ~/.bashrc or ~/.zshrc: source ~/.rt-env/env.sh
256+
```
257+
258+
### 2. Install Toolchains
259+
260+
Use the `sdk` command to install required toolchains for your development board:
261+
262+
```bash
263+
# Run sdk command to install toolchains
264+
sdk
265+
```
266+
267+
### 3. Available Commands
268+
269+
After activation, you can use the following commands:
270+
271+
| Command | Description |
272+
|---------|-------------|
273+
| `menuconfig` | Configure project (RT-Thread kernel, BSP) |
274+
| `menuconfig -s` | Configure RT-Thread ENV (packages, tools) |
275+
| `pkgs` | Package manager (update, upgrade packages) |
276+
| `sdk` | Toolchain manager (install toolchains) |
277+
| `scons` | Build project |
278+
279+
### 4. Additional Tools
280+
281+
**pyocd Installation** (optional, for debugging Cortex-M devices):
282+
```bash
283+
# After activation
284+
pip install pyocd
285+
```
286+
287+
### 5. For Detailed Usage Instructions, Please Refer to:
237288

238289
- [Env Tool Usage Guide](https://github.com/RT-Thread/rt-thread/blob/master/documentation/env/env.md)
239290
- [Env Official User Manual](https://www.rt-thread.org/document/site/#/development-tools/env/env)

README_ZH.md

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Set-ExecutionPolicy -ExecutionPolicy Bypass Process; irm https://gitee.com/RT-Th
8787
每次启动新的 PowerShell 会话时运行以下命令:
8888

8989
```powershell
90-
~/.rt-env/env.ps1
90+
. ~/.rt-env/env.ps1
9191
```
9292

9393
**方案 B:启动时自动激活(推荐)**
@@ -99,7 +99,7 @@ Set-ExecutionPolicy -ExecutionPolicy Bypass Process; irm https://gitee.com/RT-Th
9999
notepad $PROFILE
100100
101101
# 在文件中添加以下行:
102-
~/.rt-env/env.ps1
102+
. ~/.rt-env/env.ps1
103103
```
104104

105105
**配置文件路径说明:**
@@ -232,9 +232,60 @@ echo 'source ~/.rt-env/env.sh' >> ~/.zshrc
232232
./install.sh -S "https://github.com/RT-Thread/sdk.git#master"
233233
```
234234

235-
## 使用 Env 指南
235+
## Env 使用指南
236236

237-
详细使用说明请参考:
237+
安装完成后,按照以下步骤开始使用 RT-Thread ENV:
238+
239+
### 1. 激活环境
240+
241+
**Windows (PowerShell):**
242+
```powershell
243+
# 每次手动激活
244+
. ~/.rt-env/env.ps1
245+
246+
# 或启动时自动激活(推荐)
247+
# 添加到 PowerShell 配置文件中: ~/.rt-env/env.ps1
248+
```
249+
250+
**Linux/macOS (bash/zsh):**
251+
```bash
252+
# 每次手动激活
253+
source ~/.rt-env/env.sh
254+
255+
# 或登录时自动激活(推荐)
256+
# 添加到 ~/.bashrc 或 ~/.zshrc: source ~/.rt-env/env.sh
257+
```
258+
259+
### 2. 安装工具链
260+
261+
使用 `sdk` 命令安装开发板所需的工具链:
262+
263+
```bash
264+
# 运行 sdk 命令安装工具链
265+
sdk
266+
```
267+
268+
### 3. 可用命令
269+
270+
激活后,可以使用以下命令:
271+
272+
| 命令 | 说明 |
273+
|------|------|
274+
| `menuconfig` | 配置项目(RT-Thread 内核、BSP) |
275+
| `menuconfig -s` | 配置 RT-Thread ENV(软件包、工具) |
276+
| `pkgs` | 包管理器(更新、升级软件包) |
277+
| `sdk` | 工具链管理器(安装工具链) |
278+
| `scons` | 编译项目 |
279+
280+
### 4. 额外工具
281+
282+
**pyocd 安装**(可选,用于调试 Cortex-M 设备):
283+
```bash
284+
# 激活后安装
285+
pip install pyocd
286+
```
287+
288+
### 5. 详细使用说明请参考:
238289

239290
- [Env 工具使用指南](https://github.com/RT-Thread/rt-thread/blob/master/documentation/env/env.md)
240291
- [Env 官方用户手册](https://www.rt-thread.org/document/site/#/development-tools/env/env)

0 commit comments

Comments
 (0)