diff --git a/bsp/stm32/libraries/templates/stm32f10x/board/SConscript b/bsp/stm32/libraries/templates/stm32f10x/board/SConscript index 1ddc236ef5496289cdc0c6a83aabe625f67852d0..2220836b6572dd9f9d12134a083e4db2027fd6a7 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 e7b053a70ac2a51a47f7782e5277e1637bdc0e3d..4a2bfc231fbcc04a200774b3dc9160da49cc58b0 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 eaa002ca9a8b11909dee60940ca5d80cae72c2db..0266cdaa24be676f9be6cba8ccd1cc3f3c974c4e 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 fe2f1bb3f5e767fed66e3875b81c29f35eaaaf9b..2403d7fb3d21a7b2d7679a75f0c4817b4f6937ef 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 868e5b8a4821d7509f48eab08aade0b2705fae3f..f26304c6d27d51b916b2b13de17beceaa19fe5cf 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 861030d80fc17e83a34781ad2804503c61a5b511..cb20cf76e80581868e350d42b06dfccaf54704db 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 9e38a44209bdd613aa679d2c08a46078f5e433c3..2cf3a648da9b0dbe4647aaf36a0ee986825ab834 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 00d86f2c33960d0756c9b883bc714ab3db5029a3..c633cff75c5450f7a905472f7d140afe3996f3a2 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']