rt-thread-official/bsp/stm32/stm32f767-fire-challenger-v1/board/SConscript

41 lines
1.1 KiB
Python
Raw Permalink Normal View History

2018-12-14 09:44:05 +08:00
import os
import rtconfig
from building import *
2018-12-14 09:44:05 +08:00
Import('SDK_LIB')
cwd = GetCurrentDir()
2018-12-14 09:44:05 +08:00
# add general drivers
src = Split('''
board.c
CubeMX_Config/Src/stm32f7xx_hal_msp.c
''')
if GetDepend(['BSP_USING_ETH']):
src += Glob('ports/phy_reset.c')
2018-12-12 16:49:27 +08:00
if GetDepend(['BSP_USING_QSPI_FLASH']):
2018-12-14 09:44:05 +08:00
src += Glob('ports/drv_qspi_flash.c')
2019-01-15 16:17:01 +08:00
if GetDepend(['BSP_USING_SDCARD']):
src += Glob('ports/sdcard_port.c')
2018-12-14 09:44:05 +08:00
path = [cwd]
path += [cwd + '/CubeMX_Config/Inc']
path += [cwd + '/ports']
2018-12-14 09:44:05 +08:00
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
2018-12-14 09:44:05 +08:00
src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f767xx.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
2018-12-14 09:44:05 +08:00
src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/arm/startup_stm32f767xx.s']
elif rtconfig.PLATFORM in ['iccarm']:
2018-12-14 09:44:05 +08:00
src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/iar/startup_stm32f767xx.s']
CPPDEFINES = ['STM32F767xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
2023-01-09 10:14:23 +08:00
Return('group')