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
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2019-03-31 21:17:55 +08:00
|
|
|
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
|
|
|
|
2020-11-20 13:38:11 +08:00
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
2019-03-31 15:44:24 +08:00
|
|
|
|
|
|
|
Return('group')
|