未验证 提交 201bd887 编写于 作者: G guo 提交者: GitHub

Revert "优化build输出" (#5747)

上级 4f5d1b0c
...@@ -15,21 +15,32 @@ except: ...@@ -15,21 +15,32 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050' imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library rtconfig.BSP_LIBRARY_TYPE = imxrt_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,21 +15,32 @@ except: ...@@ -15,21 +15,32 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050' imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library rtconfig.BSP_LIBRARY_TYPE = imxrt_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,21 +15,32 @@ except: ...@@ -15,21 +15,32 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +61,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +61,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050' imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library rtconfig.BSP_LIBRARY_TYPE = imxrt_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include peripherals
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'peripherals', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,21 +15,32 @@ except: ...@@ -15,21 +15,32 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050' imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library rtconfig.BSP_LIBRARY_TYPE = imxrt_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,35 +15,42 @@ except: ...@@ -15,35 +15,42 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
SDK_ROOT = os.path.abspath('./') SDK_ROOT = os.path.abspath('./')
if os.path.exists(SDK_ROOT + '/libraries'): if os.path.exists(SDK_ROOT + '/libraries'):
libraries_path_prefix = SDK_ROOT + '/libraries' libraries_path_prefix = SDK_ROOT + '/libraries'
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +60,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +60,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1060' imxrt_library = 'MIMXRT1060'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library rtconfig.BSP_LIBRARY_TYPE = imxrt_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include peripherals
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'peripherals', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,35 +15,42 @@ except: ...@@ -15,35 +15,42 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
SDK_ROOT = os.path.abspath('./') SDK_ROOT = os.path.abspath('./')
if os.path.exists(SDK_ROOT + '/libraries'): if os.path.exists(SDK_ROOT + '/libraries'):
libraries_path_prefix = SDK_ROOT + '/libraries' libraries_path_prefix = SDK_ROOT + '/libraries'
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +60,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +60,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1064' imxrt_library = 'MIMXRT1064'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library rtconfig.BSP_LIBRARY_TYPE = imxrt_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include peripherals
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'peripherals', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,57 +15,41 @@ except: ...@@ -15,57 +15,41 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
SDK_ROOT = os.path.abspath('./')
if os.path.exists(SDK_ROOT + '/libraries'):
libraries_path_prefix = SDK_ROOT + '/libraries'
else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix
Export('SDK_LIB')
# prepare building environment # prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050' objs = objs + SConscript('../libraries/drivers/SConscript')
rtconfig.BSP_LIBRARY_TYPE = imxrt_library objs = objs + SConscript('../libraries/MIMXRT1050/SConscript')
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,57 +15,41 @@ except: ...@@ -15,57 +15,41 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], if rtconfig.PLATFORM == 'armcc':
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, env = Environment(tools = ['mingw'],
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
# overwrite cflags, because cflags has '--C99'
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
else:
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
SDK_ROOT = os.path.abspath('./')
if os.path.exists(SDK_ROOT + '/libraries'):
libraries_path_prefix = SDK_ROOT + '/libraries'
else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix
Export('SDK_LIB')
# prepare building environment # prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1060' objs = objs + SConscript('../libraries/drivers/SConscript')
rtconfig.BSP_LIBRARY_TYPE = imxrt_library objs = objs + SConscript('../libraries/MIMXRT1064/SConscript')
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F0xx_HAL' stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F2xx_HAL' stm32_library = 'STM32F2xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F3xx_HAL' stm32_library = 'STM32F3xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include libraries
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L1xx_HAL' stm32_library = 'STM32L1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L5xx_HAL' stm32_library = 'STM32L5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32MPxx_HAL' stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WBxx_HAL' stm32_library = 'STM32WBxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread_acm32f030.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F0xx_HAL' stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F0xx_HAL' stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map'])
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F2xx_HAL' stm32_library = 'STM32F2xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F3xx_HAL' stm32_library = 'STM32F3xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include ports
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G0xx_HAL' stm32_library = 'STM32G0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G0xx_HAL' stm32_library = 'STM32G0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G4xx_HAL' stm32_library = 'STM32G4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G4xx_HAL' stm32_library = 'STM32G4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include libraries
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include libraries
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include libraries
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include libraries
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') # include libraries
if os.path.isfile(bsp_port_script): objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L0xx_HAL' stm32_library = 'STM32L0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L0xx_HAL' stm32_library = 'STM32L0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,13 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,13 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript') objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')))
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -17,7 +17,7 @@ if GetDepend(['BSP_USING_KEY']): ...@@ -17,7 +17,7 @@ if GetDepend(['BSP_USING_KEY']):
if GetDepend(['BSP_USING_QSPI_FLASH']): if GetDepend(['BSP_USING_QSPI_FLASH']):
src += Glob('ports/drv_qspi_flash.c') src += Glob('ports/drv_qspi_flash.c')
if GetDepend(['BSP_USING_SDCARD']): if GetDepend(['BSP_USING_SDCARD']):
src += Glob('ports/drv_sdcard.c') src += Glob('ports/drv_sdcard.c')
...@@ -39,7 +39,7 @@ path += [cwd + '/CubeMX_Config/Inc'] ...@@ -39,7 +39,7 @@ path += [cwd + '/CubeMX_Config/Inc']
if GetDepend(['BSP_USING_AUDIO']): if GetDepend(['BSP_USING_AUDIO']):
path += [cwd + '/ports/audio'] path += [cwd + '/ports/audio']
startup_path_prefix = SDK_LIB startup_path_prefix = SDK_LIB
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.CROSS_TOOL == 'gcc':
...@@ -49,8 +49,7 @@ elif rtconfig.CROSS_TOOL == 'keil': ...@@ -49,8 +49,7 @@ elif rtconfig.CROSS_TOOL == 'keil':
elif rtconfig.CROSS_TOOL == 'iar': elif rtconfig.CROSS_TOOL == 'iar':
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l475xx.s'] src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l475xx.s']
CPPDEFINES = ['STM32L475xx'] CPPDEFINES = ['STM32L475xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group') Return('group')
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -17,7 +17,6 @@ except: ...@@ -17,7 +17,6 @@ except:
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
...@@ -41,9 +40,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +40,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +49,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +49,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -15,7 +15,7 @@ except: ...@@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L5xx_HAL' stm32_library = 'STM32L5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32MPxx_HAL' stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32MPxx_HAL' stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32U5xx_HAL' stm32_library = 'STM32U5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +41,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +50,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WBxx_HAL' stm32_library = 'STM32WBxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -17,7 +17,6 @@ except: ...@@ -17,7 +17,6 @@ except:
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
...@@ -41,9 +40,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +40,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +49,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +49,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WLxx_HAL' stm32_library = 'STM32WLxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
...@@ -17,7 +17,6 @@ except: ...@@ -17,7 +17,6 @@ except:
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
...@@ -41,9 +40,6 @@ if os.path.exists(SDK_ROOT + '/libraries'): ...@@ -41,9 +40,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
...@@ -53,19 +49,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) ...@@ -53,19 +49,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WLxx_HAL' stm32_library = 'STM32WLxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册