rt-thread/bsp/stm32/stm32h750-artpi-h750/board/SConscript

59 lines
1.8 KiB
Python
Raw Normal View History

2021-09-11 13:54:34 +08:00
import os
2020-11-22 14:51:43 +08:00
import rtconfig
from building import *
2021-09-11 13:54:34 +08:00
objs = []
2020-11-22 14:51:43 +08:00
cwd = GetCurrentDir()
2021-09-11 13:54:34 +08:00
list = os.listdir(cwd)
2020-11-22 14:51:43 +08:00
# add the general drivers.
src = Glob('board.c')
src += Glob('CubeMX_Config/Core/Src/stm32h7xx_hal_msp.c')
if GetDepend(['BSP_USING_QSPI_FLASH']):
2021-09-11 13:54:34 +08:00
src += Glob('port/drv_qspi_flash.c')
2020-11-22 14:51:43 +08:00
2021-09-11 13:54:34 +08:00
if GetDepend(['BSP_USING_SPI_LCD_ILI9488']):
src += Glob('drv_spi_ili9488.c')
if GetDepend(['BSP_USING_SPI_FLASH']):
src += Glob('port/spi_flash_init.c')
if GetDepend(['BSP_USING_FS']):
src += Glob('port/filesystem.c')
if GetDepend(['BSP_USING_SDIO_ARTPI']):
src += Glob('port/drv_sdio.c')
if GetDepend(['BSP_USING_WIFI']):
src += Glob('port/wifi_config.c')
src += Glob('port/drv_wlan.c')
if GetDepend(['BSP_USING_ETH_H750']):
src += Glob('port/drv_eth.c')
if GetDepend(['PKG_USING_EASYFLASH']):
src += Glob('port/ef_fal_port.c')
for item in list:
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
objs = objs + SConscript(os.path.join(item, 'SConscript'))
2020-11-22 14:51:43 +08:00
path = [cwd]
path += [cwd + '/CubeMX_Config/Core/Inc']
2021-09-11 13:54:34 +08:00
path += [cwd + '/port']
2020-11-22 14:51:43 +08:00
if rtconfig.CROSS_TOOL == 'gcc':
src += [cwd + '/../../libraries/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s']
elif rtconfig.CROSS_TOOL == 'keil':
src += [cwd + '/../../libraries/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h750xx.s']
elif rtconfig.CROSS_TOOL == 'iar':
src += [cwd + '/../../libraries/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h750xx.s']
2021-09-11 13:54:34 +08:00
2020-11-22 14:51:43 +08:00
# STM32H743xx || STM32H750xx || STM32F753xx
# You can select chips from the list above
CPPDEFINES = ['STM32H750xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')