rt-thread/bsp/gd32303e-eval/Libraries/SConscript

34 lines
1.0 KiB
Python
Raw Normal View History

2018-05-21 11:13:46 +08:00
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.PLATFORM in ['gcc']:
src += [cwd + '/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_hd.S']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
2018-05-21 11:13:46 +08:00
src += [cwd + '/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_hd.s']
elif rtconfig.PLATFORM in ['iccarm']:
2018-05-21 11:13:46 +08:00
src += [cwd + '/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_hd.s']
path = [
cwd + '/CMSIS/GD/GD32F30x/Include',
cwd + '/CMSIS',
cwd + '/GD32F30x_standard_peripheral/Include',]
2023-01-09 10:14:23 +08:00
2018-05-21 11:13:46 +08:00
if GetDepend(['RT_USING_BSP_USB']):
path += [cwd + '/GD32F30x_usb_driver/Include']
src += [cwd + '/GD32F30x_usb_driver/Source']
CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'GD32F30X_HD']
2020-11-20 13:38:11 +08:00
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
2018-05-21 11:13:46 +08:00
Return('group')