diff options
| author | SummerGift <[email protected]> | 2020-08-28 09:38:21 +0800 |
|---|---|---|
| committer | SummerGift <[email protected]> | 2020-08-28 09:38:55 +0800 |
| commit | a1877017f7ef40390995a8f872cffef1e18ea419 (patch) | |
| tree | 2d0594522e298c8b54d1327eac410df9144b4ec1 /bsp | |
| parent | 1b8244c73588080b6266c7977a7bbc3ef98b2027 (diff) | |
[stm32][bsp] f7 series bsp templates
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/stm32/libraries/templates/stm32f7xx/SConstruct | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct index 147d9a0e4a..050835a35a 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct +++ b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct @@ -34,19 +34,27 @@ if rtconfig.PLATFORM == 'iar': Export('RTT_ROOT') Export('rtconfig') +SDK_ROOT = os.path.abspath('./') + +if os.path.exists(SDK_ROOT + '/libraries'): + libraries_path_prefix = SDK_ROOT + '/libraries' +else: + libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' + +SDK_LIB = libraries_path_prefix +Export('SDK_LIB') + # prepare building environment objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) stm32_library = 'STM32F7xx_HAL' rtconfig.BSP_LIBRARY_TYPE = stm32_library -SDK_ROOT = os.path.abspath('./') +# include libraries +objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) # include drivers -objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/STM32F7xx_HAL/SConscript')) - -# include libraries -objs.extend(SConscript(os.path.dirname(SDK_ROOT) + '/libraries/HAL_Drivers/SConscript')) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) # make a building DoBuilding(TARGET, objs) |
