From 4a65d1987f3b62eb544d8d54524d447186ab5159 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 22 May 2019 08:23:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91F746=20bsp?= =?UTF-8?q?=20=E7=9A=84=20dist=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32/stm32f746-st-disco/SConstruct | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/bsp/stm32/stm32f746-st-disco/SConstruct b/bsp/stm32/stm32f746-st-disco/SConstruct index 012e6b41bf..ca0f33d692 100644 --- a/bsp/stm32/stm32f746-st-disco/SConstruct +++ b/bsp/stm32/stm32f746-st-disco/SConstruct @@ -33,16 +33,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) -SDK_ROOT = os.path.abspath('./') - -# include drivers -objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/STM32F7xx_HAL/SConscript')) +stm32_library = 'STM32F7xx_HAL' +rtconfig.BSP_LIBRARY_TYPE = stm32_library # include libraries -objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/HAL_Drivers/SConscript')) +objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) + +# include drivers +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) # make a building DoBuilding(TARGET, objs)