2019-03-31 15:44:24 +08:00
|
|
|
import rtconfig
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
|
2019-03-31 21:17:55 +08:00
|
|
|
src = Glob('GD32E230_standard_peripheral/Source/*.c')
|
|
|
|
src += [cwd + '/CMSIS/GD/GD32E230/Source/system_gd32e230.c']
|
2019-03-31 15:44:24 +08:00
|
|
|
|
|
|
|
#add for startup script
|
2019-03-31 21:17:55 +08:00
|
|
|
if rtconfig.CROSS_TOOL == 'keil':
|
|
|
|
src += [cwd + '/CMSIS/GD/GD32E230/Source/ARM/startup_gd32e230.s']
|
2019-03-31 15:44:24 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
2019-03-31 21:17:55 +08:00
|
|
|
src += [cwd + '/CMSIS/GD/GD32E230/Source/IAR/startup_gd32e230.s']
|
2019-03-31 15:44:24 +08:00
|
|
|
|
|
|
|
path = [
|
2019-03-31 21:17:55 +08:00
|
|
|
cwd + '/CMSIS/GD/GD32E230/Include',
|
2019-03-31 15:44:24 +08:00
|
|
|
cwd + '/CMSIS',
|
2019-03-31 21:17:55 +08:00
|
|
|
cwd + '/GD32E230_standard_peripheral/Include',]
|
2019-03-31 15:44:24 +08:00
|
|
|
|
2019-03-31 21:17:55 +08:00
|
|
|
CPPDEFINES = ['GD32E230']
|
2019-03-31 15:44:24 +08:00
|
|
|
|
|
|
|
group = DefineGroup('GD32_Lib', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|