bsp/gd32: Separate gd32 std drivers

This commit is contained in:
zhangshuxun
2025-07-01 09:43:14 +08:00
committed by Rbb666
parent 1afed1b782
commit f05dac9644
1071 changed files with 25036 additions and 436635 deletions
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M3=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -616,6 +624,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +721,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +845,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +860,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -949,6 +982,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_MULTI_INFRARED is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F10x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F10x=y
CONFIG_SOC_GD32103V=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F10x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_hd.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_hd.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_hd.s']
CPPDEFINES = ['GD32F10X_HD']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+65 -58
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__CLK_TCK=RT_TICK_PER_SECOND, RT_USING_ARMLIBC, __RTTHREAD__, __STDC_LIMIT_MACROS, RT_USING_LIBC, USE_STDPERIPH_DRIVER, GD32F10X_HD</Define>
<Define>RT_USING_LIBC, RT_USING_ARMLIBC, __RTTHREAD__, USE_STDPERIPH_DRIVER, __STDC_LIMIT_MACROS, __CLK_TCK=RT_TICK_PER_SECOND, GD32F10X_HD</Define>
<Undefine />
<IncludePath>..\libraries\gd32_drivers;..\..\..\..\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\drivers\include;..\libraries\GD32F10x_Firmware_Library\CMSIS;..\..\..\..\components\libc\posix\ipc;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\compilers\common\include;..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\phy;..\..\..\..\components\finsh;board;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include;applications;..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Include;..\..\..\..\components\drivers\smp_call;..\..\..\..\libcpu\arm\common;..\..\..\..\components\drivers\include;.</IncludePath>
<IncludePath>applications;..\..\..\..\components\libc\compilers\common\extension;packages\gd32-arm-cmsis-latest\GD32F10x;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\finsh;board;..\..\..\..\components\libc\posix\io\epoll;packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Include;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\phy;..\libraries\gd32_drivers;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\include;..\..\..\..\libcpu\arm\common;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Include;..\..\..\..\components\drivers\include;.;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\posix\io\eventfd</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f10x_hd.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\ARM\startup_gd32f10x_hd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -746,13 +739,6 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
@@ -762,16 +748,23 @@
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
</Group>
@@ -1065,6 +1058,20 @@
</Group>
<Group>
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
@@ -1086,23 +1093,16 @@
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1134,46 +1134,53 @@
</Group>
<Group>
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>startup_gd32f10x_hd.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\ARM\startup_gd32f10x_hd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f10x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M3
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F10x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F10x
#define SOC_GD32103V
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M3=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -616,6 +624,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +721,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +845,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +860,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -949,6 +982,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_MULTI_INFRARED is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F10x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F10x=y
CONFIG_SOC_GD32105V=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F10x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_cl.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s']
CPPDEFINES = ['GD32F10X_CL']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+73 -66
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__RTTHREAD__, USE_STDPERIPH_DRIVER, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, __STDC_LIMIT_MACROS, GD32F10X_CL, RT_USING_ARMLIBC</Define>
<Define>__RTTHREAD__, RT_USING_LIBC, USE_STDPERIPH_DRIVER, RT_USING_ARMLIBC, GD32F10X_CL, __CLK_TCK=RT_TICK_PER_SECOND, __STDC_LIMIT_MACROS</Define>
<Undefine />
<IncludePath>..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\drivers\smp_call;..\..\..\..\libcpu\arm\common;.;..\..\..\..\components\drivers\include;..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Include;applications;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\include;..\..\..\..\components\drivers\include;..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Include;..\..\..\..\components\drivers\include;board;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\libc\compilers\common\extension;..\libraries\gd32_drivers;..\libraries\GD32F10x_Firmware_Library\CMSIS;..\..\..\..\components\drivers\include;..\..\..\..\components\finsh;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\drivers\phy;..\..\..\..\components\drivers\include</IncludePath>
<IncludePath>applications;..\..\..\..\components\libc\posix\ipc;..\..\..\..\libcpu\arm\common;..\libraries\gd32_drivers;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\compilers\common\extension;.;..\..\..\..\components\drivers\phy;..\..\..\..\components\drivers\include;..\..\..\..\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\compilers\common\include;packages\gd32-arm-cmsis-latest\GD32F10x;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Include;..\..\..\..\components\drivers\include;board;packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\finsh</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f10x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\ARM\startup_gd32f10x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -748,16 +741,9 @@
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
@@ -769,9 +755,16 @@
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
</Group>
@@ -1072,13 +1065,6 @@
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
@@ -1086,13 +1072,6 @@
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
@@ -1100,9 +1079,30 @@
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
<FileName>startup_gd32f10x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\ARM\startup_gd32f10x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f10x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M3
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F10x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F10x
#define SOC_GD32105V
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M3=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -616,6 +624,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +721,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +845,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +860,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -949,6 +982,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_MULTI_INFRARED is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F10x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F10x=y
CONFIG_SOC_GD32105R=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F10x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_cl.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s']
CPPDEFINES = ['GD32F10X_CL']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+52 -45
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__RTTHREAD__, USE_STDPERIPH_DRIVER, GD32F10X_CL, RT_USING_ARMLIBC, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, __STDC_LIMIT_MACROS</Define>
<Define>__STDC_LIMIT_MACROS, __RTTHREAD__, RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, GD32F10X_CL, USE_STDPERIPH_DRIVER</Define>
<Undefine />
<IncludePath>..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\drivers\smp_call;..\libraries\gd32_drivers;..\libraries\GD32F10x_Firmware_Library\CMSIS;..\..\..\..\components\drivers\phy;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Include;..\..\..\..\components\libc\posix\io\epoll;..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Include;.;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\finsh;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\libc\posix\ipc;applications;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;..\..\..\..\include;board</IncludePath>
<IncludePath>applications;..\..\..\..\components\drivers\phy;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\finsh;..\..\..\..\components\drivers\include;..\libraries\gd32_drivers;packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Include;packages\gd32-arm-cmsis-latest\GD32F10x;..\..\..\..\components\libc\posix\io\poll;.;..\..\..\..\include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Include;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;board;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\libc\posix\ipc;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f10x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\ARM\startup_gd32f10x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -748,9 +741,9 @@
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>shell.c</FileName>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
@@ -762,16 +755,16 @@
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
</Group>
@@ -1074,16 +1067,16 @@
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
@@ -1103,6 +1096,13 @@
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f10x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
<FileName>startup_gd32f10x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\ARM\startup_gd32f10x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f10x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M3
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F10x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F10x
#define SOC_GD32105R
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M3=y
#
# RT-Thread Components
#
@@ -491,6 +498,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -622,6 +630,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -718,6 +727,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -841,6 +851,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -854,6 +866,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -955,6 +988,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_MULTI_INFRARED is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
@@ -1053,6 +1087,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1087,6 +1122,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1363,10 +1399,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F10x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F10x=y
CONFIG_SOC_GD32107V=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F10x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_cl.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s']
CPPDEFINES = ['GD32F10X_CL']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+64 -57
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__STDC_LIMIT_MACROS, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_ARMLIBC, RT_USING_LIBC, GD32F10X_CL, USE_STDPERIPH_DRIVER</Define>
<Define>__STDC_LIMIT_MACROS, __RTTHREAD__, RT_USING_LIBC, GD32F10X_CL, USE_STDPERIPH_DRIVER, RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND</Define>
<Undefine />
<IncludePath>..\..\..\..\components\drivers\spi;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\common;..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\drivers\phy;board;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\finsh;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\libraries\GD32F10x_Firmware_Library\CMSIS;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\cortex-m3;applications;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\libc\posix\io\poll;..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Include;..\..\..\..\components\drivers\include;..\..\..\..\include;..\libraries\gd32_drivers;.</IncludePath>
<IncludePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Include;board;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\io\epoll;packages\gd32-arm-cmsis-latest\GD32F10x;..\..\..\..\components\drivers\include;packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\spi;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\posix\ipc;..\libraries\gd32_drivers;applications;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;..\..\..\..\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include;..\..\..\..\components\finsh;..\..\..\..\libcpu\arm\cortex-m3;.</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -760,13 +760,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f10x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\ARM\startup_gd32f10x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -798,13 +791,6 @@
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
@@ -819,6 +805,13 @@
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Kernel</GroupName>
@@ -1110,13 +1103,6 @@
</Group>
<Group>
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
@@ -1124,13 +1110,6 @@
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
@@ -1138,6 +1117,13 @@
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
@@ -1145,9 +1131,23 @@
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1181,51 +1181,58 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_spi.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_spi.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
<FileName>startup_gd32f10x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\ARM\startup_gd32f10x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f10x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\CMSIS\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F10x\GD\GD32F10x\Source\system_gd32f10x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F10x_Firmware_Library\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_spi.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_spi.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f10x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F10x\GD32F10x_standard_peripheral\Source\gd32f10x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M3
/* RT-Thread Components */
@@ -305,6 +310,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -384,10 +401,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F10x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F10x
#define SOC_GD32107V
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M3=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -616,6 +624,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +721,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +845,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +860,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -949,6 +982,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_MULTI_INFRARED is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F20x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F20x=y
CONFIG_SOC_GD32205R=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F20x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/GCC/startup_gd32f20x_cl.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/ARM/startup_gd32f20x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/IAR/startup_gd32f20x_cl.s']
CPPDEFINES = ['GD32F20X_CL']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+53 -46
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>GD32F20X_CL, __STDC_LIMIT_MACROS, RT_USING_ARMLIBC, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, USE_STDPERIPH_DRIVER</Define>
<Define>__RTTHREAD__, USE_STDPERIPH_DRIVER, RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND, __STDC_LIMIT_MACROS, GD32F20X_CL, RT_USING_LIBC</Define>
<Undefine />
<IncludePath>board;..\libraries\gd32_drivers;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\ipc;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\drivers\smp_call;..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Include;..\..\..\..\include;..\..\..\..\components\libc\compilers\common\extension;applications;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\finsh;..\libraries\GD32F20x_Firmware_Library\CMSIS;.;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\libraries\GD32F20x_Firmware_Library\CMSIS\GD\GD32F20x\Include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include</IncludePath>
<IncludePath>..\..\..\..\components\finsh;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\posix\ipc;..\..\..\..\include;packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Include;..\..\..\..\components\libc\posix\io\eventfd;..\libraries\gd32_drivers;..\..\..\..\libcpu\arm\common;packages\gd32-arm-cmsis-latest\GD32F20x\GD\GD32F20x\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;applications;board;.;packages\gd32-arm-cmsis-latest\GD32F20x;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\phy</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f20x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\CMSIS\GD\GD32F20x\Source\ARM\startup_gd32f20x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -746,13 +739,6 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
@@ -762,16 +748,23 @@
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
</Group>
@@ -1067,16 +1060,16 @@
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>kerrno.c</FileName>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
@@ -1086,13 +1079,6 @@
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
@@ -1100,9 +1086,23 @@
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f20x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_exti.c</FilePath>
<FileName>startup_gd32f20x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F20x\GD\GD32F20x\Source\ARM\startup_gd32f20x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f20x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\CMSIS\GD\GD32F20x\Source\system_gd32f20x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F20x\GD\GD32F20x\Source\system_gd32f20x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_usart.c</FileName>
<FileName>gd32f20x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_usart.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_gpio.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_misc.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M3
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F20x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F20x
#define SOC_GD32205R
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M3=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -616,6 +624,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +721,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +845,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +860,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -949,6 +982,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_LEDBLINK is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_MULTI_INFRARED is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F20x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F20x=y
CONFIG_SOC_GD32207I=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F20x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/GCC/startup_gd32f20x_cl.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/ARM/startup_gd32f20x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/IAR/startup_gd32f20x_cl.s']
CPPDEFINES = ['GD32F20X_CL']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+53 -46
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__STDC_LIMIT_MACROS, USE_STDPERIPH_DRIVER, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_ARMLIBC, __RTTHREAD__, GD32F20X_CL, RT_USING_LIBC</Define>
<Define>RT_USING_LIBC, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND, GD32F20X_CL, RT_USING_ARMLIBC, USE_STDPERIPH_DRIVER, __STDC_LIMIT_MACROS</Define>
<Undefine />
<IncludePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Include;..\libraries\GD32F20x_Firmware_Library\CMSIS;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\finsh;..\..\..\..\components\libc\posix\ipc;applications;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\posix\io\epoll;.;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\drivers\include;..\..\..\..\include;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\libraries\gd32_drivers;board;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\common;..\..\..\..\components\drivers\smp_call;..\libraries\GD32F20x_Firmware_Library\CMSIS\GD\GD32F20x\Include</IncludePath>
<IncludePath>..\..\..\..\libcpu\arm\cortex-m3;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\libcpu\arm\common;packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\include;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\compilers\common\extension;packages\gd32-arm-cmsis-latest\GD32F20x\GD\GD32F20x\Include;.;..\libraries\gd32_drivers;..\..\..\..\components\libc\compilers\common\include;board;..\..\..\..\components\finsh;..\..\..\..\components\libc\posix\io\eventfd;packages\gd32-arm-cmsis-latest\GD32F20x;applications;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\phy;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f20x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\CMSIS\GD\GD32F20x\Source\ARM\startup_gd32f20x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -746,6 +739,13 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
@@ -767,13 +767,6 @@
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Kernel</GroupName>
@@ -1074,9 +1067,9 @@
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
@@ -1086,13 +1079,6 @@
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
@@ -1100,9 +1086,23 @@
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f20x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_misc.c</FilePath>
<FileName>startup_gd32f20x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F20x\GD\GD32F20x\Source\ARM\startup_gd32f20x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f20x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\CMSIS\GD\GD32F20x\Source\system_gd32f20x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F20x\GD\GD32F20x\Source\system_gd32f20x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_usart.c</FileName>
<FileName>gd32f20x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_usart.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F20x_Firmware_Library\GD32F20x_standard_peripheral\Source\gd32f20x_gpio.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f20x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F20x\GD32F20x_standard_peripheral\Source\gd32f20x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M3
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F20x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F20x
#define SOC_GD32207I
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -567,6 +575,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_3GPP_AMRNB is not set
# end of multimedia packages
@@ -616,6 +625,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +722,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +846,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +861,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F30x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F30x=y
CONFIG_SOC_GD32303C=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F30x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_xd.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_xd.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_xd.s']
CPPDEFINES = ['GD32F30X_XD']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+50 -43
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>RT_USING_LIBC, RT_USING_ARMLIBC, USE_STDPERIPH_DRIVER, __RTTHREAD__, __STDC_LIMIT_MACROS, GD32F30X_XD, __CLK_TCK=RT_TICK_PER_SECOND</Define>
<Define>RT_USING_ARMLIBC, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND, __STDC_LIMIT_MACROS, USE_STDPERIPH_DRIVER, GD32F30X_XD, RT_USING_LIBC</Define>
<Undefine />
<IncludePath>..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\compilers\common\include;.;..\..\..\..\components\drivers\include;..\..\..\..\include;..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Include;..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\libcpu\arm\common;applications;..\..\..\..\components\drivers\include;board;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\include;..\..\..\..\components\finsh;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\cortex-m4;..\libraries\gd32_drivers;..\libraries\GD32F30x_Firmware_Library\CMSIS</IncludePath>
<IncludePath>..\..\..\..\libcpu\arm\common;..\..\..\..\components\drivers\include;applications;..\..\..\..\components\drivers\include;..\..\..\..\include;packages\gd32-arm-cmsis-latest\GD32F30x;..\..\..\..\components\finsh;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Include;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\posix\io\epoll;board;..\..\..\..\components\drivers\include;.;..\..\..\..\components\drivers\smp_call;..\libraries\gd32_drivers;packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f30x_xd.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_xd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -746,13 +739,6 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
@@ -767,6 +753,13 @@
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
@@ -1072,6 +1065,13 @@
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
@@ -1093,16 +1093,16 @@
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
<FileName>startup_gd32f30x_xd.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\ARM\startup_gd32f30x_xd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f30x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F30x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F30x
#define SOC_GD32303C
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -567,6 +575,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_3GPP_AMRNB is not set
# end of multimedia packages
@@ -616,6 +625,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +722,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +846,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +861,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F30x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F30x=y
CONFIG_SOC_GD32303Z=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F30x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_hd.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_hd.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_hd.s']
CPPDEFINES = ['GD32F30X_HD']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+67 -60
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__CLK_TCK=RT_TICK_PER_SECOND, RT_USING_ARMLIBC, GD32F30X_HD, __STDC_LIMIT_MACROS, RT_USING_LIBC, USE_STDPERIPH_DRIVER, __RTTHREAD__</Define>
<Define>__CLK_TCK=RT_TICK_PER_SECOND, RT_USING_ARMLIBC, USE_STDPERIPH_DRIVER, GD32F30X_HD, __STDC_LIMIT_MACROS, RT_USING_LIBC, __RTTHREAD__</Define>
<Undefine />
<IncludePath>..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\compilers\common\extension;applications;..\..\..\..\components\libc\posix\io\epoll;..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Include;..\..\..\..\components\drivers\include;..\libraries\gd32_drivers;..\..\..\..\components\libc\posix\io\eventfd;..\libraries\GD32F30x_Firmware_Library\CMSIS;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\phy;..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\finsh;.;board;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\include;..\..\..\..\libcpu\arm\common</IncludePath>
<IncludePath>..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\posix\io\poll;packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Include;..\..\..\..\components\libc\compilers\common\extension;packages\gd32-arm-cmsis-latest\GD32F30x;board;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include;..\..\..\..\components\finsh;..\..\..\..\include;..\..\..\..\components\drivers\smp_call;..\libraries\gd32_drivers;..\..\..\..\components\libc\posix\ipc;..\..\..\..\libcpu\arm\common;packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\posix\io\epoll;.;..\..\..\..\libcpu\arm\cortex-m4;applications;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f30x_hd.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -746,13 +739,6 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
@@ -762,16 +748,23 @@
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
</Group>
@@ -1065,20 +1058,6 @@
</Group>
<Group>
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
@@ -1093,6 +1072,20 @@
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
@@ -1103,6 +1096,13 @@
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
<FileName>startup_gd32f30x_hd.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f30x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
</Group>
+50 -43
View File
@@ -334,9 +334,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, GD32F30X_HD, USE_STDPERIPH_DRIVER, RT_USING_ARMLIBC, __RTTHREAD__, __STDC_LIMIT_MACROS</Define>
<Define>RT_USING_LIBC, GD32F30X_HD, USE_STDPERIPH_DRIVER, RT_USING_ARMLIBC, __RTTHREAD__, __STDC_LIMIT_MACROS, __CLK_TCK=RT_TICK_PER_SECOND</Define>
<Undefine />
<IncludePath>..\..\..\..\components\drivers\phy;.;..\libraries\gd32_drivers;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\drivers\include;..\..\..\..\include;..\..\..\..\components\finsh;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\ipc;..\libraries\GD32F30x_Firmware_Library\CMSIS;..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Include;board;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\libcpu\arm\cortex-m4;..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;applications</IncludePath>
<IncludePath>..\..\..\..\components\libc\posix\io\epoll;.;applications;..\..\..\..\include;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\posix\ipc;board;packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Include;packages\gd32-arm-cmsis-latest\GD32F30x;..\..\..\..\components\finsh;packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\drivers\include;..\libraries\gd32_drivers;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -686,13 +686,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f30x_hd.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -710,20 +703,6 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
@@ -731,6 +710,13 @@
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
@@ -738,6 +724,13 @@
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Kernel</GroupName>
@@ -1031,16 +1024,23 @@
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>kerrno.c</FileName>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
@@ -1057,16 +1057,16 @@
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1100,44 +1100,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>system_gd32f30x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
<FileName>startup_gd32f30x_hd.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileName>system_gd32f30x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
</Group>
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F30x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F30x
#define SOC_GD32303Z
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -567,6 +575,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_3GPP_AMRNB is not set
# end of multimedia packages
@@ -616,6 +625,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +722,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +846,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +861,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F30x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F30x=y
CONFIG_SOC_GD32305R=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F30x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_cl.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_cl.s']
CPPDEFINES = ['GD32F30X_CL']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+49 -42
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, __STDC_LIMIT_MACROS, __RTTHREAD__, USE_STDPERIPH_DRIVER, RT_USING_ARMLIBC, GD32F30X_CL</Define>
<Define>RT_USING_ARMLIBC, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND, USE_STDPERIPH_DRIVER, __STDC_LIMIT_MACROS, RT_USING_LIBC, GD32F30X_CL</Define>
<Undefine />
<IncludePath>..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;board;..\..\..\..\include;applications;..\..\..\..\components\libc\posix\ipc;.;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Include;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\finsh;..\..\..\..\libcpu\arm\common;..\..\..\..\components\drivers\include;..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Include;..\..\..\..\components\drivers\smp_call;..\libraries\gd32_drivers;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\io\poll;..\libraries\GD32F30x_Firmware_Library\CMSIS;..\..\..\..\components\drivers\phy;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\drivers\include</IncludePath>
<IncludePath>..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\common;.;packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\finsh;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\libc\posix\io\eventfd;applications;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\posix\io\poll;packages\gd32-arm-cmsis-latest\GD32F30x;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\include;board;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\include;packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Include;..\libraries\gd32_drivers;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f30x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -746,6 +739,13 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
@@ -767,13 +767,6 @@
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Kernel</GroupName>
@@ -1067,16 +1060,16 @@
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
<Files>
@@ -1095,14 +1088,21 @@
</Files>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
<FileName>startup_gd32f30x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\ARM\startup_gd32f30x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f30x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F30x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F30x
#define SOC_GD32305R
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
#
# RT-Thread Components
#
@@ -485,6 +492,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -567,6 +575,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_3GPP_AMRNB is not set
# end of multimedia packages
@@ -616,6 +625,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -712,6 +722,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -835,6 +846,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -848,6 +861,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -1047,6 +1081,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1081,6 +1116,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1357,10 +1393,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F30x=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F30x=y
CONFIG_SOC_GD32307E=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F30x_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_cl.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_cl.s']
CPPDEFINES = ['GD32F30X_CL']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+60 -53
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>__RTTHREAD__, __STDC_LIMIT_MACROS, __CLK_TCK=RT_TICK_PER_SECOND, GD32F30X_CL, RT_USING_LIBC, RT_USING_ARMLIBC, USE_STDPERIPH_DRIVER</Define>
<Define>RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, USE_STDPERIPH_DRIVER, GD32F30X_CL, __STDC_LIMIT_MACROS, __RTTHREAD__</Define>
<Undefine />
<IncludePath>..\..\..\..\components\drivers\include;..\libraries\GD32F30x_Firmware_Library\CMSIS;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\finsh;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\drivers\include;..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Include;.;..\..\..\..\libcpu\arm\common;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\include;..\libraries\gd32_drivers;..\..\..\..\components\drivers\include;board;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\phy;applications;..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\smp_call;..\..\..\..\include</IncludePath>
<IncludePath>..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;applications;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension;packages\gd32-arm-cmsis-latest\GD32F30x;packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Include;..\libraries\gd32_drivers;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\finsh;..\..\..\..\components\libc\posix\ipc;.;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\drivers\include;board;..\..\..\..\components\drivers\phy;..\..\..\..\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\common;packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Include;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\io\poll</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -722,13 +722,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f30x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -746,20 +739,6 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
@@ -774,6 +753,20 @@
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Kernel</GroupName>
@@ -1074,9 +1067,9 @@
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
@@ -1095,14 +1088,21 @@
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1136,44 +1136,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
<FileName>startup_gd32f30x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\ARM\startup_gd32f30x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f30x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
</Group>
+59 -52
View File
@@ -334,9 +334,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>RT_USING_ARMLIBC, __RTTHREAD__, USE_STDPERIPH_DRIVER, __CLK_TCK=RT_TICK_PER_SECOND, GD32F30X_CL, __STDC_LIMIT_MACROS, RT_USING_LIBC</Define>
<Define>GD32F30X_CL, USE_STDPERIPH_DRIVER, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, RT_USING_ARMLIBC, __RTTHREAD__, __STDC_LIMIT_MACROS</Define>
<Undefine />
<IncludePath>..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\drivers\include;..\..\..\..\include;..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Include;applications;.;..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\libraries\gd32_drivers;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\drivers\smp_call;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\finsh;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\include;..\libraries\GD32F30x_Firmware_Library\CMSIS;..\..\..\..\components\drivers\phy;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;board;..\..\..\..\components\drivers\include</IncludePath>
<IncludePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Include;..\..\..\..\libcpu\arm\common;..\..\..\..\include;..\..\..\..\components\drivers\include;..\..\..\..\libcpu\arm\cortex-m4;packages\gd32-arm-cmsis-latest\GD32F30x;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\phy;applications;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\libc\posix\ipc;..\..\..\..\components\libc\posix\io\epoll;..\libraries\gd32_drivers;.;..\..\..\..\components\drivers\include;packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Include;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\finsh;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\drivers\include;board;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -686,13 +686,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f30x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -710,20 +703,6 @@
</Group>
<Group>
<GroupName>Finsh</GroupName>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>shell.c</FileName>
@@ -731,6 +710,13 @@
<FilePath>..\..\..\..\components\finsh\shell.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>cmd.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\cmd.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh.c</FileName>
@@ -738,6 +724,13 @@
<FilePath>..\..\..\..\components\finsh\msh.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>msh_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\components\finsh\msh_parse.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Kernel</GroupName>
@@ -1031,9 +1024,9 @@
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
@@ -1043,13 +1036,6 @@
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kerrno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
@@ -1064,9 +1050,23 @@
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstring.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1100,44 +1100,51 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
<FileName>startup_gd32f30x_cl.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\ARM\startup_gd32f30x_cl.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f30x.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\CMSIS\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F30x\GD\GD32F30x\Source\system_gd32f30x.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F30x_Firmware_Library\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f30x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F30x\GD32F30x_standard_peripheral\Source\gd32f30x_usart.c</FilePath>
</File>
</Files>
</Group>
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
@@ -304,6 +309,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -383,10 +400,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F30x
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F30x
#define SOC_GD32307E
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
#
# RT-Thread Components
#
@@ -489,6 +496,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -571,6 +579,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_3GPP_AMRNB is not set
# end of multimedia packages
@@ -620,6 +629,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -716,6 +726,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -839,6 +850,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -852,6 +865,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -1051,6 +1085,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1085,6 +1120,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1361,10 +1397,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F4xx=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F4xx=y
CONFIG_SOC_GD32407V=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F4xx_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/ARM/startup_gd32f4xx.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s']
CPPDEFINES = ['GD32F407','LCKFB_SKYSTART_GD32F407V']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
+66 -59
View File
@@ -370,9 +370,9 @@
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls />
<Define>USE_STDPERIPH_DRIVER, RT_USING_LIBC, __STDC_LIMIT_MACROS, LCKFB_SKYSTART_GD32F407V, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__, GD32F407, RT_USING_ARMLIBC</Define>
<Define>USE_STDPERIPH_DRIVER, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__, LCKFB_SKYSTART_GD32F407V, GD32F407, RT_USING_LIBC, __STDC_LIMIT_MACROS, RT_USING_ARMLIBC</Define>
<Undefine />
<IncludePath>board;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\epoll;..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Include;..\..\..\..\components\libc\posix\io\eventfd;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include;applications;..\..\..\..\components\drivers\phy;..\..\..\..\components\drivers\include;..\libraries\gd32_drivers;..\..\..\..\components\drivers\include;..\libraries\GD32F4xx_Firmware_Library\CMSIS;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\drivers\include;..\..\..\..\components\finsh;..\..\..\..\components\libc\compilers\common\include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\smp_call;..\..\..\..\include;..\..\..\..\components\libc\posix\ipc;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;.;..\libraries\GD32F4xx_Firmware_Library\CMSIS\GD\GD32F4xx\Include;..\..\..\..\components\libc\posix\io\poll</IncludePath>
<IncludePath>board;..\..\..\..\libcpu\arm\cortex-m4;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\include;..\libraries\gd32_drivers;packages\gd32-arm-cmsis-latest\GD32F4xx;..\..\..\..\components\libc\posix\io\poll;..\..\..\..\components\libc\posix\io\eventfd;applications;..\..\..\..\components\drivers\phy;packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Include;packages\gd32-arm-cmsis-latest\GD32F4xx\GD\GD32F4xx\Include;..\..\..\..\components\drivers\include;..\..\..\..\components\drivers\smp_call;..\..\..\..\components\libc\posix\ipc;..\..\..\..\include;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\posix\io\epoll;..\..\..\..\libcpu\arm\common;..\..\..\..\components\libc\compilers\common\include;.;..\..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\..\components\finsh;..\..\..\..\components\drivers\include;..\..\..\..\components\libc\compilers\common\extension;..\..\..\..\components\drivers\include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -779,13 +779,6 @@
<FilePath>board\board.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>startup_gd32f4xx.s</FileName>
<FileType>2</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\CMSIS\GD\GD32F4xx\Source\ARM\startup_gd32f4xx.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>drv_gpio.c</FileName>
@@ -1122,6 +1115,13 @@
</Group>
<Group>
<GroupName>klibc</GroupName>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstring.c</FileName>
@@ -1136,20 +1136,6 @@
<FilePath>..\..\..\..\src\klibc\kerrno.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsscanf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\rt_vsscanf.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>rt_vsnprintf_tiny.c</FileName>
@@ -1157,9 +1143,23 @@
<FilePath>..\..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>kstdio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\src\klibc\kstdio.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>libcpu</GroupName>
<Files>
<File>
<FileName>atomic_arm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\libcpu\arm\common\atomic_arm.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>div0.c</FileName>
@@ -1193,65 +1193,72 @@
<GroupName>Libraries</GroupName>
<Files>
<File>
<FileName>gd32f4xx_i2c.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_i2c.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_syscfg.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_syscfg.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_dma.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_dma.c</FilePath>
<FileName>startup_gd32f4xx.s</FileName>
<FileType>2</FileType>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F4xx\GD\GD32F4xx\Source\ARM\startup_gd32f4xx.s</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>system_gd32f4xx.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\CMSIS\GD\GD32F4xx\Source\system_gd32f4xx.c</FilePath>
<FilePath>packages\gd32-arm-cmsis-latest\GD32F4xx\GD\GD32F4xx\Source\system_gd32f4xx.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_rcu.c</FileName>
<FileName>gd32f4xx_dma.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_usart.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_dma.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_exti.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_exti.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\libraries\GD32F4xx_Firmware_Library\GD32F4xx_standard_peripheral\Source\gd32f4xx_gpio.c</FilePath>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_gpio.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_i2c.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_i2c.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_misc.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_misc.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_rcu.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_syscfg.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_syscfg.c</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>gd32f4xx_usart.c</FileName>
<FileType>1</FileType>
<FilePath>packages\gd32-arm-series-latest\GD32F4xx\GD32F4xx_standard_peripheral\Source\gd32f4xx_usart.c</FilePath>
</File>
</Files>
</Group>
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
@@ -306,6 +311,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -385,10 +402,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F4xx
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F4xx
#define SOC_GD32407V
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -184,6 +185,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
#
# RT-Thread Components
#
@@ -489,6 +496,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -571,6 +579,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_3GPP_AMRNB is not set
# end of multimedia packages
@@ -620,6 +629,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -716,6 +726,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -839,6 +850,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -852,6 +865,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -1051,6 +1085,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1085,6 +1120,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1361,10 +1397,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F4xx=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F4xx=y
CONFIG_SOC_GD32407V=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F4xx_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/ARM/startup_gd32f4xx.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s']
CPPDEFINES = ['GD32F407']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -105,6 +105,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
@@ -306,6 +311,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -385,10 +402,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F4xx
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F4xx
#define SOC_GD32407V
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
+39 -1
View File
@@ -111,6 +111,7 @@
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
@@ -187,6 +188,12 @@ CONFIG_RT_VER_NUM=0x50201
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
# end of RT-Thread Kernel
CONFIG_RT_USING_HW_ATOMIC=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
#
# RT-Thread Components
#
@@ -501,6 +508,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_QMODBUS is not set
# CONFIG_PKG_USING_PNET is not set
# CONFIG_PKG_USING_OPENER is not set
# CONFIG_PKG_USING_FREEMQTT is not set
# end of IoT - internet of things
#
@@ -583,6 +591,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_3GPP_AMRNB is not set
# end of multimedia packages
@@ -632,6 +641,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_RT_TRACE is not set
# CONFIG_PKG_USING_ZDEBUG is not set
# CONFIG_PKG_USING_RVBACKTRACE is not set
# CONFIG_PKG_USING_HPATCHLITE is not set
@@ -728,6 +738,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_RMP is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set
# CONFIG_PKG_USING_HEARTBEAT is not set
# CONFIG_PKG_USING_MICRO_ROS_RTTHREAD_PACKAGE is not set
# end of system packages
#
@@ -851,6 +862,8 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
#
# HC32 DDL Drivers
#
# CONFIG_PKG_USING_HC32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_HC32F4_SERIES_DRIVER is not set
# end of HC32 DDL Drivers
#
@@ -864,6 +877,27 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
# end of NXP HAL & SDK Drivers
#
# NUVOTON Drivers
#
# CONFIG_PKG_USING_NUVOTON_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_SERIES_DRIVER is not set
# CONFIG_PKG_USING_NUVOTON_ARM926_LIB is not set
# end of NUVOTON Drivers
#
# GD32 Drivers
#
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-cmsis"
CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_CMSIS_DRIVER_VER="latest"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_PATH="/packages/peripherals/hal-sdk/gd32/gd32-arm-series"
CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION=y
CONFIG_PKG_GD32_ARM_SERIES_DRIVER_VER="latest"
# end of GD32 Drivers
# end of HAL & SDK Drivers
#
@@ -1063,6 +1097,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
# end of Signal Processing and Control Algorithm Packages
#
@@ -1097,6 +1132,7 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_MORSE is not set
# CONFIG_PKG_USING_TINYSQUARE is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
@@ -1373,10 +1409,12 @@ CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0
# end of Arduino libraries
# end of RT-Thread online packages
CONFIG_SOC_FAMILY_GD32=y
CONFIG_SOC_SERIES_GD32F4xx=y
#
# Hardware Drivers Config
#
CONFIG_SOC_SERIES_GD32F4xx=y
CONFIG_SOC_GD32450Z=y
#
+20 -6
View File
@@ -15,6 +15,25 @@ except:
print(RTT_ROOT)
exit(-1)
def bsp_pkg_check():
import subprocess
check_paths = [
os.path.join("packages", "gd32-arm-cmsis-latest"),
os.path.join("packages", "gd32-arm-series-latest")
]
need_update = not all(os.path.exists(p) for p in check_paths)
if need_update:
print("\n===============================================================================")
print("Dependency packages missing, please running 'pkgs --update'...")
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
print("===============================================================================")
exit(1)
RegisterPreBuildingAction(bsp_pkg_check)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
@@ -31,6 +50,7 @@ if rtconfig.PLATFORM in ['iccarm']:
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('env')
Export('RTT_ROOT')
Export('rtconfig')
@@ -47,12 +67,6 @@ Export('SDK_LIB')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
gd32_library = 'GD32F4xx_Firmware_Library'
rtconfig.BSP_LIBRARY_TYPE = gd32_library
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, gd32_library, 'SConscript')))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'gd32_drivers', 'SConscript')))
@@ -2,8 +2,6 @@ import os
import rtconfig
from building import *
Import('SDK_LIB')
cwd = GetCurrentDir()
# add general drivers
@@ -13,15 +11,6 @@ board.c
path = [cwd]
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/ARM/startup_gd32f4xx.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s']
CPPDEFINES = ['GD32F450']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -108,6 +108,11 @@
#define RT_VER_NUM 0x50201
#define RT_BACKTRACE_LEVEL_MAX_NR 32
/* end of RT-Thread Kernel */
#define RT_USING_HW_ATOMIC
#define RT_USING_CPU_FFS
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
@@ -311,6 +316,18 @@
/* NXP HAL & SDK Drivers */
/* end of NXP HAL & SDK Drivers */
/* NUVOTON Drivers */
/* end of NUVOTON Drivers */
/* GD32 Drivers */
#define PKG_USING_GD32_ARM_CMSIS_DRIVER
#define PKG_USING_GD32_ARM_CMSIS_DRIVER_LATEST_VERSION
#define PKG_USING_GD32_ARM_SERIES_DRIVER
#define PKG_USING_GD32_ARM_SERIES_DRIVER_LATEST_VERSION
/* end of GD32 Drivers */
/* end of HAL & SDK Drivers */
/* sensors drivers */
@@ -390,10 +407,11 @@
/* end of Arduino libraries */
/* end of RT-Thread online packages */
#define SOC_FAMILY_GD32
#define SOC_SERIES_GD32F4xx
/* Hardware Drivers Config */
#define SOC_SERIES_GD32F4xx
#define SOC_GD32450Z
/* Onboard Peripheral Drivers */
+1 -1
View File
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='keil'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None

Some files were not shown because too many files have changed in this diff Show More