summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author程蒙蒙 <[email protected]>2023-06-30 15:40:38 +0800
committerguo <[email protected]>2023-07-03 15:20:57 +0800
commit72a6c910321bd4ada3920a98ca55b26fff999402 (patch)
treed9440c82e6a1726c2be537275dbc7541fc0f7aa5
parentdbf1463176921bed3310fbd9dd400897b64f501b (diff)
[bsp]stm32工程生成路径在源码目录
-rw-r--r--bsp/stm32/libraries/templates/stm32f0xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32f10x/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32f2xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32f3xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32f4xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32f7xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32l1xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32l4xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32l5xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32mp1xx/SConstruct5
-rw-r--r--bsp/stm32/libraries/templates/stm32wbxx/SConstruct5
-rw-r--r--bsp/stm32/stm32f072-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f091-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-100ask-mini/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-100ask-pro/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-atk-nano/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-atk-warshipv3/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-blue-pill/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-dofly-M3S/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-dofly-lyc8/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-fire-arbitrary/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-gizwits-gokitv21/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-hw100k-ibox/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-onenet-nbiot/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-yf-ufun/SConstruct5
-rw-r--r--bsp/stm32/stm32f103-ys-f1pro/SConstruct5
-rw-r--r--bsp/stm32/stm32f107-uc-eval/SConstruct5
-rw-r--r--bsp/stm32/stm32f207-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f302-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f401-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f401-weact-blackpill/SConstruct5
-rw-r--r--bsp/stm32/stm32f405-smdz-breadfruit/SConstruct5
-rw-r--r--bsp/stm32/stm32f407-armfly-v5/SConstruct5
-rw-r--r--bsp/stm32/stm32f407-atk-explorer/SConstruct5
-rw-r--r--bsp/stm32/stm32f407-robomaster-c/SConstruct5
-rw-r--r--bsp/stm32/stm32f407-st-discovery/SConstruct5
-rw-r--r--bsp/stm32/stm32f410-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f411-atk-nano/SConstruct5
-rw-r--r--bsp/stm32/stm32f411-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f411-weact-blackpill/SConstruct5
-rw-r--r--bsp/stm32/stm32f412-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f413-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f427-robomaster-a/SConstruct5
-rw-r--r--bsp/stm32/stm32f429-armfly-v6/SConstruct5
-rw-r--r--bsp/stm32/stm32f429-atk-apollo/SConstruct5
-rw-r--r--bsp/stm32/stm32f429-fire-challenger/SConstruct5
-rw-r--r--bsp/stm32/stm32f429-st-disco/SConstruct5
-rw-r--r--bsp/stm32/stm32f446-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f469-st-disco/SConstruct5
-rw-r--r--bsp/stm32/stm32f723-st-disco/SConstruct5
-rw-r--r--bsp/stm32/stm32f746-st-disco/SConstruct5
-rw-r--r--bsp/stm32/stm32f746-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f767-atk-apollo/SConstruct5
-rw-r--r--bsp/stm32/stm32f767-fire-challenger-v1/SConstruct5
-rw-r--r--bsp/stm32/stm32f767-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32f769-st-disco/SConstruct5
-rw-r--r--bsp/stm32/stm32g070-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32g071-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32g431-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32g474-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32h743-atk-apollo/SConstruct5
-rw-r--r--bsp/stm32/stm32h743-openmv-h7plus/SConstruct5
-rw-r--r--bsp/stm32/stm32l010-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l053-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l412-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l431-BearPi/SConstruct5
-rw-r--r--bsp/stm32/stm32l432-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l433-ali-startkit/SConstruct5
-rw-r--r--bsp/stm32/stm32l433-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l452-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l475-atk-pandora/SConstruct5
-rw-r--r--bsp/stm32/stm32l475-st-discovery/SConstruct5
-rw-r--r--bsp/stm32/stm32l476-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l496-ali-developer/SConstruct5
-rw-r--r--bsp/stm32/stm32l496-st-discovery/SConstruct5
-rw-r--r--bsp/stm32/stm32l496-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l4r5-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32l4r9-st-eval/SConstruct5
-rw-r--r--bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct5
-rw-r--r--bsp/stm32/stm32l552-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32mp157a-st-discovery/SConstruct5
-rw-r--r--bsp/stm32/stm32mp157a-st-ev1/SConstruct5
-rw-r--r--bsp/stm32/stm32u575-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32wb55-st-nucleo/SConstruct5
-rw-r--r--bsp/stm32/stm32wl55-st-nucleo/SConstruct6
-rw-r--r--bsp/stm32/stm32wle5-yizhilian-lm401/SConstruct5
-rw-r--r--bsp/stm32/stm32wle5-yizhilian-lm402/SConstruct5
87 files changed, 174 insertions, 262 deletions
diff --git a/bsp/stm32/libraries/templates/stm32f0xx/SConstruct b/bsp/stm32/libraries/templates/stm32f0xx/SConstruct
index 58a2c139bc..0cd04d4df0 100644
--- a/bsp/stm32/libraries/templates/stm32f0xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32f0xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32f10x/SConstruct b/bsp/stm32/libraries/templates/stm32f10x/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/libraries/templates/stm32f10x/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32f10x/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32f2xx/SConstruct b/bsp/stm32/libraries/templates/stm32f2xx/SConstruct
index 45ad323e44..00e3996b8f 100644
--- a/bsp/stm32/libraries/templates/stm32f2xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32f2xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F2xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32f3xx/SConstruct b/bsp/stm32/libraries/templates/stm32f3xx/SConstruct
index 18426367fc..bd081c2543 100644
--- a/bsp/stm32/libraries/templates/stm32f3xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32f3xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F3xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32f4xx/SConstruct b/bsp/stm32/libraries/templates/stm32f4xx/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/libraries/templates/stm32f4xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32f4xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32l1xx/SConstruct b/bsp/stm32/libraries/templates/stm32l1xx/SConstruct
index 593655f70f..ca15d6b4fe 100644
--- a/bsp/stm32/libraries/templates/stm32l1xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32l1xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32l4xx/SConstruct b/bsp/stm32/libraries/templates/stm32l4xx/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/libraries/templates/stm32l4xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32l4xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32l5xx/SConstruct b/bsp/stm32/libraries/templates/stm32l5xx/SConstruct
index 6a27defff6..9bd06d2103 100644
--- a/bsp/stm32/libraries/templates/stm32l5xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32l5xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32mp1xx/SConstruct b/bsp/stm32/libraries/templates/stm32mp1xx/SConstruct
index b66fab1255..4251a612d9 100644
--- a/bsp/stm32/libraries/templates/stm32mp1xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32mp1xx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/libraries/templates/stm32wbxx/SConstruct b/bsp/stm32/libraries/templates/stm32wbxx/SConstruct
index e4b174906b..27ef1acf35 100644
--- a/bsp/stm32/libraries/templates/stm32wbxx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32wbxx/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32WBxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f072-st-nucleo/SConstruct b/bsp/stm32/stm32f072-st-nucleo/SConstruct
index 1cd4ca59ce..e6062e3dfd 100644
--- a/bsp/stm32/stm32f072-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f072-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+"HAL_Drivers", duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f091-st-nucleo/SConstruct b/bsp/stm32/stm32f091-st-nucleo/SConstruct
index 58a2c139bc..0cd04d4df0 100644
--- a/bsp/stm32/stm32f091-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f091-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-100ask-mini/SConstruct b/bsp/stm32/stm32f103-100ask-mini/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-100ask-mini/SConstruct
+++ b/bsp/stm32/stm32f103-100ask-mini/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-100ask-pro/SConstruct b/bsp/stm32/stm32f103-100ask-pro/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-100ask-pro/SConstruct
+++ b/bsp/stm32/stm32f103-100ask-pro/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-atk-nano/SConstruct b/bsp/stm32/stm32f103-atk-nano/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-atk-nano/SConstruct
+++ b/bsp/stm32/stm32f103-atk-nano/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-atk-warshipv3/SConstruct b/bsp/stm32/stm32f103-atk-warshipv3/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-atk-warshipv3/SConstruct
+++ b/bsp/stm32/stm32f103-atk-warshipv3/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-blue-pill/SConstruct b/bsp/stm32/stm32f103-blue-pill/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-blue-pill/SConstruct
+++ b/bsp/stm32/stm32f103-blue-pill/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-dofly-M3S/SConstruct b/bsp/stm32/stm32f103-dofly-M3S/SConstruct
index af8d39d821..81c7a351ce 100644
--- a/bsp/stm32/stm32f103-dofly-M3S/SConstruct
+++ b/bsp/stm32/stm32f103-dofly-M3S/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-dofly-lyc8/SConstruct b/bsp/stm32/stm32f103-dofly-lyc8/SConstruct
index 0b03791ed0..be1b1b2b1d 100644
--- a/bsp/stm32/stm32f103-dofly-lyc8/SConstruct
+++ b/bsp/stm32/stm32f103-dofly-lyc8/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-fire-arbitrary/SConstruct b/bsp/stm32/stm32f103-fire-arbitrary/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-fire-arbitrary/SConstruct
+++ b/bsp/stm32/stm32f103-fire-arbitrary/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-gizwits-gokitv21/SConstruct b/bsp/stm32/stm32f103-gizwits-gokitv21/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-gizwits-gokitv21/SConstruct
+++ b/bsp/stm32/stm32f103-gizwits-gokitv21/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-hw100k-ibox/SConstruct b/bsp/stm32/stm32f103-hw100k-ibox/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-hw100k-ibox/SConstruct
+++ b/bsp/stm32/stm32f103-hw100k-ibox/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-onenet-nbiot/SConstruct b/bsp/stm32/stm32f103-onenet-nbiot/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-onenet-nbiot/SConstruct
+++ b/bsp/stm32/stm32f103-onenet-nbiot/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-yf-ufun/SConstruct b/bsp/stm32/stm32f103-yf-ufun/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-yf-ufun/SConstruct
+++ b/bsp/stm32/stm32f103-yf-ufun/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f103-ys-f1pro/SConstruct b/bsp/stm32/stm32f103-ys-f1pro/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f103-ys-f1pro/SConstruct
+++ b/bsp/stm32/stm32f103-ys-f1pro/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f107-uc-eval/SConstruct b/bsp/stm32/stm32f107-uc-eval/SConstruct
index 870efaf708..2c06ce2b62 100644
--- a/bsp/stm32/stm32f107-uc-eval/SConstruct
+++ b/bsp/stm32/stm32f107-uc-eval/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f207-st-nucleo/SConstruct b/bsp/stm32/stm32f207-st-nucleo/SConstruct
index 45ad323e44..00e3996b8f 100644
--- a/bsp/stm32/stm32f207-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f207-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F2xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f302-st-nucleo/SConstruct b/bsp/stm32/stm32f302-st-nucleo/SConstruct
index 18426367fc..bd081c2543 100644
--- a/bsp/stm32/stm32f302-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f302-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F3xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f401-st-nucleo/SConstruct b/bsp/stm32/stm32f401-st-nucleo/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f401-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f401-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f401-weact-blackpill/SConstruct b/bsp/stm32/stm32f401-weact-blackpill/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f401-weact-blackpill/SConstruct
+++ b/bsp/stm32/stm32f401-weact-blackpill/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f405-smdz-breadfruit/SConstruct b/bsp/stm32/stm32f405-smdz-breadfruit/SConstruct
index e77a63ac80..b321120204 100644
--- a/bsp/stm32/stm32f405-smdz-breadfruit/SConstruct
+++ b/bsp/stm32/stm32f405-smdz-breadfruit/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f407-armfly-v5/SConstruct b/bsp/stm32/stm32f407-armfly-v5/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f407-armfly-v5/SConstruct
+++ b/bsp/stm32/stm32f407-armfly-v5/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f407-atk-explorer/SConstruct b/bsp/stm32/stm32f407-atk-explorer/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f407-atk-explorer/SConstruct
+++ b/bsp/stm32/stm32f407-atk-explorer/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f407-robomaster-c/SConstruct b/bsp/stm32/stm32f407-robomaster-c/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f407-robomaster-c/SConstruct
+++ b/bsp/stm32/stm32f407-robomaster-c/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f407-st-discovery/SConstruct b/bsp/stm32/stm32f407-st-discovery/SConstruct
index a1d21c0e34..2821d50139 100644
--- a/bsp/stm32/stm32f407-st-discovery/SConstruct
+++ b/bsp/stm32/stm32f407-st-discovery/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f410-st-nucleo/SConstruct b/bsp/stm32/stm32f410-st-nucleo/SConstruct
index a1d21c0e34..2821d50139 100644
--- a/bsp/stm32/stm32f410-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f410-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f411-atk-nano/SConstruct b/bsp/stm32/stm32f411-atk-nano/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f411-atk-nano/SConstruct
+++ b/bsp/stm32/stm32f411-atk-nano/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f411-st-nucleo/SConstruct b/bsp/stm32/stm32f411-st-nucleo/SConstruct
index a1d21c0e34..2821d50139 100644
--- a/bsp/stm32/stm32f411-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f411-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f411-weact-blackpill/SConstruct b/bsp/stm32/stm32f411-weact-blackpill/SConstruct
index a1d21c0e34..2821d50139 100644
--- a/bsp/stm32/stm32f411-weact-blackpill/SConstruct
+++ b/bsp/stm32/stm32f411-weact-blackpill/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f412-st-nucleo/SConstruct b/bsp/stm32/stm32f412-st-nucleo/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f412-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f412-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f413-st-nucleo/SConstruct b/bsp/stm32/stm32f413-st-nucleo/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f413-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f413-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f427-robomaster-a/SConstruct b/bsp/stm32/stm32f427-robomaster-a/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f427-robomaster-a/SConstruct
+++ b/bsp/stm32/stm32f427-robomaster-a/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f429-armfly-v6/SConstruct b/bsp/stm32/stm32f429-armfly-v6/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f429-armfly-v6/SConstruct
+++ b/bsp/stm32/stm32f429-armfly-v6/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f429-atk-apollo/SConstruct b/bsp/stm32/stm32f429-atk-apollo/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f429-atk-apollo/SConstruct
+++ b/bsp/stm32/stm32f429-atk-apollo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f429-fire-challenger/SConstruct b/bsp/stm32/stm32f429-fire-challenger/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f429-fire-challenger/SConstruct
+++ b/bsp/stm32/stm32f429-fire-challenger/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f429-st-disco/SConstruct b/bsp/stm32/stm32f429-st-disco/SConstruct
index a1d21c0e34..2821d50139 100644
--- a/bsp/stm32/stm32f429-st-disco/SConstruct
+++ b/bsp/stm32/stm32f429-st-disco/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f446-st-nucleo/SConstruct b/bsp/stm32/stm32f446-st-nucleo/SConstruct
index cf42db1d75..b321fd9f02 100644
--- a/bsp/stm32/stm32f446-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f446-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f469-st-disco/SConstruct b/bsp/stm32/stm32f469-st-disco/SConstruct
index 432cff21f4..eddc55f1cf 100644
--- a/bsp/stm32/stm32f469-st-disco/SConstruct
+++ b/bsp/stm32/stm32f469-st-disco/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# include ports
objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')))
diff --git a/bsp/stm32/stm32f723-st-disco/SConstruct b/bsp/stm32/stm32f723-st-disco/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/stm32f723-st-disco/SConstruct
+++ b/bsp/stm32/stm32f723-st-disco/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f746-st-disco/SConstruct b/bsp/stm32/stm32f746-st-disco/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/stm32f746-st-disco/SConstruct
+++ b/bsp/stm32/stm32f746-st-disco/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f746-st-nucleo/SConstruct b/bsp/stm32/stm32f746-st-nucleo/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/stm32f746-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f746-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f767-atk-apollo/SConstruct b/bsp/stm32/stm32f767-atk-apollo/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/stm32f767-atk-apollo/SConstruct
+++ b/bsp/stm32/stm32f767-atk-apollo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f767-fire-challenger-v1/SConstruct b/bsp/stm32/stm32f767-fire-challenger-v1/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/stm32f767-fire-challenger-v1/SConstruct
+++ b/bsp/stm32/stm32f767-fire-challenger-v1/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f767-st-nucleo/SConstruct b/bsp/stm32/stm32f767-st-nucleo/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/stm32f767-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32f767-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f769-st-disco/SConstruct b/bsp/stm32/stm32f769-st-disco/SConstruct
index ada3672e5f..6d05480e48 100644
--- a/bsp/stm32/stm32f769-st-disco/SConstruct
+++ b/bsp/stm32/stm32f769-st-disco/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32g070-st-nucleo/SConstruct b/bsp/stm32/stm32g070-st-nucleo/SConstruct
index 8d358b6e41..eab92b6e1c 100644
--- a/bsp/stm32/stm32g070-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32g070-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32G0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32g071-st-nucleo/SConstruct b/bsp/stm32/stm32g071-st-nucleo/SConstruct
index 8d358b6e41..eab92b6e1c 100644
--- a/bsp/stm32/stm32g071-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32g071-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32G0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32g431-st-nucleo/SConstruct b/bsp/stm32/stm32g431-st-nucleo/SConstruct
index b793ea3dd0..98b47d0529 100644
--- a/bsp/stm32/stm32g431-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32g431-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32G4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32g474-st-nucleo/SConstruct b/bsp/stm32/stm32g474-st-nucleo/SConstruct
index b793ea3dd0..98b47d0529 100644
--- a/bsp/stm32/stm32g474-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32g474-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32G4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32h743-atk-apollo/SConstruct b/bsp/stm32/stm32h743-atk-apollo/SConstruct
index 3627dcfe83..44fbddb854 100644
--- a/bsp/stm32/stm32h743-atk-apollo/SConstruct
+++ b/bsp/stm32/stm32h743-atk-apollo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32h743-openmv-h7plus/SConstruct b/bsp/stm32/stm32h743-openmv-h7plus/SConstruct
index 3627dcfe83..44fbddb854 100644
--- a/bsp/stm32/stm32h743-openmv-h7plus/SConstruct
+++ b/bsp/stm32/stm32h743-openmv-h7plus/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l010-st-nucleo/SConstruct b/bsp/stm32/stm32l010-st-nucleo/SConstruct
index 60294ba65b..fced604182 100644
--- a/bsp/stm32/stm32l010-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l010-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l053-st-nucleo/SConstruct b/bsp/stm32/stm32l053-st-nucleo/SConstruct
index 60294ba65b..fced604182 100644
--- a/bsp/stm32/stm32l053-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l053-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l412-st-nucleo/SConstruct b/bsp/stm32/stm32l412-st-nucleo/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l412-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l412-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l431-BearPi/SConstruct b/bsp/stm32/stm32l431-BearPi/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l431-BearPi/SConstruct
+++ b/bsp/stm32/stm32l431-BearPi/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l432-st-nucleo/SConstruct b/bsp/stm32/stm32l432-st-nucleo/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l432-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l432-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l433-ali-startkit/SConstruct b/bsp/stm32/stm32l433-ali-startkit/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l433-ali-startkit/SConstruct
+++ b/bsp/stm32/stm32l433-ali-startkit/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l433-st-nucleo/SConstruct b/bsp/stm32/stm32l433-st-nucleo/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l433-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l433-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l452-st-nucleo/SConstruct b/bsp/stm32/stm32l452-st-nucleo/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l452-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l452-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l475-atk-pandora/SConstruct b/bsp/stm32/stm32l475-atk-pandora/SConstruct
index 4c67148536..0f1b66be80 100644
--- a/bsp/stm32/stm32l475-atk-pandora/SConstruct
+++ b/bsp/stm32/stm32l475-atk-pandora/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')))
diff --git a/bsp/stm32/stm32l475-st-discovery/SConstruct b/bsp/stm32/stm32l475-st-discovery/SConstruct
index 8bdea16505..d14ee65eeb 100644
--- a/bsp/stm32/stm32l475-st-discovery/SConstruct
+++ b/bsp/stm32/stm32l475-st-discovery/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l476-st-nucleo/SConstruct b/bsp/stm32/stm32l476-st-nucleo/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l476-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l476-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l496-ali-developer/SConstruct b/bsp/stm32/stm32l496-ali-developer/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l496-ali-developer/SConstruct
+++ b/bsp/stm32/stm32l496-ali-developer/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l496-st-discovery/SConstruct b/bsp/stm32/stm32l496-st-discovery/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l496-st-discovery/SConstruct
+++ b/bsp/stm32/stm32l496-st-discovery/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l496-st-nucleo/SConstruct b/bsp/stm32/stm32l496-st-nucleo/SConstruct
index 8f7aa79f94..1560b1341c 100644
--- a/bsp/stm32/stm32l496-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l496-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l4r5-st-nucleo/SConstruct b/bsp/stm32/stm32l4r5-st-nucleo/SConstruct
index 5fe5df200c..d85b31f894 100644
--- a/bsp/stm32/stm32l4r5-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l4r5-st-nucleo/SConstruct
@@ -50,10 +50,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l4r9-st-eval/SConstruct b/bsp/stm32/stm32l4r9-st-eval/SConstruct
index 8bdea16505..d14ee65eeb 100644
--- a/bsp/stm32/stm32l4r9-st-eval/SConstruct
+++ b/bsp/stm32/stm32l4r9-st-eval/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct b/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct
index 8bdea16505..d14ee65eeb 100644
--- a/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct
+++ b/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32l552-st-nucleo/SConstruct b/bsp/stm32/stm32l552-st-nucleo/SConstruct
index 6a27defff6..9bd06d2103 100644
--- a/bsp/stm32/stm32l552-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32l552-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32L5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32mp157a-st-discovery/SConstruct b/bsp/stm32/stm32mp157a-st-discovery/SConstruct
index b66fab1255..4251a612d9 100644
--- a/bsp/stm32/stm32mp157a-st-discovery/SConstruct
+++ b/bsp/stm32/stm32mp157a-st-discovery/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32mp157a-st-ev1/SConstruct b/bsp/stm32/stm32mp157a-st-ev1/SConstruct
index b66fab1255..4251a612d9 100644
--- a/bsp/stm32/stm32mp157a-st-ev1/SConstruct
+++ b/bsp/stm32/stm32mp157a-st-ev1/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32u575-st-nucleo/SConstruct b/bsp/stm32/stm32u575-st-nucleo/SConstruct
index b6f563294a..25c152bf4a 100644
--- a/bsp/stm32/stm32u575-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32u575-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32U5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32wb55-st-nucleo/SConstruct b/bsp/stm32/stm32wb55-st-nucleo/SConstruct
index e4b174906b..27ef1acf35 100644
--- a/bsp/stm32/stm32wb55-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32wb55-st-nucleo/SConstruct
@@ -51,10 +51,9 @@ stm32_library = 'STM32WBxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32wl55-st-nucleo/SConstruct b/bsp/stm32/stm32wl55-st-nucleo/SConstruct
index 674a351c62..d529d96a91 100644
--- a/bsp/stm32/stm32wl55-st-nucleo/SConstruct
+++ b/bsp/stm32/stm32wl55-st-nucleo/SConstruct
@@ -50,10 +50,8 @@ stm32_library = 'STM32WLxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32wle5-yizhilian-lm401/SConstruct b/bsp/stm32/stm32wle5-yizhilian-lm401/SConstruct
index 674a351c62..bc3611c00c 100644
--- a/bsp/stm32/stm32wle5-yizhilian-lm401/SConstruct
+++ b/bsp/stm32/stm32wle5-yizhilian-lm401/SConstruct
@@ -50,10 +50,9 @@ stm32_library = 'STM32WLxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32wle5-yizhilian-lm402/SConstruct b/bsp/stm32/stm32wle5-yizhilian-lm402/SConstruct
index 674a351c62..bc3611c00c 100644
--- a/bsp/stm32/stm32wle5-yizhilian-lm402/SConstruct
+++ b/bsp/stm32/stm32wle5-yizhilian-lm402/SConstruct
@@ -50,10 +50,9 @@ stm32_library = 'STM32WLxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
# 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='build/libraries/'+stm32_library, duplicate=0))
# 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='build/libraries/'+'HAL_Drivers', duplicate=0))
# make a building
DoBuilding(TARGET, objs)