1
0
Эх сурвалжийг харах

[bsp][stm32] modify board/SConscript

SummerGift 6 жил өмнө
parent
commit
6ef13c82aa

+ 3 - 4
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']

+ 3 - 4
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']

+ 3 - 4
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']

+ 3 - 4
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']

+ 3 - 4
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']

+ 3 - 4
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']

+ 3 - 4
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']

+ 3 - 4
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']