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

63 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 *
Import('SDK_LIB')
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('port/drv_spi_ili9488.c')
2021-09-11 13:54:34 +08:00
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')
2023-01-09 10:14:23 +08:00
src += Glob('port/drv_wlan.c')
2021-09-11 13:54:34 +08:00
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
startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h750xx.s']
elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h750xx.s']
2023-01-09 10:14:23 +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')