Skip to content

Commit f3bf126

Browse files
committed
[add] gd32w553
1 parent be6181a commit f3bf126

File tree

126 files changed

+58653
-1
lines changed

Some content is hidden

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

126 files changed

+58653
-1
lines changed

bsp/gd32/risc-v/gd32vw553h-eval/.config

Lines changed: 1405 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
mainmenu "RT-Thread Configuration"
2+
3+
BSP_DIR := .
4+
5+
RTT_DIR := ../../../..
6+
7+
PKGS_DIR := packages
8+
9+
source "$(RTT_DIR)/Kconfig"
10+
osource "$PKGS_DIR/Kconfig"
11+
rsource "../libraries/Kconfig"
12+
rsource "board/Kconfig"
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# GD32VF103V_EVAL开发板BSP说明
2+
3+
## 简介
4+
5+
GD32VW553H_EVAL是-兆易创新推出的一款GD32VW系列的评估板.
6+
7+
开发板外观如下图所示:
8+
9+
![board](figures/board.jpg)
10+
11+
该开发板常用 **板载资源** 如下:
12+
13+
- GD32VF103VBT6 ,主频 108MHz,128KB FLASH ,32KB RAM
14+
- 常用外设
15+
- LED :4个,LED1(PC0),LED2(PC2),LED3(PE0),LED4(PE1)
16+
- 按键:2个,K1(复位按键),K2(用户五向按键,PA0, PC13, PB14, PC5, PC4)
17+
- General TM * 4 、Advanced TM * 1、Basic TM * 2
18+
- 系统定时器 * 1
19+
- 看门狗 * 2
20+
- RTC * 1
21+
- USART * 3、UART * 2
22+
- I2C * 2、I2S * 2
23+
- SPI * 3
24+
- CAN2.0B * 2
25+
- USB2.0 OTG FS * 1
26+
- TFT-LCD
27+
- EXMC/SDRAM * 1
28+
- ADC * 2
29+
- DAC * 2
30+
- 最多支持80GPIOs
31+
- 调试接口:GD-Link/J-link
32+
33+
## 外设支持
34+
35+
本 BSP 目前对外设的支持情况如下:
36+
37+
| **片上外设** | **支持情况** | **备注** |
38+
|:--------- |:--------:|:------------------------------------- |
39+
| GPIO | 支持 | PA0, PA1... ---> PIN: 0, 1...79 |
40+
| UART | 支持 | UART0 - UART4 |
41+
| I2C | 支持 | I2C1 |
42+
| SPI | 支持 | SPI0 - SPI2 |
43+
| ADC | 支持 | ADC0 - ADC2 |
44+
| **扩展模块** | **支持情况** | **备注** |
45+
| 暂无 | 暂不支持 | 暂不支持 |
46+
47+
## 使用说明
48+
49+
使用说明分为如下两个章节:
50+
51+
- 快速上手
52+
53+
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
54+
55+
- 进阶使用
56+
57+
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
58+
59+
### 快速上手
60+
61+
本 BSP 为开发者提供 GCC 工程。下面介绍如何将系统运行起来。
62+
63+
#### 硬件连接
64+
65+
使用数据线连接开发板到 PC,使用USB转232连接USART0,打开电源开关。
66+
67+
#### 编译下载
68+
69+
在工程目录下输入`scons `命令编译工程,使用J-link/GD-Link下载程序到开发板。
70+
71+
#### 运行结果
72+
73+
下载程序成功之后,系统会自动运行,LED 闪烁。
74+
75+
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
76+
77+
```bash
78+
\ | /
79+
- RT - Thread Operating System
80+
/ | \ 4.1.1 build Jun 8 2022 00:49:01
81+
2006 - 2022 Copyright by RT-Thread team
82+
msh >
83+
```
84+
85+
### 进阶使用
86+
87+
此 BSP 默认只开启了 GPIO 和 串口0的功能,如果需使用高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
88+
89+
1. 在 bsp 下打开 env 工具。
90+
91+
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
92+
93+
3. 输入`pkgs --update`命令更新软件包。
94+
95+
4. 输入`scons `命令重新编译工程。
96+
97+
## 注意事项
98+
99+
暂无
100+
101+
## 联系人信息
102+
103+
维护人:
104+
105+
- [BruceOu](https://github.com/Ouxiaolong/), 邮箱:<[email protected]>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# for module compiling
2+
import os
3+
Import('RTT_ROOT')
4+
from building import *
5+
6+
cwd = str(Dir('#'))
7+
8+
objs = []
9+
list = os.listdir(cwd)
10+
11+
for d in list:
12+
path = os.path.join(cwd, d)
13+
if os.path.isfile(os.path.join(path, 'SConscript')):
14+
objs = objs + SConscript(os.path.join(d, 'SConscript'))
15+
16+
Return('objs')
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import os
2+
import sys
3+
import rtconfig
4+
5+
if os.getenv('RTT_ROOT'):
6+
RTT_ROOT = os.getenv('RTT_ROOT')
7+
else:
8+
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../../..')
9+
10+
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
11+
try:
12+
from building import *
13+
except:
14+
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
15+
print(RTT_ROOT)
16+
exit(-1)
17+
18+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
19+
20+
DefaultEnvironment(tools=[])
21+
env = Environment(tools = ['mingw'],
22+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24+
AR = rtconfig.AR, ARFLAGS = '-rc',
25+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
26+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
27+
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
28+
env['ASCOM'] = env['ASPPCOM']
29+
30+
Export('RTT_ROOT')
31+
Export('rtconfig')
32+
33+
SDK_ROOT = os.path.abspath('./')
34+
35+
if os.path.exists(SDK_ROOT + '/libraries'):
36+
libraries_path_prefix = SDK_ROOT + '/libraries'
37+
else:
38+
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
39+
40+
SDK_LIB = libraries_path_prefix
41+
Export('SDK_LIB')
42+
43+
# prepare building environment
44+
# objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
45+
objs = PrepareBuilding(env, RTT_ROOT)
46+
47+
gd32_library = 'GD32VW55x_Firmware_Library'
48+
rtconfig.BSP_LIBRARY_TYPE = gd32_library
49+
50+
# include libraries
51+
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
52+
53+
# include drivers
54+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
55+
56+
# make a building
57+
DoBuilding(TARGET, objs)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Import('RTT_ROOT')
2+
Import('rtconfig')
3+
from building import *
4+
5+
cwd = GetCurrentDir()
6+
src = Glob('*.c')
7+
CPPPATH = [cwd, ]
8+
9+
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
10+
11+
Return('group')

0 commit comments

Comments
 (0)