2014-07-13 14:13:39 +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:40:05 +08:00
|
|
|
CPPDEFINES = [rtconfig.USE_CORE]
|
|
|
|
CPPDEFINES += ['USE_SPIFI']
|
2014-07-13 14:13:39 +08:00
|
|
|
# add for startup script
|
|
|
|
if rtconfig.USE_CORE =='CORE_M4':
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2014-07-13 14:13:39 +08:00
|
|
|
src += ['NXP/LPC43xx/Source/Templates/GCC/startup_LPC43xx.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2014-07-13 14:13:39 +08:00
|
|
|
src += ['NXP/LPC43xx/Source/Templates/ARM/startup_LPC43xx.s']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
src += ['NXP/LPC43xx/Source/Templates/IAR/startup_LPC43xx.s']
|
|
|
|
else:
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2014-07-13 14:13:39 +08:00
|
|
|
src += ['NXP/LPC43xx/Source/Templates/GCC/startup_LPC43xx_M0.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2014-07-13 14:13:39 +08:00
|
|
|
src += ['NXP/LPC43xx/Source/Templates/ARM/startup_LPC43xx_M0.s']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
src += ['NXP/LPC43xx/Source/Templates/IAR/startup_LPC43xx_M0.s']
|
|
|
|
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|