Skip to content

Commit 921247b

Browse files
committed
[bsp/stm32] improve build output.
1 parent ce602a6 commit 921247b

File tree

87 files changed

+1154
-209
lines changed

Some content is hidden

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

87 files changed

+1154
-209
lines changed

bsp/stm32/libraries/templates/stm32f0xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32F0xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32f10x/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32F1xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32f2xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32F2xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32f3xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32F3xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32f4xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32F4xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32f7xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32F7xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32h7xx/SConstruct

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32H7xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

53-
# include drivers
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
56+
bsp_vdir = 'build'
5557

5658
# include libraries
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
61+
62+
# include drivers
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32l1xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32L1xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32l4xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32L4xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

bsp/stm32/libraries/templates/stm32l5xx/SConstruct

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44+
from utils import _make_path_relative
45+
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
46+
4447
SDK_LIB = libraries_path_prefix
4548
Export('SDK_LIB')
4649

@@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5053
stm32_library = 'STM32L5xx_HAL'
5154
rtconfig.BSP_LIBRARY_TYPE = stm32_library
5255

56+
bsp_vdir = 'build'
57+
5358
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
59+
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
60+
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
5561

5662
# include drivers
57-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
63+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
64+
variant_dir=bsp_vdir + '/libraries/HAL_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))
5869

5970
# make a building
6071
DoBuilding(TARGET, objs)

0 commit comments

Comments
 (0)