2017-08-08 11:56:50 +08:00
|
|
|
# RT-Thread building script for bridge
|
|
|
|
|
|
|
|
import os
|
|
|
|
from building import *
|
|
|
|
|
2017-11-01 10:39:02 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2017-08-08 11:56:50 +08:00
|
|
|
objs = []
|
|
|
|
list = os.listdir(cwd)
|
2017-11-14 11:09:46 +08:00
|
|
|
CPPDEFINES = []
|
2017-08-08 11:56:50 +08:00
|
|
|
|
2017-11-01 10:39:02 +08:00
|
|
|
objs = objs + SConscript(os.path.join('drivers', 'SConscript'))
|
|
|
|
objs = objs + SConscript(os.path.join('utilities', 'SConscript'))
|
|
|
|
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2017-11-01 10:39:02 +08:00
|
|
|
objs = objs + SConscript(os.path.join('mcuxpresso', 'SConscript'))
|
2017-11-14 11:09:46 +08:00
|
|
|
CPPDEFINES += ['__USE_CMSIS']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2017-11-01 10:39:02 +08:00
|
|
|
objs = objs + SConscript(os.path.join('arm', 'SConscript'))
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2017-11-01 10:39:02 +08:00
|
|
|
objs = objs + SConscript(os.path.join('iar', 'SConscript'))
|
|
|
|
|
2017-11-14 11:09:46 +08:00
|
|
|
src = Glob('*.c')
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
CPPDEFINES += ['CORE_M4', 'CPU_LPC54608', 'CPU_LPC54608J512ET180=1']
|
2017-11-01 10:39:02 +08:00
|
|
|
|
|
|
|
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
objs = objs + group
|
2017-08-08 11:56:50 +08:00
|
|
|
|
|
|
|
Return('objs')
|