You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
4.6 KiB
120 lines
4.6 KiB
5 months ago
|
import rtconfig
|
||
|
from building import *
|
||
|
|
||
|
# get current directory
|
||
|
cwd = GetCurrentDir()
|
||
|
|
||
|
# The set of source files associated with this SConscript file.
|
||
|
|
||
|
src = Split('''
|
||
|
CMSIS/Device/ST/STM32H5xx/Source/Templates/system_stm32h5xx.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_comp.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cortex.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_crc.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_crc_ex.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cryp.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_cryp_ex.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma_ex.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_exti.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_pwr.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_pwr_ex.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_rcc.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_rcc_ex.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_rng.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gpio.c
|
||
|
STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_icache.c
|
||
|
''')
|
||
|
|
||
|
if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_uart.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_uart_ex.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_usart.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_usart_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_I2C']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_i2c.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_i2c_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_SPI']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_spi.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_spi_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_USB']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_hcd.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_pcd.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_pcd_ex.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_ll_usb.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_CAN']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_can.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_lptim.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_tim.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_tim_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_ADC']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_adc_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_DAC']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dac.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dac_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_RTC']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_rtc.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_rtc_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_WDT']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_iwdg.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_wwdg.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_SDIO']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_sd.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_sd_ex.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_ll_sdmmc.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_AUDIO']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_sai.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_sai_ex.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_MTD_NOR']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_nor.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_MTD_NAND']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_nand.c']
|
||
|
|
||
|
if GetDepend(['RT_USING_PM']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_lptim.c']
|
||
|
|
||
|
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ex.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_flash_ramfunc.c']
|
||
|
|
||
|
if GetDepend(['BSP_USING_FMC']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_ll_fmc.c']
|
||
|
|
||
|
if GetDepend(['BSP_USING_GFXMMU']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_gfxmmu.c']
|
||
|
|
||
|
if GetDepend(['BSP_USING_DSI']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dsi.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_dma2d.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_ll_dma2d.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_ltdc.c']
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_ltdc_ex.c']
|
||
|
|
||
|
if GetDepend(['BSP_USING_SRAM']):
|
||
|
src += ['STM32H5xx_HAL_Driver/Src/stm32h5xx_hal_sram.c']
|
||
|
|
||
|
path = [cwd + '/STM32H5xx_HAL_Driver/Inc',
|
||
|
cwd + '/CMSIS/Device/ST/STM32H5xx/Include']
|
||
|
|
||
|
CPPDEFINES = ['USE_HAL_DRIVER']
|
||
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
||
|
|
||
|
Return('group')
|