Skip to content

Commit 94cbf5b

Browse files
committed
[bsp][gd32] add eth device for gd32f527;
1 parent 5b99f61 commit 94cbf5b

File tree

5 files changed

+703
-2
lines changed

5 files changed

+703
-2
lines changed

bsp/gd32/arm/gd32527I-eval/board/Kconfig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ menu "On-chip Peripheral Drivers"
377377
bool "Enable SDRAM"
378378
select RT_USING_SDRAM
379379
default n
380-
380+
381381
menuconfig BSP_USING_CAN
382382
bool "Enable CAN BUS"
383383
default n
@@ -421,6 +421,11 @@ menu "On-chip Peripheral Drivers"
421421

422422
endif
423423

424+
config BSP_USING_ETH
425+
bool "Enable Ethernet"
426+
default n
427+
select RT_USING_LWIP
428+
424429
source "$(BSP_DIR)/../libraries/gd32_drivers/Kconfig"
425430

426431
endmenu

bsp/gd32/arm/gd32527I-eval/board/gd32f5xx_libopt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "gd32f5xx_dbg.h"
2121
#include "gd32f5xx_dci.h"
2222
#include "gd32f5xx_dma.h"
23-
//#include "gd32f5xx_enet.h"
23+
#include "gd32f5xx_enet.h"
2424
#include "gd32f5xx_exmc.h"
2525
#include "gd32f5xx_exti.h"
2626
#include "gd32f5xx_fmc.h"

bsp/gd32/arm/libraries/gd32_drivers/SConscript

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ if GetDepend('RT_USING_CAN'):
6464
if GetDepend('BSP_USING_SDRAM'):
6565
src += ['drv_sdram.c']
6666

67+
# add eth drivers.
68+
if GetDepend(['BSP_USING_ETH', 'RT_USING_LWIP']):
69+
src += ['drv_eth.c']
70+
6771
path = [cwd]
6872

6973
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)

0 commit comments

Comments
 (0)