Man, Jianting (Meco) a0f8d43744
[gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM (#5802)
* [gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM
2022-04-20 09:56:04 +08:00

28 lines
611 B
Python

import rtconfig
Import('RTT_ROOT')
from building import *
# get current directory
cwd = GetCurrentDir()
src = Split("""
""")
# add for startup script
if rtconfig.PLATFORM == 'gcc':
src = src + ['gcc/' + 'startup_gcc.c']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src = src + ['arm/' + 'startup_keil.s']
elif rtconfig.CROSS_TOOL == 'iar':
src = src + ['iar/' + 'startup_iar.c']
path = [cwd]
path += [cwd + '/cmsis/include']
CPPDEFINES = ['AM_PACKAGE_BGA', 'AM_PART_APOLLO2']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')