Skip to content

Commit bc7e54e

Browse files
[bsp][hpmicro] upgrade to bsp v1.10.0, add hpm6p00evk and hpm5e00evk support
- upgraded bsp to v1.10.0 - moved hpm_sdk to rt-thread package - added support for hpm6p00evk and hpm5e00evk Signed-off-by: Fan YANG <[email protected]>
1 parent df8c29a commit bc7e54e

File tree

1,311 files changed

+36951
-1029809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,311 files changed

+36951
-1029809
lines changed

.github/ALL_BSP_COMPILE.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@
423423
"hpmicro/hpm5300evk",
424424
"hpmicro/hpm5301evklite",
425425
"hpmicro/hpm6800evk",
426-
"hpmicro/hpm6e00evk"
426+
"hpmicro/hpm6e00evk",
427+
"hpmicro/hpm6p00evk",
428+
"hpmicro/hpm5e00evk"
427429
]
428430
},
429431
{

bsp/hpmicro/README.md

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# HPMicro Board Support Package (BSP) Introduction
2+
3+
[中文页](README_zh.md) |
4+
5+
## Introduction
6+
7+
This document provides an overview of the HPMicro BSPs (Board Support Package) available in the RT-Thread repository. Each BSP is tailored for specific HPMicro development boards, offering necessary drivers and configurations to run RT-Thread seamlessly on RISC-V based HPMicro microcontrollers.
8+
9+
The document consists of the following parts:
10+
11+
- HPMicro BSP Overview
12+
- Available BSPs
13+
- Quick Start Guide
14+
- Common Development Environment Setup
15+
- References
16+
17+
By reading the Quick Start Guide section, developers can quickly get their hands on any HPMicro BSP and run RT-Thread on the board. Each individual BSP contains detailed documentation for specific board features and advanced usage.
18+
19+
## Available BSPs
20+
21+
Below is a comprehensive list of HPMicro BSPs currently supported:
22+
23+
| BSP Name | Supported Board | MCU | Description |
24+
|----------|-----------------|-----|-------------|
25+
| hpm5300evk | HPM5300EVK | HPM5361 | Development board for HPM5300 series |
26+
| hpm5301evklite | HPM5301EVKLITE | HPM5301 | Lite version development board for HPM5301 |
27+
| hpm5e00evk | HPM5E00EVK | HPM5E31 | Development board for HPM5E00 series |
28+
| hpm6200evk | HPM6200EVK | HPM6200 | Development board for HPM6200 series |
29+
| hpm6300evk | HPM6300EVK | HPM6360 | Development board for HPM6300 series with Ethernet support |
30+
| hpm6750evk | HPM6750EVK | HPM6750 | Development board for HPM6750 series with dual-core RISC-V |
31+
| hpm6750evk2 | HPM6750EVK2 | HPM6750 | Second generation development board for HPM6750 series |
32+
| hpm6750evkmini | HPM6750EVKMINI | HPM6750 | Mini development board for HPM6750 series |
33+
| hpm6800evk | HPM6800EVK | HPM6800 | Development board for HPM6800 series |
34+
| hpm6e00evk | HPM6E00EVK | HPM6E00 | Development board for HPM6E00 series |
35+
| hpm6p00evk | HPM6P00EVK | HPM6P00 | Development board for HPM6P00 series |
36+
37+
## Quick Start Guide
38+
39+
### Prerequisites
40+
41+
Before getting started with any HPMicro BSP, you need to prepare the following development environment:
42+
43+
#### 1. RT-Thread ENV
44+
- Download and install [RT-Thread ENV](https://www.rt-thread.org/download.html#download-rt-thread-env-tool)
45+
46+
#### 2. RISC-V Toolchain
47+
- Download the RISC-V toolchain: [riscv32-gnu-toolchain](https://github.com/helloeagleyang/riscv32-gnu-toolchain-win/archive/2022.04.12.zip)
48+
- Extract it to a specified directory, for example: `C:\DevTools\riscv32-gnu-toolchain`
49+
- Set environment variable `RTT_RISCV_TOOLCHAIN` to `<TOOLCHAIN_DIR>\bin`
50+
- For example: `C:\DevTools\riscv32-gnu-toolchain\bin`
51+
52+
#### 3. OpenOCD for HPMicro
53+
- Download OpenOCD: [rtt-debugger-support-package](https://github.com/hpmicro/rtt-debugger-support-package/archive/v0.4.0.zip)
54+
- Extract it to a specified directory, for example: `C:\DevTools\openocd-hpmicro`
55+
- Set environment variable `OPENOCD_HPMICRO` to `<OPENOCD_HPMICRO_DIR>\bin`
56+
- For example: `C:\DevTools\openocd-hpmicro\bin`
57+
58+
### Getting Started with a Specific BSP
59+
60+
1. **Navigate to the desired BSP directory**:
61+
```bash
62+
cd rt-thread/bsp/hpmicro/<bsp_name>
63+
```
64+
65+
2. **Configure the project**:
66+
- Open RT-Thread ENV command-line
67+
- Change directory to the BSP directory
68+
- Run `menuconfig` to configure the project
69+
70+
3. **Build the project**:
71+
```bash
72+
scons -jN # N equals to the number of CPU cores
73+
```
74+
75+
4. **Hardware Connection**:
76+
- Switch BOOT pin to 2'b00
77+
- Connect the `PWR_DEBUG` port to PC via TYPE-C cable
78+
79+
5. **Download and Debug**:
80+
- Use the provided OpenOCD scripts for downloading and debugging
81+
- Refer to individual BSP README files for specific commands
82+
83+
### Running Results
84+
85+
Once the project is successfully downloaded, the system runs automatically. The LED on the board will flash periodically.
86+
87+
Connect the serial port of the board to the PC, communicate with it via a serial terminal tool (115200-8-1-N). Reset the board and the startup information of RT-Thread will be observed:
88+
89+
```
90+
\ | /
91+
- RT - Thread Operating System
92+
/ | \ 5.2.2 build Aug 16 2025 18:18:18
93+
2006 - 2025 Copyright by RT-Thread team
94+
msh >
95+
```
96+
97+
## Common Peripheral Support
98+
99+
Most HPMicro BSPs support the following peripherals:
100+
101+
| **On-board Peripherals** | **Support** | **Note** |
102+
| ------------------------ | ----------- | -------- |
103+
| USB || |
104+
| QSPI Flash || |
105+
| GPIO || |
106+
| SPI || |
107+
| I2C || |
108+
| UART || |
109+
| PWM || |
110+
| RTC || |
111+
| On-Board Debugger || ft2232 |
112+
113+
Additional peripherals may be supported depending on the specific board:
114+
- **Ethernet**: Available on
115+
- HPM6300EVK
116+
- HPM6750EVK
117+
- HPM6750EVK2
118+
- HPM6750EVKMINI + ART-Pi Industry IO extension
119+
- HPM6800EVK
120+
- HPM6E00EVK
121+
- HPM6P00EVK
122+
- HPM5E00EVK
123+
- **CAN**: Available on HPM6750 series Development Boards, HPM5300EVK, HPM6800EVK, HPM6E00EVK, HPM6P00EVK and HPM5E00EVK
124+
- **SDIO**: Available on HPM6300EVK, HPM6750EVKMINI, HPM6750EVK, HPM6750EVK2 and HPM6800EVK
125+
- **Display/Audio**: Available on HPM6750EVK, HPM6800EVK, HPM6E00EVK,HPM6P00EVK
126+
127+
## Development Environment Setup
128+
129+
130+
### Using Command Line Tools
131+
132+
1. Set up the environment variables as described in the Prerequisites section
133+
2. Use `scons` for building
134+
3. Use OpenOCD and GDB for debugging or use the Ozone + JLink for debugging
135+
136+
## Individual BSP Documentation
137+
138+
Each BSP contains its own detailed README file with:
139+
- Board-specific hardware information
140+
- Peripheral configuration details
141+
- Specific download and debug commands
142+
- Advanced features and examples
143+
144+
Please refer to the individual BSP directories for detailed documentation:
145+
- `hpm5300evk/README.md`
146+
- `hpm5301evklite/README.md`
147+
- `hpm5e00evk/README.md`
148+
- `hpm6200evk/README.md`
149+
- `hpm6300evk/README.md`
150+
- `hpm6750evk/README.md`
151+
- `hpm6750evk2/README.md`
152+
- `hpm6750evkmini/README.md`
153+
- `hpm6800evk/README.md`
154+
- `hpm6e00evk/README.md`
155+
- `hpm6p00evk/README.md`
156+
157+
## Troubleshooting
158+
159+
### Common Issues
160+
161+
1. **Toolchain not found**: Ensure `RTT_RISCV_TOOLCHAIN` environment variable is set correctly
162+
2. **OpenOCD connection failed**: Check USB connection and driver installation
163+
3. **Build errors**: Verify all dependencies are installed and environment variables are set
164+
4. **Serial communication issues**: Check baud rate (115200) and COM port settings
165+
166+
### Getting Help
167+
168+
- Check the individual BSP README files for board-specific issues
169+
- Visit [RT-Thread Community](https://club.rt-thread.org/)
170+
- Refer to [RT-Thread Documentation](https://www.rt-thread.org/document/site/)
171+
172+
## References
173+
174+
- [RT-Thread Document Center](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/README)
175+
- [RT-Thread ENV](https://github.com/RT-Thread/rtthread-manual-doc/blob/master/env/env.md)
176+
- [HPMicro Official Website](https://www.hpmicro.com/)
177+
- [HPMicro SDK Documentation](https://hpmicro.github.io/)
178+
- [RISC-V Toolchain](https://github.com/riscv/riscv-gnu-toolchain)
179+
180+
## Contributing
181+
182+
Contributions to enhance existing BSPs or add new ones are welcome. Please follow the RT-Thread contribution guidelines and ensure that your BSP adheres to the project's standards.
183+
184+
For contributing to HPMicro BSPs:
185+
1. Fork the `RT-Thread` repository
186+
2. Create a feature branch
187+
3. Make your changes following the existing code style
188+
4. Test your changes thoroughly
189+
5. Submit a pull request with a clear description
190+
191+
## License
192+
193+
This BSP is released under the [RT-Thread license](https://github.com/RT-Thread/rt-thread/blob/master/LICENSE).

bsp/hpmicro/README_zh.md

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# HPMicro 板级支持包 (BSP) 介绍
2+
3+
[English](README.md) |
4+
5+
## 简介
6+
7+
本文档提供了 RT-Thread 仓库中可用的 HPMicro BSP(板级支持包)的概述。每个 BSP 都针对特定的 HPMicro 开发板进行了定制,提供必要的驱动程序和配置,以便在基于 RISC-V 的 HPMicro 微控制器上无缝运行 RT-Thread。
8+
9+
本文档包含以下部分:
10+
11+
- HPMicro BSP 概述
12+
- 可用的 BSP
13+
- 快速开始指南
14+
- 通用开发环境设置
15+
- 参考资料
16+
17+
通过阅读快速开始指南部分,开发者可以快速上手任何 HPMicro BSP 并在开发板上运行 RT-Thread。每个单独的 BSP 都包含特定开发板功能和高级用法的详细文档。
18+
19+
## 可用的 BSP
20+
21+
以下是当前支持的 HPMicro BSP 的完整列表:
22+
23+
| BSP 名称 | 支持的开发板 | MCU | 描述 |
24+
|----------|-------------|-----|------|
25+
| hpm5300evk | HPM5300EVK | HPM5361 | HPM5300 系列开发板 |
26+
| hpm5301evklite | HPM5301EVKLITE | HPM5301 | HPM5301精简版开发板 |
27+
| hpm5e00evk | HPM5E00EVK | HPM5E31 | HPM5E00 系列开发板 |
28+
| hpm6200evk | HPM6200EVK | HPM6200 | HPM6200 系列开发板 |
29+
| hpm6300evk | HPM6300EVK | HPM6360 | HPM6300 系列开发板,支持以太网 |
30+
| hpm6750evk | HPM6750EVK | HPM6750 | HPM6750 系列开发板,双核 RISC-V |
31+
| hpm6750evk2 | HPM6750EVK2 | HPM6750 | HPM6750 系列第二代开发板 |
32+
| hpm6750evkmini | HPM6750EVKMINI | HPM6750 | HPM6750 系列迷你开发板 |
33+
| hpm6800evk | HPM6800EVK | HPM6800 | HPM6800 系列开发板 |
34+
| hpm6e00evk | HPM6E00EVK | HPM6E00 | HPM6E00 系列开发板 |
35+
| hpm6p00evk | HPM6P00EVK | HPM6P00 | HPM6P00 系列开发板 |
36+
37+
## 快速开始指南
38+
39+
### 前提条件
40+
41+
在开始使用任何 HPMicro BSP 之前,您需要准备以下开发环境:
42+
43+
#### 1. RT-Thread ENV
44+
- 下载并安装 [RT-Thread ENV](https://www.rt-thread.org/download.html#download-rt-thread-env-tool)
45+
46+
#### 2. RISC-V 工具链
47+
- 下载 RISC-V 工具链:[riscv32-gnu-toolchain](https://github.com/helloeagleyang/riscv32-gnu-toolchain-win/archive/2022.04.12.zip)
48+
- 解压到指定目录,例如:`C:\DevTools\riscv32-gnu-toolchain`
49+
- 设置环境变量 `RTT_RISCV_TOOLCHAIN``<TOOLCHAIN_DIR>\bin`
50+
- 例如:`C:\DevTools\riscv32-gnu-toolchain\bin`
51+
52+
#### 3. HPMicro 专用 OpenOCD
53+
- 下载 OpenOCD:[rtt-debugger-support-package](https://github.com/hpmicro/rtt-debugger-support-package/archive/v0.4.0.zip)
54+
- 解压到指定目录,例如:`C:\DevTools\openocd-hpmicro`
55+
- 设置环境变量 `OPENOCD_HPMICRO``<OPENOCD_HPMICRO_DIR>\bin`
56+
- 例如:`C:\DevTools\openocd-hpmicro\bin`
57+
58+
### 使用特定 BSP 开始
59+
60+
1. **导航到所需的 BSP 目录**
61+
```bash
62+
cd rt-thread/bsp/hpmicro/<bsp_name>
63+
```
64+
65+
2. **配置项目**
66+
- 打开 RT-Thread ENV 命令行
67+
- 切换到 BSP 目录
68+
- 运行 `menuconfig` 来配置项目
69+
70+
3. **构建项目**
71+
```bash
72+
scons -jN # N 等于 CPU 核心数
73+
```
74+
75+
4. **硬件连接**
76+
- 将 BOOT 引脚切换到 2'b00
77+
- 通过 TYPE-C 线缆将 `PWR_DEBUG` 端口连接到 PC
78+
79+
5. **下载和调试**
80+
- 使用提供的 OpenOCD 脚本进行下载和调试
81+
- 参考各个 BSP 的 README 文件获取具体命令
82+
83+
### 运行结果
84+
85+
项目成功下载后,系统会自动运行。开发板上的 LED 会周期性闪烁。
86+
87+
将开发板的串口连接到 PC,通过串口终端工具(115200-8-1-N)与其通信。重置开发板后,将观察到 RT-Thread 的启动信息:
88+
89+
```
90+
\ | /
91+
- RT - Thread Operating System
92+
/ | \ 5.2.2 build Aug 16 2025 18:18:18
93+
2006 - 2025 Copyright by RT-Thread team
94+
msh >
95+
```
96+
97+
## 通用外设支持
98+
99+
大多数 HPMicro BSP 支持以下外设:
100+
101+
| **板载外设** | **支持** | **备注** |
102+
| ------------ | -------- | -------- |
103+
| USB || |
104+
| QSPI Flash || |
105+
| GPIO || |
106+
| SPI || |
107+
| I2C || |
108+
| UART || |
109+
| PWM || |
110+
| RTC || |
111+
| 板载调试器 || ft2232 |
112+
113+
根据特定开发板,可能支持其他外设:
114+
- **以太网**:在如下开发板上可用
115+
- HPM6300EVK
116+
- HPM6750EVK
117+
- HPM6750EVK2
118+
- HPM6750EVKMINI + ART-Pi Industry IO 扩展板
119+
- HPM6800EVK
120+
- HPM6E00EVK
121+
- HPM6P00EVK
122+
- HPM5E00EVK
123+
- **CAN**:HPM5300EVK、HPM6750系列开发板,HPM6300EVK,HPM6800EVK, HPM6E00EVK, HPM6P00EVK 和HPM5E00EVK
124+
- **SDIO**:HPM6300EVK、HPM6750EVK 系列可用
125+
- **显示/音频**:HPM6750EVK 系列可用
126+
127+
## 开发环境设置
128+
129+
### 使用命令行工具
130+
131+
1. 按照前提条件部分所述设置环境变量
132+
2. 使用 `scons` 进行构建
133+
3. 使用 OpenOCD 和 GDB 进行调试
134+
135+
## 各个 BSP 文档
136+
137+
每个 BSP 都包含自己的详细 README 文件,内容包括:
138+
- 特定开发板的硬件信息
139+
- 外设配置详情
140+
- 具体的下载和调试命令
141+
- 高级功能和示例
142+
143+
请参考各个 BSP 目录获取详细文档:
144+
- `hpm5300evk/README.md`
145+
- `hpm5301evklite/README.md`
146+
- `hpm5e00evk/README.md`
147+
- `hpm6200evk/README.md`
148+
- `hpm6300evk/README.md`
149+
- `hpm6750evk/README.md`
150+
- `hpm6750evk2/README.md`
151+
- `hpm6750evkmini/README.md`
152+
- `hpm6800evk/README.md`
153+
- `hpm6e00evk/README.md`
154+
- `hpm6p00evk/README.md`
155+
156+
## 故障排除
157+
158+
### 常见问题
159+
160+
1. **找不到工具链**:确保 `RTT_RISCV_TOOLCHAIN` 环境变量设置正确
161+
2. **OpenOCD 连接失败**:检查 USB 连接和驱动程序安装
162+
3. **构建错误**:验证所有依赖项已安装且环境变量已设置
163+
4. **串口通信问题**:检查波特率(115200)和 COM 端口设置
164+
165+
### 获取帮助
166+
167+
- 查看各个 BSP 的 README 文件了解特定开发板的问题
168+
- 访问 [RT-Thread 社区](https://club.rt-thread.org/)
169+
- 参考 [RT-Thread 文档](https://www.rt-thread.org/document/site/)
170+
171+
## 参考资料
172+
173+
- [RT-Thread 文档中心](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/README)
174+
- [RT-Thread ENV](https://github.com/RT-Thread/rtthread-manual-doc/blob/master/env/env.md)
175+
- [HPMicro 官方网站](https://www.hpmicro.com/)
176+
- [HPMicro SDK 文档](https://hpmicro.github.io/)
177+
- [RISC-V 工具链](https://github.com/riscv/riscv-gnu-toolchain)
178+
179+
## 贡献
180+
181+
欢迎对增强现有 BSP 或添加新 BSP 做出贡献。请遵循 RT-Thread 贡献指南,确保您的 BSP 符合项目标准。
182+
183+
为 HPMicro BSP 做出贡献:
184+
1. Fork `RT-Thread` 仓库
185+
2. 创建功能分支
186+
3. 按照现有代码风格进行更改
187+
4. 彻底测试您的更改
188+
5. 提交带有清晰描述的拉取请求
189+
190+
## 许可证
191+
192+
此 BSP 在 [RT-Thread 许可证](https://github.com/RT-Thread/rt-thread/blob/master/LICENSE) 下发布。

0 commit comments

Comments
 (0)