rt-thread/bsp/nuvoton_m451/Libraries/Device/SConscript

26 lines
759 B
Python
Raw Normal View History

# RT-Thread building script for component
Import('rtconfig')
import os
from building import *
CPPDEFINES = []
cwd = GetCurrentDir()
src = Split('''
Nuvoton/M451Series/Source/system_M451Series.c
''')
CPPPATH = [cwd + '/Nuvoton/M451Series/Include']
CPPPATH += [os.path.dirname(cwd) + '/CMSIS/Include']
#add for startup script
if rtconfig.CROSS_TOOL == 'iar':
src = src + ['Nuvoton/M451Series/Source/IAR/startup_M451Series.s']
elif rtconfig.CROSS_TOOL == 'keil':
src = src + ['Nuvoton/M451Series/Source/ARM/startup_M451Series.s']
elif rtconfig.CROSS_TOOL == 'gcc':
src = src + ['Nuvoton/M451Series/Source/GCC/startup_M451Series.s']
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
Return('group')