59 lines
1.7 KiB
Python
59 lines
1.7 KiB
Python
|
'''
|
||
|
Author: spaceman
|
||
|
Date: 2023-03-21 02:10:16
|
||
|
LastEditTime: 2023-03-25 18:59:06
|
||
|
LastEditors: spaceman
|
||
|
Description:
|
||
|
FilePath: \stm32h750-fk750m1-vbt6\board\SConscript
|
||
|
'''
|
||
|
import os
|
||
|
import rtconfig
|
||
|
from building import *
|
||
|
|
||
|
Import('SDK_LIB')
|
||
|
|
||
|
objs = []
|
||
|
cwd = GetCurrentDir()
|
||
|
list = os.listdir(cwd)
|
||
|
|
||
|
path = [cwd]
|
||
|
path += [cwd + '/CubeMX_Config/Inc']
|
||
|
path += [cwd + '/port']
|
||
|
|
||
|
# add the general drivers.
|
||
|
src = Glob('board.c')
|
||
|
src += Glob('CubeMX_Config/Src/stm32h7xx_hal_msp.c')
|
||
|
|
||
|
if GetDepend('BSP_USING_LCD_SPI'):
|
||
|
src = src + ['port/lcd/drv_lcd_spi.c']
|
||
|
src = src + ['port/lcd/drv_lcd_spi_ext.c']
|
||
|
path += [cwd + '/port/lcd']
|
||
|
|
||
|
if GetDepend('BSP_USING_DCMI'):
|
||
|
src = src + ['port/camera/drv_dcmi.c']
|
||
|
path += [cwd + '/port/camera']
|
||
|
|
||
|
if GetDepend('BSP_USING_OV2640'):
|
||
|
src = src + ['port/camera/drv_ov2640.c']
|
||
|
path += [cwd + '/port/camera']
|
||
|
|
||
|
for item in list:
|
||
|
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
||
|
objs = objs + SConscript(os.path.join(item, 'SConscript'))
|
||
|
|
||
|
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']
|
||
|
|
||
|
# STM32H743xx || STM32H750xx || STM32F753xx
|
||
|
# You can select chips from the list above
|
||
|
CPPDEFINES = ['STM32H750xx']
|
||
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
||
|
|
||
|
Return('group')
|