4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-14 23:09:34 +08:00
2017-11-16 11:05:32 +08:00

33 lines
882 B
Python

# RT-Thread building script for bridge
import os
from building import *
Import('rtconfig')
cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
CPPDEFINES = []
objs = objs + SConscript(os.path.join('drivers', 'SConscript'))
objs = objs + SConscript(os.path.join('utilities', 'SConscript'))
if rtconfig.CROSS_TOOL == 'gcc':
objs = objs + SConscript(os.path.join('mcuxpresso', 'SConscript'))
CPPDEFINES += ['__USE_CMSIS']
elif rtconfig.CROSS_TOOL == 'keil':
objs = objs + SConscript(os.path.join('arm', 'SConscript'))
elif rtconfig.CROSS_TOOL == 'iar':
objs = objs + SConscript(os.path.join('iar', 'SConscript'))
src = Glob('*.c')
CPPPATH = [cwd]
CPPDEFINES += ['CORE_M4', 'CPU_LPC54608', 'CPU_LPC54608J512ET180=1']
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
objs = objs + group
Return('objs')