From d9a312d55d44624aa0512f1a03857a1a44fcaf3d Mon Sep 17 00:00:00 2001 From: SummerGift Date: Thu, 30 Jul 2020 09:33:27 +0800 Subject: [PATCH] [bsp][stm32] update stm32h743-st-nucleo/board/SConscript to fix compiling error after dist --- bsp/stm32/stm32h743-st-nucleo/board/SConscript | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bsp/stm32/stm32h743-st-nucleo/board/SConscript b/bsp/stm32/stm32h743-st-nucleo/board/SConscript index 4a4c8068048..86e530023b6 100644 --- a/bsp/stm32/stm32h743-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32h743-st-nucleo/board/SConscript @@ -1,6 +1,8 @@ import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add the general drivers. @@ -10,12 +12,14 @@ src += Glob('CubeMX_Config/Src/stm32h7xx_hal_msp.c') path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] +startup_path_prefix = SDK_LIB + if rtconfig.CROSS_TOOL == 'gcc': - src += [cwd + '/../../libraries/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s'] + src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s'] elif rtconfig.CROSS_TOOL == 'keil': - src += [cwd + '/../../libraries/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h743xx.s'] + src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h743xx.s'] elif rtconfig.CROSS_TOOL == 'iar': - src += [cwd + '/../../libraries/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h743xx.s'] + src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h743xx.s'] # STM32H743xx || STM32H750xx || STM32F753xx # You can select chips from the list above