2020-06-20 14:03:35 +08:00
|
|
|
import rtconfig
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
|
|
|
|
src = Split('''
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_hsem.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_exti.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_ipcc.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_cortex.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dma.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dma_ex.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_mdma.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_pwr.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_pwr_ex.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_rcc.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_rcc_ex.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_gpio.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_adc.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_adc_ex.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dac.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dac_ex.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_i2c.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_i2c_ex.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_spi.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_tim.c
|
|
|
|
STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_tim_ex.c
|
|
|
|
''')
|
2020-09-04 10:23:08 +08:00
|
|
|
|
2023-12-03 01:32:27 +08:00
|
|
|
if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']):
|
2020-06-20 14:03:35 +08:00
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_uart.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_uart_ex.c']
|
|
|
|
|
2021-10-14 19:40:01 +08:00
|
|
|
if GetDepend(['RT_USING_USB']):
|
2020-06-20 14:03:35 +08:00
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_pccard.c']
|
2020-09-04 10:23:08 +08:00
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_pcd.c']
|
2020-06-20 14:03:35 +08:00
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_pcd_ex.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_hcd.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_ll_usb.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_CAN']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_can.c']
|
|
|
|
|
2020-06-23 10:43:18 +08:00
|
|
|
if GetDepend(['BSP_USING_WWDG']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_wwdg.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LPTIM']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_lptim.c']
|
2020-06-20 14:03:35 +08:00
|
|
|
|
|
|
|
if GetDepend(['RT_USING_RTC']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_rtc.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_rtc_ex.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_WDT']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_wwdg.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SDIO']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_ll_sdmmc.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_sd.c']
|
2020-12-02 17:09:33 +08:00
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_ll_delayblock.c']
|
2020-06-20 14:03:35 +08:00
|
|
|
|
|
|
|
if GetDepend(['RT_USING_AUDIO']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_sai.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_sai_ex.c']
|
2020-12-03 09:02:36 +08:00
|
|
|
if GetDepend(['BSP_USING_DCMI']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dcmi.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2020-06-20 14:03:35 +08:00
|
|
|
if GetDepend(['BSP_USING_FMC']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_ll_fmc.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_ll_fsmc.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SDRAM']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_sdram.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_EXT_FMC_IO']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_sram.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_flash.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_flash_ex.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_flash_ramfunc.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LTDC']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_ltdc.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_ltdc_ex.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dma2d.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_ll_dma2d.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dsi.c']
|
|
|
|
|
2020-12-04 17:57:39 +08:00
|
|
|
if GetDepend(['BSP_USING_FDCAN']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_fdcan.c']
|
|
|
|
|
2020-12-05 09:09:11 +08:00
|
|
|
if GetDepend(['BSP_USING_QSPI']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_qspi.c']
|
2020-12-05 09:27:55 +08:00
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SPDIFRX']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_spdifrx.c']
|
|
|
|
|
2020-12-05 09:43:08 +08:00
|
|
|
if GetDepend(['BSP_USING_DFSDM']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dfsdm.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_dfsdm_ex.c']
|
|
|
|
|
2020-11-26 14:29:41 +08:00
|
|
|
if GetDepend(['BSP_USING_HASH']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_hash.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_hash_ex.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_CRC']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_crc.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_crc_ex.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_RNG']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_rng.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_CRYP']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_cryp.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_cryp_ex.c']
|
|
|
|
|
2021-03-01 15:56:52 +08:00
|
|
|
if GetDepend(['BSP_USING_RTC']):
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_rtc.c']
|
|
|
|
src += ['STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_rtc_ex.c']
|
|
|
|
|
2020-06-20 14:03:35 +08:00
|
|
|
path = [cwd + '/STM32MP1xx_HAL_Driver/Inc',
|
2022-05-07 03:50:57 +08:00
|
|
|
cwd + '/CMSIS/Device/ST/STM32MP1xx/Include']
|
|
|
|
|
2020-06-20 14:03:35 +08:00
|
|
|
CPPDEFINES = ['USE_HAL_DRIVER']
|
2020-11-20 13:38:11 +08:00
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
2020-06-20 14:03:35 +08:00
|
|
|
|
|
|
|
Return('group')
|