Skip to content

Commit

Permalink
Revert "优化build输出" (#5747)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guozhanxin authored Mar 30, 2022
1 parent 4f5d1b0 commit 201bd88
Show file tree
Hide file tree
Showing 95 changed files with 389 additions and 1,359 deletions.
44 changes: 22 additions & 22 deletions bsp/imxrt/imxrt1052-atk-commander/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,32 @@ except:
print(RTT_ROOT)
exit(-1)

TARGET = 'rt-thread.' + rtconfig.TARGET_EXT

TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
if rtconfig.PLATFORM == 'armcc':
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,
# 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)

if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

Export('RTT_ROOT')
Export('rtconfig')
Expand All @@ -41,9 +52,6 @@ if os.path.exists(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')

Expand All @@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library

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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))

# 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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))

# make a building
DoBuilding(TARGET, objs)
44 changes: 22 additions & 22 deletions bsp/imxrt/imxrt1052-fire-pro/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,32 @@ except:
print(RTT_ROOT)
exit(-1)

TARGET = 'rt-thread.' + rtconfig.TARGET_EXT

TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
if rtconfig.PLATFORM == 'armcc':
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,
# 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)

if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

Export('RTT_ROOT')
Export('rtconfig')
Expand All @@ -41,9 +52,6 @@ if os.path.exists(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')

Expand All @@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library

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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))

# 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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))

# make a building
DoBuilding(TARGET, objs)
45 changes: 24 additions & 21 deletions bsp/imxrt/imxrt1052-nxp-evk/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,32 @@ except:
print(RTT_ROOT)
exit(-1)

TARGET = 'rt-thread.' + rtconfig.TARGET_EXT

TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
if rtconfig.PLATFORM == 'armcc':
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,
# 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)

if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

Export('RTT_ROOT')
Export('rtconfig')
Expand All @@ -41,9 +52,6 @@ if os.path.exists(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')

Expand All @@ -53,19 +61,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library

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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))

# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))

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))
# include peripherals
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'peripherals', 'SConscript')))

# make a building
DoBuilding(TARGET, objs)
44 changes: 22 additions & 22 deletions bsp/imxrt/imxrt1052-seeed-ArchMix/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,32 @@ except:
print(RTT_ROOT)
exit(-1)

TARGET = 'rt-thread.' + rtconfig.TARGET_EXT

TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
if rtconfig.PLATFORM == 'armcc':
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,
# 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)

if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

Export('RTT_ROOT')
Export('rtconfig')
Expand All @@ -41,9 +52,6 @@ if os.path.exists(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')

Expand All @@ -53,19 +61,11 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1050'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library

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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))

# 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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))

# make a building
DoBuilding(TARGET, objs)
46 changes: 24 additions & 22 deletions bsp/imxrt/imxrt1060-nxp-evk/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,42 @@ except:
print(RTT_ROOT)
exit(-1)

TARGET = 'rt-thread.' + rtconfig.TARGET_EXT

TARGET = 'rtthread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
if rtconfig.PLATFORM == 'armcc':
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,
# 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)

if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

Export('RTT_ROOT')
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')

Expand All @@ -53,19 +60,14 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
imxrt_library = 'MIMXRT1060'
rtconfig.BSP_LIBRARY_TYPE = imxrt_library

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))
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))

# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))

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))
# include peripherals
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'peripherals', 'SConscript')))

# make a building
DoBuilding(TARGET, objs)
Loading

0 comments on commit 201bd88

Please sign in to comment.