43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
import rtconfig
|
|
from building import *
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
path = [cwd]
|
|
path += [cwd + '/CubeMX_Config/Inc']
|
|
path += [cwd + '/ports']
|
|
|
|
# add the general drivers.
|
|
src = Glob('board.c')
|
|
src += Glob('CubeMX_Config/Src/stm32h7xx_hal_msp.c')
|
|
|
|
if GetDepend(['BSP_USING_SPI_FLASH']):
|
|
src += Glob('ports/drv_spi_flash.c')
|
|
|
|
if GetDepend(['BSP_USING_QSPI_FLASH']):
|
|
src += Glob('ports/drv_qspi_flash.c')
|
|
|
|
if GetDepend('BSP_USING_LCD_SPI'):
|
|
src = src + ['ports/drv_lcd_spi.c']
|
|
src = src + ['ports/st7735/lcd.c']
|
|
src = src + ['ports/st7735/st7735.c']
|
|
src = src + ['ports/st7735/st7735_reg.c']
|
|
src = src + ['ports/st7735/logo.c']
|
|
path += [cwd + '/ports/st7735']
|
|
|
|
|
|
|
|
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']
|
|
|
|
# STM32H743xx || STM32H750xx || STM32F753xx
|
|
# You can select chips from the list above
|
|
CPPDEFINES = ['STM32H750xx']
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
Return('group')
|