summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-08-31 08:55:07 +0800
committerGitHub <[email protected]>2020-08-31 08:55:07 +0800
commitd272c9aaf71746708d0da9cf202c0b0995a24c3d (patch)
tree4918041f83b5e8679f10191ced743b9944c85678 /bsp
parent3626325277fbce36ccfe6b602422dafbdbe41a57 (diff)
parenta1877017f7ef40390995a8f872cffef1e18ea419 (diff)
Merge pull request #3856 from SummerLife/master_710
[stm32][bsp] fix stm32f769-st-disco bsp scons --dist function
Diffstat (limited to 'bsp')
-rw-r--r--bsp/stm32/libraries/templates/stm32f7xx/SConstruct18
-rw-r--r--bsp/stm32/stm32f769-st-disco/SConstruct18
2 files changed, 26 insertions, 10 deletions
diff --git a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct
index 147d9a0e4a..050835a35a 100644
--- a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct
+++ b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct
@@ -34,19 +34,27 @@ if rtconfig.PLATFORM == 'iar':
Export('RTT_ROOT')
Export('rtconfig')
+SDK_ROOT = os.path.abspath('./')
+
+if os.path.exists(SDK_ROOT + '/libraries'):
+ libraries_path_prefix = SDK_ROOT + '/libraries'
+else:
+ libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
+
+SDK_LIB = libraries_path_prefix
+Export('SDK_LIB')
+
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
-SDK_ROOT = os.path.abspath('./')
+# include libraries
+objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include drivers
-objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/STM32F7xx_HAL/SConscript'))
-
-# include libraries
-objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/HAL_Drivers/SConscript'))
+objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
# make a building
DoBuilding(TARGET, objs)
diff --git a/bsp/stm32/stm32f769-st-disco/SConstruct b/bsp/stm32/stm32f769-st-disco/SConstruct
index 147d9a0e4a..050835a35a 100644
--- a/bsp/stm32/stm32f769-st-disco/SConstruct
+++ b/bsp/stm32/stm32f769-st-disco/SConstruct
@@ -34,19 +34,27 @@ if rtconfig.PLATFORM == 'iar':
Export('RTT_ROOT')
Export('rtconfig')
+SDK_ROOT = os.path.abspath('./')
+
+if os.path.exists(SDK_ROOT + '/libraries'):
+ libraries_path_prefix = SDK_ROOT + '/libraries'
+else:
+ libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
+
+SDK_LIB = libraries_path_prefix
+Export('SDK_LIB')
+
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library
-SDK_ROOT = os.path.abspath('./')
+# include libraries
+objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include drivers
-objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/STM32F7xx_HAL/SConscript'))
-
-# include libraries
-objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/HAL_Drivers/SConscript'))
+objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
# make a building
DoBuilding(TARGET, objs)