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

31 lines
1.1 KiB
Python
Raw Normal View History

2014-07-13 15:17:26 +08:00
# RT-Thread building script for component
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
src = Split('''
NXP/LPC43xx/Source/Templates/system_LPC43xx.c
''')
CPPPATH = [cwd + '/NXP/LPC43xx/Include', cwd + '/../CMSIS/Include']
2014-07-15 15:50:58 +08:00
CPPDEFINES = [rtconfig.USE_CORE]
CPPDEFINES += ['USE_SPIFI']
2023-01-09 10:14:23 +08:00
# add for startup script
2014-07-13 15:17:26 +08:00
if rtconfig.USE_CORE =='CORE_M4':
2023-01-09 10:14:23 +08:00
if rtconfig.PLATFORM in ['gcc']:
src += ['NXP/LPC43xx/Source/Templates/GCC/startup_LPC43xx.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += ['NXP/LPC43xx/Source/Templates/ARM/startup_LPC43xx.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += ['NXP/LPC43xx/Source/Templates/IAR/startup_LPC43xx.s']
2014-07-13 15:17:26 +08:00
else:
2023-01-09 10:14:23 +08:00
if rtconfig.PLATFORM in ['gcc']:
src += ['NXP/LPC43xx/Source/Templates/GCC/startup_LPC43xx_M0.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += ['NXP/LPC43xx/Source/Templates/ARM/startup_LPC43xx_M0.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += ['NXP/LPC43xx/Source/Templates/IAR/startup_LPC43xx_M0.s']
2014-07-13 15:17:26 +08:00
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
Return('group')