2019-06-12 15:01:12 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
path = [cwd + '/CMSIS/Include',cwd + '/MIMXRT1052', cwd + '/MIMXRT1052/drivers']
|
|
|
|
src = Split('''
|
|
|
|
MIMXRT1052/system_MIMXRT1052.c
|
|
|
|
MIMXRT1052/drivers/fsl_common.c
|
|
|
|
MIMXRT1052/drivers/fsl_clock.c
|
|
|
|
MIMXRT1052/drivers/fsl_cache.c
|
|
|
|
''')
|
|
|
|
|
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
|
|
|
src += ['MIMXRT1052/gcc/startup_MIMXRT1052.S']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
|
|
|
src += ['MIMXRT1052/arm/startup_MIMXRT1052.s']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
src += ['MIMXRT1052/iar/startup_MIMXRT1052.s']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_GPIO']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LPUART']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_lpuart.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_I2C']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_lpi2c.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SPI']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_lpspi.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_HWTIMER']) or GetDepend(['BSP_USING_PWM']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_gpt.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_PWM']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_pwm.c']
|
2021-02-13 17:50:45 +08:00
|
|
|
src += ['MIMXRT1052/drivers/fsl_qtmr.c']
|
2019-06-12 15:01:12 +08:00
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_RTC']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_snvs_hp.c']
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_snvs_lp.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_WDT']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_wdog.c']
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_rtwdog.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_ADC']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_adc.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SDRAM']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_semc.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LCD']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_elcdif.c']
|
|
|
|
|
2019-06-28 14:02:20 +08:00
|
|
|
if GetDepend(['BSP_USING_CAN']):
|
2019-06-12 15:01:12 +08:00
|
|
|
src += ['MIMXRT1052/drivers/fsl_flexcan.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_ETH']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_enet.c']
|
|
|
|
|
2020-01-14 16:09:11 +08:00
|
|
|
if GetDepend(['BSP_USING_SDIO']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_usdhc.c']
|
|
|
|
|
2019-06-12 15:01:12 +08:00
|
|
|
if GetDepend(['RT_USING_AUDIO']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_sai.c']
|
2020-01-14 16:09:11 +08:00
|
|
|
src += ['MIMXRT1052/drivers/fsl_sai_edma.c']
|
2019-06-12 15:01:12 +08:00
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LTDC']):
|
|
|
|
src += ['MIMXRT1052/drivers/']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_DMA']):
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_dmamux.c']
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_edma.c']
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_lpuart_edma.c']
|
|
|
|
src += ['MIMXRT1052/drivers/fsl_lpspi_edma.c']
|
2020-01-14 16:09:11 +08:00
|
|
|
|
2019-06-12 15:01:12 +08:00
|
|
|
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|