2017-09-15 18:10:51 +08:00
|
|
|
import rtconfig
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Split("""
|
|
|
|
|
|
|
|
""")
|
|
|
|
|
|
|
|
# add for startup script
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2018-09-02 11:21:03 +08:00
|
|
|
src = src + ['gcc/' + 'startup_gcc.c']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2017-09-15 18:10:51 +08:00
|
|
|
src = src + ['arm/' + 'startup_keil.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2017-09-15 18:10:51 +08:00
|
|
|
src = src + ['iar/' + 'startup_iar.c']
|
|
|
|
|
|
|
|
path = [cwd]
|
2018-09-21 16:10:44 +08:00
|
|
|
path += [cwd + '/cmsis/include']
|
2017-09-15 18:10:51 +08:00
|
|
|
|
2018-09-02 11:21:03 +08:00
|
|
|
CPPDEFINES = ['AM_PACKAGE_BGA', 'AM_PART_APOLLO2']
|
2017-09-15 18:10:51 +08:00
|
|
|
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|