• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..21-Aug-2025-

applications/21-Aug-2025-

board/21-Aug-2025-

figures/21-Aug-2025-

startup/21-Aug-2025-

.config A D21-Aug-202545.8 KiB1,3991,293

Kconfig A D21-Aug-2025216 138

README.md A D21-Aug-20254.8 KiB11477

README_zh.md A D21-Aug-20254.6 KiB

SConscript A D21-Aug-2025356 1813

SConstruct A D21-Aug-20252.1 KiB7655

rtconfig.h A D21-Aug-20257.9 KiB40373

rtconfig.py A D21-Aug-20253.8 KiB11791

README.md

1# HPMicro HPM6200EVK BSP(Board Support Package) Introduction
2
3[中文页](README_zh.md) |
4
5## Introduction
6
7This document provides brief introduction of the BSP (board support package) for the HPM6200EVK development board.
8
9The document consists of the following parts:
10
11- HPM6200EVK Board Resources Introduction
12- Quickly Getting Started
13- Refreences
14
15By reading the Quickly Get Started section developers can quickly get their hands on this BSP and run RT-Thread on the board. More advanced features will be introduced in the Advanced Features section to help developers take advantage of RT-Thread to drive more on-board resources.
16
17## Board Resources Introduction
18
19HPM6200EVK is a development board based on the RISC-V core launched by HPMicro, with rich on-board resources and on-chip resources for motor control, etc.
20![board](figures/board.png)
21
22
23## Peripheral Condition
24
25Each peripheral supporting condition for this BSP is as follows:
26
27
28| **On-board Peripherals** | **Support** | **Note**                              |
29| ------------------------ | ----------- | ------------------------------------- |
30| USB                      | √           |                                       |
31| QSPI Flash               | √           |                                       |
32| GPIO                     | √           |                                       |
33| SPI                      | √           |                                       |
34| I2C                      | √           |                                       |
35| RTC                      | √           |                                       |
36| PWM                      | √           |                                       |
37| On-Board Debugger        | √           | ft2232                                |
38
39
40## Execution Instruction
41
42### Quickly Getting Started
43
44The BSP support being build via the 'scons' command, below is the steps of compiling the example via the 'scons' command
45
46#### Parpare Environment
47- Step 1: Prepare [RT-Thread ENV](https://www.rt-thread.org/download.html#download-rt-thread-env-tool)
48- Step 2: Prepare [toolcahin](https://github.com/helloeagleyang/riscv32-gnu-toolchain-win/archive/2022.04.12.zip)
49    - Download the package and extract it into a specified directory, for example: `C:\DevTools\riscv32-gnu-toolchain`
50- Step 3: Set environment variable `RTT_RISCV_TOOLCHAIN` to `<TOOLCHAIN_DIR>\bin`
51    - For example: `C:\DevTools\riscv32-gnu-toolchain\bin`
52- Step 4: Prepare [OpenOCD](https://github.com/hpmicro/rtt-debugger-support-package/archive/v0.4.0.zip)
53  - Download and extract it to specified directory, for example: `C:\DevTools\openocd-hpmicro`
54  - Add `OpenOCD` environment variable `OPENOCD_HPMICRO` to `<OPENOCD_HPMICRO_DIR>\bin`
55    - For example: `C:\DevTools\openocd-hpmicro\bin`
56
57#### Configure and Build project
58
59Open RT-Thread ENV command-line, and change directory to this BSP directory, then users can:
60
61- Configure the project via `menuconfig` in `RT-Thread ENV`
62- Build the project using `scons -jN`, `N` equals to the number of CPU cores
63- Clean the project using `scons -c`
64
65#### Hardware Connection
66
67- Switch BOOT pin to 2'b00
68- Connect the `PWR_DEBUG` port to PC via TYPE-C cable
69
70
71#### Dowload / Debug
72
73- Users can download the project via the below command:
74  ```console
75  %OPENOCD_HPMICRO%\openocd.exe -f boards\debug_scripts\probes\ft2232.cfg -f boards\debug_scripts\soc\hpm6280-single-core.cfg -f boards\debug_scripts\boards\hpm6200evk.cfg -c "init; halt; flash write_image erase rtthread.elf; reset; shutdown"
76  ```
77
78- Users can debug the project via the below command:
79
80  - Connect debugger via `OpenOCD`:
81
82```console
83%OPENOCD_HPMICRO%\openocd.exe -f boards\debug_scripts\probes\ft2232.cfg -f boards\debug_scripts\soc\hpm6280-single-core.cfg -f boards\debug_scripts\boards\hpm6200evk.cfg
84```
85  - Start Debugger via `GDB`:
86
87```console
88%RTT_EXEC_PATH%\riscv32-unknown-elf-gdb.exe rtthread.elf
89```
90  - In the `gdb shell`, type the following commands:
91
92```console
93load
94c
95```
96
97### **Running Results**
98
99Once the project is successfully downloaded, the system runs automatically. The LED on the board will flash periodically.
100
101Connect 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:
102
103```
104 \ | /
105- RT -     Thread Operating System
106 / | \     5.0.1 build Aug 16 2023 18:18:18
107 2006 - 2023 Copyright by RT-Thread team
108```
109
110## **References**
111
112- [RT-Thread Documnent Center](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/README)
113- [RT-Thread Env](https://github.com/RT-Thread/rtthread-manual-doc/blob/master/env/env.md)
114- [HPM6200EVK RT-Thread BSP Package](https://github.com/hpmicro/rtt-bsp-hpm6200evk)