2018-12-10 16:31:33 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = []
|
2019-03-14 17:25:04 +08:00
|
|
|
CPPPATH = [cwd]
|
2018-12-10 16:31:33 +08:00
|
|
|
|
2019-03-25 20:03:49 +08:00
|
|
|
support_arch = {"arm": ["cortex-m3", "cortex-m4", "cortex-m7", "arm926", "cortex-a"]}
|
2022-05-31 06:30:42 +08:00
|
|
|
platform_file = {'armcc': 'rvds.S', 'gcc': 'gcc.S', 'iccarm': 'iar.S'}
|
2018-12-10 16:31:33 +08:00
|
|
|
|
|
|
|
if rtconfig.PLATFORM in platform_file.keys(): # support platforms
|
|
|
|
if rtconfig.ARCH in support_arch.keys() and rtconfig.CPU in support_arch[rtconfig.ARCH]:
|
|
|
|
# arch/arm/cortex-m7/lwp_gcc.S
|
|
|
|
asm_path = 'arch/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/*_' + platform_file[rtconfig.PLATFORM]
|
|
|
|
src = Glob('*.c') + Glob(asm_path)
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('lwP', src, depend = ['RT_USING_LWP'], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|