diff options
| author | SummerGift <[email protected]> | 2018-12-13 10:56:09 +0800 |
|---|---|---|
| committer | SummerGift <[email protected]> | 2018-12-13 12:05:40 +0800 |
| commit | 968110ffd61dcc30a48c98308b034fcaf532cdb7 (patch) | |
| tree | 4efa463a1f8822effc6b003771ac0c7445ed3f63 /bsp/stm32/stm32f103-fire-arbitrary/board/SConscript | |
| parent | dcf7bce2cc5d04bcb006b84a27a5498f42268184 (diff) | |
[bsp][stm32] add scons --dist function
Diffstat (limited to 'bsp/stm32/stm32f103-fire-arbitrary/board/SConscript')
| -rw-r--r-- | bsp/stm32/stm32f103-fire-arbitrary/board/SConscript | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript b/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript index 892d5d6fec..868e5b8a48 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/SConscript @@ -1,9 +1,11 @@ +import os import rtconfig from building import * cwd = GetCurrentDir() -src = Glob('board.c') +# add general drivers +src = Glob('board.c') src += Glob('CubeMX_Config/Src/stm32f1xx_hal_msp.c') if GetDepend(['BSP_USING_ETH']): @@ -16,12 +18,17 @@ 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' + if rtconfig.CROSS_TOOL == 'gcc': - src += [cwd + '/../../libraries/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.s'] + src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.s'] elif rtconfig.CROSS_TOOL == 'keil': - src += [cwd + '/../../libraries/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xe.s'] + src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xe.s'] elif rtconfig.CROSS_TOOL == 'iar': - src += [cwd + '/../../libraries/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s'] + src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s'] CPPDEFINES = ['STM32F103xE'] group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) |
