Skip to content

Commit 201bd88

Browse files
authored
Revert "优化build输出" (#5747)
1 parent 4f5d1b0 commit 201bd88

File tree

95 files changed

+389
-1359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+389
-1359
lines changed

bsp/imxrt/imxrt1052-atk-commander/SConstruct

+22-22
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,32 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18-
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
19-
18+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
2019
DefaultEnvironment(tools=[])
21-
env = Environment(tools = ['mingw'],
22-
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23-
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24-
AR = rtconfig.AR, ARFLAGS = '-rc',
25-
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
26-
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
20+
if rtconfig.PLATFORM == 'armcc':
21+
env = Environment(tools = ['mingw'],
22+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
25+
AR = rtconfig.AR, ARFLAGS = '-rc',
26+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
27+
# overwrite cflags, because cflags has '--C99'
28+
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
29+
else:
30+
env = Environment(tools = ['mingw'],
31+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
32+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
33+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
34+
AR = rtconfig.AR, ARFLAGS = '-rc',
35+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
36+
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
37+
2738
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
2839

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

3445
Export('RTT_ROOT')
3546
Export('rtconfig')
@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4152
else:
4253
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4354

44-
from utils import _make_path_relative
45-
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46-
4755
SDK_LIB = libraries_path_prefix
4856
Export('SDK_LIB')
4957

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

56-
bsp_vdir = 'build'
57-
5864
# include libraries
59-
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'),
60-
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
65+
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
6166

6267
# include drivers
63-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
64-
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
65-
66-
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
67-
if os.path.isfile(bsp_port_script):
68-
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
68+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
6969

7070
# make a building
7171
DoBuilding(TARGET, objs)

bsp/imxrt/imxrt1052-fire-pro/SConstruct

+22-22
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,32 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18-
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
19-
18+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
2019
DefaultEnvironment(tools=[])
21-
env = Environment(tools = ['mingw'],
22-
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23-
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24-
AR = rtconfig.AR, ARFLAGS = '-rc',
25-
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
26-
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
20+
if rtconfig.PLATFORM == 'armcc':
21+
env = Environment(tools = ['mingw'],
22+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
25+
AR = rtconfig.AR, ARFLAGS = '-rc',
26+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
27+
# overwrite cflags, because cflags has '--C99'
28+
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
29+
else:
30+
env = Environment(tools = ['mingw'],
31+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
32+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
33+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
34+
AR = rtconfig.AR, ARFLAGS = '-rc',
35+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
36+
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
37+
2738
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
2839

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

3445
Export('RTT_ROOT')
3546
Export('rtconfig')
@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4152
else:
4253
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4354

44-
from utils import _make_path_relative
45-
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46-
4755
SDK_LIB = libraries_path_prefix
4856
Export('SDK_LIB')
4957

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

56-
bsp_vdir = 'build'
57-
5864
# include libraries
59-
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'),
60-
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
65+
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
6166

6267
# include drivers
63-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
64-
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
65-
66-
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
67-
if os.path.isfile(bsp_port_script):
68-
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
68+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
6969

7070
# make a building
7171
DoBuilding(TARGET, objs)

bsp/imxrt/imxrt1052-nxp-evk/SConstruct

+24-21
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,32 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18-
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
19-
18+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
2019
DefaultEnvironment(tools=[])
21-
env = Environment(tools = ['mingw'],
22-
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23-
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24-
AR = rtconfig.AR, ARFLAGS = '-rc',
25-
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
26-
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
20+
if rtconfig.PLATFORM == 'armcc':
21+
env = Environment(tools = ['mingw'],
22+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
25+
AR = rtconfig.AR, ARFLAGS = '-rc',
26+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
27+
# overwrite cflags, because cflags has '--C99'
28+
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
29+
else:
30+
env = Environment(tools = ['mingw'],
31+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
32+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
33+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
34+
AR = rtconfig.AR, ARFLAGS = '-rc',
35+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
36+
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
37+
2738
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
2839

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

3445
Export('RTT_ROOT')
3546
Export('rtconfig')
@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4152
else:
4253
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4354

44-
from utils import _make_path_relative
45-
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46-
4755
SDK_LIB = libraries_path_prefix
4856
Export('SDK_LIB')
4957

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

56-
bsp_vdir = 'build'
57-
5864
# include libraries
59-
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'),
60-
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
65+
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
6166

6267
# include drivers
63-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
64-
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
68+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
6569

66-
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
67-
if os.path.isfile(bsp_port_script):
68-
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
70+
# include peripherals
71+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'peripherals', 'SConscript')))
6972

7073
# make a building
7174
DoBuilding(TARGET, objs)

bsp/imxrt/imxrt1052-seeed-ArchMix/SConstruct

+22-22
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,32 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18-
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
19-
18+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
2019
DefaultEnvironment(tools=[])
21-
env = Environment(tools = ['mingw'],
22-
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23-
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24-
AR = rtconfig.AR, ARFLAGS = '-rc',
25-
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
26-
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
20+
if rtconfig.PLATFORM == 'armcc':
21+
env = Environment(tools = ['mingw'],
22+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
25+
AR = rtconfig.AR, ARFLAGS = '-rc',
26+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
27+
# overwrite cflags, because cflags has '--C99'
28+
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
29+
else:
30+
env = Environment(tools = ['mingw'],
31+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
32+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
33+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
34+
AR = rtconfig.AR, ARFLAGS = '-rc',
35+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
36+
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
37+
2738
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
2839

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

3445
Export('RTT_ROOT')
3546
Export('rtconfig')
@@ -41,9 +52,6 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4152
else:
4253
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4354

44-
from utils import _make_path_relative
45-
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46-
4755
SDK_LIB = libraries_path_prefix
4856
Export('SDK_LIB')
4957

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

56-
bsp_vdir = 'build'
57-
5864
# include libraries
59-
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'),
60-
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
65+
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
6166

6267
# include drivers
63-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
64-
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
65-
66-
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
67-
if os.path.isfile(bsp_port_script):
68-
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
68+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
6969

7070
# make a building
7171
DoBuilding(TARGET, objs)

bsp/imxrt/imxrt1060-nxp-evk/SConstruct

+24-22
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,42 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18-
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
19-
18+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
2019
DefaultEnvironment(tools=[])
21-
env = Environment(tools = ['mingw'],
22-
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23-
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24-
AR = rtconfig.AR, ARFLAGS = '-rc',
25-
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
26-
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
20+
if rtconfig.PLATFORM == 'armcc':
21+
env = Environment(tools = ['mingw'],
22+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
24+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
25+
AR = rtconfig.AR, ARFLAGS = '-rc',
26+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
27+
# overwrite cflags, because cflags has '--C99'
28+
CXXCOM = '$CXX -o $TARGET --cpp -c $CXXFLAGS $_CCCOMCOM $SOURCES')
29+
else:
30+
env = Environment(tools = ['mingw'],
31+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
32+
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
33+
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
34+
AR = rtconfig.AR, ARFLAGS = '-rc',
35+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS,
36+
CXXCOM = '$CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES')
37+
2738
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
2839

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

3445
Export('RTT_ROOT')
3546
Export('rtconfig')
3647

3748
SDK_ROOT = os.path.abspath('./')
38-
3949
if os.path.exists(SDK_ROOT + '/libraries'):
4050
libraries_path_prefix = SDK_ROOT + '/libraries'
4151
else:
4252
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4353

44-
from utils import _make_path_relative
45-
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46-
4754
SDK_LIB = libraries_path_prefix
4855
Export('SDK_LIB')
4956

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

56-
bsp_vdir = 'build'
57-
5863
# include libraries
59-
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript'),
60-
variant_dir=bsp_vdir + '/libraries/'+ imxrt_library, duplicate=0))
64+
objs.extend(SConscript(os.path.join(libraries_path_prefix, imxrt_library, 'SConscript')))
6165

6266
# include drivers
63-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'),
64-
variant_dir=bsp_vdir + '/libraries/drivers', duplicate=0))
67+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
6568

66-
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
67-
if os.path.isfile(bsp_port_script):
68-
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
69+
# include peripherals
70+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'peripherals', 'SConscript')))
6971

7072
# make a building
7173
DoBuilding(TARGET, objs)

0 commit comments

Comments
 (0)