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

34 lines
1.0 KiB
Python
Raw Normal View History

2021-06-18 22:34:45 +08:00
import rtconfig
from building import *
# get current directory
cwd = GetCurrentDir()
# The set of source files associated with this SConscript file.
src = Glob('GD32F3x0_standard_peripheral/Source/*.c')
src += [cwd + '/CMSIS/GD/GD32F3x0/Source/system_gd32f3x0.c']
#add for startup script
if rtconfig.PLATFORM in ['gcc']:
2021-06-18 22:34:45 +08:00
src += [cwd + '/CMSIS/GD/GD32F3x0/Source/GCC/startup_gd32f3x0.S']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
2021-06-18 22:34:45 +08:00
src += [cwd + '/CMSIS/GD/GD32F3x0/Source/ARM/startup_gd32f3x0.s']
elif rtconfig.PLATFORM in ['iccarm']:
2021-06-18 22:34:45 +08:00
src += [cwd + '/CMSIS/GD/GD32F3x0/Source/IAR/startup_gd32f3x0.s']
path = [
cwd + '/CMSIS/GD/GD32F3x0/Include',
cwd + '/CMSIS',
cwd + '/GD32F3x0_standard_peripheral/Include',]
if GetDepend(['RT_USING_BSP_USB']):
path += [cwd + '/GD32F4xx_usb_driver/Include']
src += [cwd + '/GD32F4xx_usb_driver/Source']
CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'GD32F350']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')