rt-thread-official/bsp/lpc54608-LPCXpresso/SDK_2.2_LPCXpresso54608/devices/LPC54608/SConscript

33 lines
898 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.PLATFORM in ['gcc']:
objs = objs + SConscript(os.path.join('mcuxpresso', 'SConscript'))
CPPDEFINES += ['__USE_CMSIS']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
objs = objs + SConscript(os.path.join('arm', 'SConscript'))
elif rtconfig.PLATFORM in ['iccarm']:
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')