SConscript 967 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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']
B
Bright Pan 已提交
20 21
elif rtconfig.CROSS_TOOL == 'gcc':
     src = src + ['CMSIS/Nuvoton/M051Series/Source/GCC/startup_M051Series.s']
22 23 24 25 26 27

path = [cwd + '/StdDriver/inc', 
    cwd + '/CMSIS/Nuvoton/M051Series/Include',
    cwd + '/CMSIS/Include']

#CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
B
Bright Pan 已提交
28
CPPDEFINES = ['INIT_SYSCLK_AT_BOOTING']
29 30 31
group = DefineGroup('M05X_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

Return('group')