2013-01-08 22:40:58 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Glob('driverlib/*.c')
|
|
|
|
|
|
|
|
# cortex-m3 no FPU.
|
|
|
|
if rtconfig.PART_TYPE.startswith('PART_LM4F') != True:
|
2023-01-09 10:14:23 +08:00
|
|
|
SrcRemove(src, 'fpu.c')
|
2013-01-08 22:40:58 +08:00
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
# add for startup script
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['startup/gcc/start_gcc.c']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['startup/arm/start_rvds.S']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['startup/iar/start_iar.S']
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
CPPDEFINES = [rtconfig.PART_TYPE]
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2023-01-09 10:14:23 +08:00
|
|
|
CPPDEFINES += ['gcc'];
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|