From 6ef13c82aaa03a9b0a1200cb8c9cb34b33172890 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Thu, 13 Dec 2018 15:09:35 +0800 Subject: [PATCH] [bsp][stm32] modify board/SConscript --- bsp/stm32/libraries/templates/stm32f10x/board/SConscript | 7 +++---- bsp/stm32/libraries/templates/stm32f4xx/board/SConscript | 7 +++---- bsp/stm32/libraries/templates/stm32l4xx/board/SConscript | 7 +++---- bsp/stm32/stm32f103-atk-nano/board/SConscript | 7 +++---- bsp/stm32/stm32f103-fire-arbitrary/board/SConscript | 7 +++---- bsp/stm32/stm32f407-atk-explorer/board/SConscript | 7 +++---- bsp/stm32/stm32f429-atk-apollo/board/SConscript | 7 +++---- bsp/stm32/stm32f429-fire-challenger/board/SConscript | 7 +++---- 8 files changed, 24 insertions(+), 32 deletions(-) diff --git a/bsp/stm32/libraries/templates/stm32f10x/board/SConscript b/bsp/stm32/libraries/templates/stm32f10x/board/SConscript index 1ddc236ef5..2220836b65 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/board/SConscript +++ b/bsp/stm32/libraries/templates/stm32f10x/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -11,10 +13,7 @@ src += Glob('CubeMX_Config/Src/stm32f1xx_hal_msp.c') path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xb.s'] diff --git a/bsp/stm32/libraries/templates/stm32f4xx/board/SConscript b/bsp/stm32/libraries/templates/stm32f4xx/board/SConscript index e7b053a70a..4a2bfc231f 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/board/SConscript +++ b/bsp/stm32/libraries/templates/stm32f4xx/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -11,10 +13,7 @@ src += Glob('CubeMX_Config/Src/stm32f4xx_hal_msp.c') path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f407xx.s'] diff --git a/bsp/stm32/libraries/templates/stm32l4xx/board/SConscript b/bsp/stm32/libraries/templates/stm32l4xx/board/SConscript index eaa002ca9a..0266cdaa24 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/board/SConscript +++ b/bsp/stm32/libraries/templates/stm32l4xx/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -11,10 +13,7 @@ src += Glob('CubeMX_Config/Src/stm32l4xx_hal_msp.c') path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l475xx.s'] diff --git a/bsp/stm32/stm32f103-atk-nano/board/SConscript b/bsp/stm32/stm32f103-atk-nano/board/SConscript index fe2f1bb3f5..2403d7fb3d 100644 --- a/bsp/stm32/stm32f103-atk-nano/board/SConscript +++ b/bsp/stm32/stm32f103-atk-nano/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -15,10 +17,7 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xb.s'] diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript b/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript index 868e5b8a48..f26304c6d2 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -18,10 +20,7 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.s'] diff --git a/bsp/stm32/stm32f407-atk-explorer/board/SConscript b/bsp/stm32/stm32f407-atk-explorer/board/SConscript index 861030d80f..cb20cf76e8 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/SConscript +++ b/bsp/stm32/stm32f407-atk-explorer/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -18,10 +20,7 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f407xx.s'] diff --git a/bsp/stm32/stm32f429-atk-apollo/board/SConscript b/bsp/stm32/stm32f429-atk-apollo/board/SConscript index 9e38a44209..2cf3a648da 100644 --- a/bsp/stm32/stm32f429-atk-apollo/board/SConscript +++ b/bsp/stm32/stm32f429-atk-apollo/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -18,10 +20,7 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.s'] diff --git a/bsp/stm32/stm32f429-fire-challenger/board/SConscript b/bsp/stm32/stm32f429-fire-challenger/board/SConscript index 00d86f2c33..c633cff75c 100644 --- a/bsp/stm32/stm32f429-fire-challenger/board/SConscript +++ b/bsp/stm32/stm32f429-fire-challenger/board/SConscript @@ -2,6 +2,8 @@ import os import rtconfig from building import * +Import('SDK_LIB') + cwd = GetCurrentDir() # add general drivers @@ -18,10 +20,7 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -if os.path.exists(cwd + '/../libraries'): - startup_path_prefix = cwd + '/../libraries' -else: - startup_path_prefix = cwd + '/../../libraries' +startup_path_prefix = SDK_LIB if rtconfig.CROSS_TOOL == 'gcc': src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.s'] -- GitLab