mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 19:44:24 +08:00
add gd32303e-eval BSP
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import rtconfig
|
||||
from building import *
|
||||
|
||||
# get current directory
|
||||
cwd = GetCurrentDir()
|
||||
|
||||
# The set of source files associated with this SConscript file.
|
||||
|
||||
src = Glob('GD32F30x_standard_peripheral/Source/*.c')
|
||||
src += [cwd + '/CMSIS/GD/GD32F30x/Source/system_gd32f30x.c']
|
||||
|
||||
#add for startup script
|
||||
if rtconfig.CROSS_TOOL == 'gcc':
|
||||
print('=================================================')
|
||||
print('Not support gcc yet !')
|
||||
print('=================================================')
|
||||
exit(0)
|
||||
elif rtconfig.CROSS_TOOL == 'keil':
|
||||
src += [cwd + '/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_hd.s']
|
||||
elif rtconfig.CROSS_TOOL == 'iar':
|
||||
src += [cwd + '/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_hd.s']
|
||||
|
||||
path = [
|
||||
cwd + '/CMSIS/GD/GD32F30x/Include',
|
||||
cwd + '/CMSIS',
|
||||
cwd + '/GD32F30x_standard_peripheral/Include',]
|
||||
|
||||
if GetDepend(['RT_USING_BSP_USB']):
|
||||
path += [cwd + '/GD32F30x_usb_driver/Include']
|
||||
src += [cwd + '/GD32F30x_usb_driver/Source']
|
||||
|
||||
CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'GD32F30X_HD']
|
||||
|
||||
group = DefineGroup('GD32_Lib', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
||||
|
||||
Return('group')
|
||||
Reference in New Issue
Block a user