Skip to content

Commit 737ae54

Browse files
authored
[bsp][gd32]:gd32vw553h-eval add wifi support#11175
1 parent 196477d commit 737ae54

26 files changed

+856
-111
lines changed

bsp/gd32/risc-v/gd32vw553h-eval/.ci/attachconfig/ci.attachconfig.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ devices.i2c:
1919
- CONFIG_BSP_HW_I2C1_PIN_PB12_PB13=y
2020
- CONFIG_BSP_HW_I2C1_CLK=100
2121

22+
devices.wlan:
23+
kconfig:
24+
- CONFIG_BSP_USING_WLAN=y
25+
- CONFIG_RT_NAME_MAX=24
26+
- CONFIG_RT_WLAN_PROT_ENABLE=n
27+
- CONFIG_RT_USING_LWIP212=y
28+
29+
30+
2231
# ------ peripheral CI ------
2332
peripheral.at24c02:
2433
kconfig:

bsp/gd32/risc-v/gd32vw553h-eval/README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,51 @@ msh >
170170

171171
完成上述配置后即可点击调试选项进行调试,调试时boot管脚均置为低电平即可,调试时同样会进行固件下载。
172172

173-
## 4 注意事项
173+
## 4.WIFI使用
174+
175+
使用ENV,menuconfig,修改和使能下面的配置
176+
177+
* 修改 RT_NAME_MAX为24
178+
179+
![image-20260205145545039](figures/image-20260205145545039.png)
180+
181+
* 使能 BSP_USING_WLAN
182+
183+
![image-20260205145642371](figures/image-20260205145642371.png)
184+
185+
* 修改LWIP的版本为V2.1.2
186+
187+
![image-20260205145806668](figures/image-20260205145806668.png)
188+
189+
* 关闭 RT_WLAN_PROT_ENABLE
190+
191+
![image-20260205145856756](figures/image-20260205145856756.png)
192+
193+
进行编译 scons -jx ,下载。
194+
195+
![image-20260205150826393](figures/image-20260205150826393.png)
196+
197+
可以使用help查看wifi指令,下面演示连接wifi以及ping
198+
199+
![image-20260205151251937](figures/image-20260205151251937.png)
200+
201+
### 使用NETDEV
202+
203+
* 使能 RT_USING_NETDEV
204+
205+
![image-20260205151356304](figures/image-20260205151356304.png)
206+
207+
重新编译,下载。
208+
209+
* wifi 连接以及ping
210+
211+
![image-20260205151712234](figures/image-20260205151712234.png)
212+
213+
* ifconfig:
214+
215+
![image-20260205151644687](figures/image-20260205151644687.png)
216+
217+
## 5 注意事项
174218

175219
- Cortex-Debug插件优先选用v1.4.4版本,高版本可能会出现与GDB版本不匹配的问题。
176220

bsp/gd32/risc-v/gd32vw553h-eval/board/Kconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,34 @@ config SOC_GD32VW553H
1313

1414
menu "Onboard Peripheral Drivers"
1515

16+
menuconfig BSP_USING_WLAN
17+
bool "Enable WiFi (GD32VW553H Internal)"
18+
select RT_USING_WIFI
19+
select PKG_USING_GD32VW55X_WIFI
20+
select RT_USING_MEMHEAP
21+
select RT_USING_SYSTEM_WORKQUEUE
22+
default n
23+
24+
if BSP_USING_WLAN
25+
config BSP_WLAN_SSID_MAX_LENGTH
26+
int "WiFi SSID max length"
27+
range 1 32
28+
default 32
29+
30+
config BSP_WLAN_PASSWORD_MAX_LENGTH
31+
int "WiFi password max length"
32+
range 8 64
33+
default 64
34+
35+
config BSP_WLAN_SCAN_CACHE_NUM
36+
int "WiFi scan result cache number"
37+
range 4 32
38+
default 16
39+
40+
# Include GD32VW55x WIFI package configuration
41+
osource "$(BSP_DIR)/packages/gd32vw55x-wifi/Kconfig"
42+
endif
43+
1644
endmenu
1745

1846
menu "On-chip Peripheral Drivers"

bsp/gd32/risc-v/gd32vw553h-eval/board/SConscript

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ board.c
1212
trap_gcc.S
1313
''')
1414

15+
# add WiFi driver
16+
if GetDepend(['BSP_USING_WLAN']):
17+
src += ['drv_wlan.c']
18+
src += ['wifi.c']
19+
1520
path = [cwd]
1621

1722
# add startup txt path
1823
startup_path_prefix = os.getcwd() + '/../'
1924

2025
if rtconfig.PLATFORM in ['gcc']:
26+
# Use standard peripheral library startup files for compatibility
2127
src += [startup_path_prefix + '/packages/gd32-riscv-series-latest/GD32VW55x/RISCV/env_Eclipse/start.S']
2228
src += [startup_path_prefix + '/packages/gd32-riscv-series-latest/GD32VW55x/RISCV/env_Eclipse/entry.S']
2329

0 commit comments

Comments
 (0)