rt-thread/bsp/nuvoton_m05x/Libraries/SConscript

32 lines
967 B
Python
Raw Normal View History

import rtconfig
Import('RTT_ROOT')
from building import *
# get current directory
cwd = GetCurrentDir()
# The set of source files associated with this SConscript file.
src = Split("""
CMSIS/Nuvoton/M051Series/Source/system_M051Series.c
""")
src += Glob('StdDriver/src/*.c')
#add for startup script
if rtconfig.CROSS_TOOL == 'iar':
src = src + ['CMSIS/Nuvoton/M051Series/Source/IAR/startup_M051Series.s']
elif rtconfig.CROSS_TOOL == 'keil':
src = src + ['CMSIS/Nuvoton/M051Series/Source/ARM/startup_M051Series.s']
2014-11-25 01:08:13 +08:00
elif rtconfig.CROSS_TOOL == 'gcc':
src = src + ['CMSIS/Nuvoton/M051Series/Source/GCC/startup_M051Series.s']
path = [cwd + '/StdDriver/inc',
cwd + '/CMSIS/Nuvoton/M051Series/Include',
cwd + '/CMSIS/Include']
#CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
2014-11-25 01:08:13 +08:00
CPPDEFINES = ['INIT_SYSCLK_AT_BOOTING']
group = DefineGroup('M05X_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')