2016-08-19 00:35:30 +08:00
|
|
|
import rtconfig
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
|
2017-02-07 15:42:42 +08:00
|
|
|
src = Split('''
|
|
|
|
CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cec.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_crc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cryp.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cryp_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dcmi.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dcmi_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dfsdm.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma2d.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dsi.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_eth.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_fmpi2c.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_fmpi2c_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_hash.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_hash_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_hcd.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_irda.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_iwdg.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_lptim.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_nand.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_nor.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pccard.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_qspi.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rng.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sai.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sai_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sd.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sdram.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_smartcard.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spdifrx.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sram.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_usart.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_wwdg.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_fmc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_fsmc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_sdmmc.c
|
|
|
|
STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c
|
|
|
|
''')
|
2016-08-19 00:35:30 +08:00
|
|
|
|
2016-08-22 01:03:17 +08:00
|
|
|
#add for startup script
|
2016-08-19 00:35:30 +08:00
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
2016-08-22 01:03:17 +08:00
|
|
|
src = src + ['CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.s']
|
2016-08-19 00:35:30 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
2016-08-22 15:59:53 +08:00
|
|
|
src = src + ['CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f429xx.s']
|
2016-08-19 00:35:30 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
2016-08-22 15:59:53 +08:00
|
|
|
src = src + ['CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f429xx.s']
|
2016-08-19 00:35:30 +08:00
|
|
|
|
2016-08-22 01:03:17 +08:00
|
|
|
path = [cwd + '/STM32F4xx_HAL_Driver/Inc',
|
|
|
|
cwd + '/CMSIS/Device/ST/STM32F4xx/Include',
|
2016-08-19 00:35:30 +08:00
|
|
|
cwd + '/CMSIS/Include']
|
|
|
|
|
2017-02-07 15:42:42 +08:00
|
|
|
CPPDEFINES = ['USE_HAL_DRIVER', rtconfig.STM32_TYPE]
|
2016-08-22 01:03:17 +08:00
|
|
|
group = DefineGroup('STM32_HAL', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
2016-08-19 00:35:30 +08:00
|
|
|
|
|
|
|
Return('group')
|