4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 19:23:30 +08:00
Meco Man 83b3aadaa3 [Scons][iar][iccarm] IAR统一使用iccarm作为判断条件而不是是用IDE的名字来进行判断
因为不确定后续IAR是否会像Keil一样内含有不同的编译工具链
此外,将判断条件改为列表方式,这样更方便后续增加其他可能的IAR编译链
2022-06-09 07:01:59 +08:00

31 lines
1.1 KiB
Python

# 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']
CPPDEFINES = [rtconfig.USE_CORE]
CPPDEFINES += ['USE_SPIFI']
# add for startup script
if rtconfig.USE_CORE =='CORE_M4':
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']
else:
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']
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
Return('group')