2020-01-10 10:38:21 +08:00
|
|
|
# RT-Thread building script for bridge
|
|
|
|
|
|
|
|
import os
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
Import('rtconfig')
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
group = []
|
|
|
|
list = os.listdir(cwd)
|
2023-07-25 21:31:44 +08:00
|
|
|
bsp_path = Dir('#').abspath
|
|
|
|
|
|
|
|
if not os.path.exists(bsp_path + "/link.lds"):
|
|
|
|
Env['LINKFLAGS'] = Env['LINKFLAGS'].replace('link.lds', cwd + "/link.lds")
|
|
|
|
Preprocessing("link.lds.S", ".lds", CPPPATH=[bsp_path])
|
2020-01-10 10:38:21 +08:00
|
|
|
|
2023-11-02 20:23:11 +08:00
|
|
|
# fix the linker with crtx.o
|
2023-10-25 14:59:48 +08:00
|
|
|
Env['LINKFLAGS'] += ' -nostartfiles'
|
|
|
|
|
2020-04-16 16:10:57 +08:00
|
|
|
# add common code files
|
|
|
|
group = group + SConscript(os.path.join('common', 'SConscript'))
|
|
|
|
|
2020-01-10 10:38:21 +08:00
|
|
|
# cpu porting code files
|
|
|
|
if rtconfig.CPU != 'common':
|
|
|
|
group = group + SConscript(os.path.join(rtconfig.CPU, 'SConscript'))
|
|
|
|
|
|
|
|
Return('group')
|