2022-03-11 12:13:56 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
path = [cwd + '/CMSIS/Include',cwd + '/MIMXRT1060', cwd + '/MIMXRT1060/drivers']
|
|
|
|
src = Split('''
|
|
|
|
MIMXRT1060/system_MIMXRT1062.c
|
|
|
|
MIMXRT1060/drivers/fsl_common.c
|
|
|
|
MIMXRT1060/drivers/fsl_clock.c
|
|
|
|
MIMXRT1060/drivers/fsl_cache.c
|
|
|
|
''')
|
|
|
|
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2022-03-11 12:13:56 +08:00
|
|
|
src += ['MIMXRT1060/gcc/startup_MIMXRT1062.S']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2022-03-11 12:13:56 +08:00
|
|
|
src += ['MIMXRT1060/arm/startup_MIMXRT1062.s']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
src += ['MIMXRT1060/iar/startup_MIMXRT1062.s']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_GPIO']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LPUART']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_lpuart.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_I2C']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_lpi2c.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SPI']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_lpspi.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_HWTIMER']) or GetDepend(['BSP_USING_PWM']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_gpt.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_PWM']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_pwm.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_qtmr.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_RTC']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_snvs_hp.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_snvs_lp.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_WDT']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_wdog.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_rtwdog.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_ADC']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_adc.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SDRAM']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_semc.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LCD']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_elcdif.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_CACHE']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_cache.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_PXP']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_pxp.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_CAN']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_flexcan.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_ETH']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_enet.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_SDIO']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_usdhc.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_AUDIO']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_sai.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_sai_edma.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LTDC']):
|
|
|
|
src += ['MIMXRT1060/drivers/']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_DMA']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_dmamux.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_edma.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_lpuart_edma.c']
|
|
|
|
if GetDepend(['BSP_USING_SPI']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_lpspi_edma.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_PULSE_ENCODER']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_enc.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_SERIAL_USING_DMA']):
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_dmamux.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_edma.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_lpuart_edma.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_lpspi_edma.c']
|
|
|
|
|
|
|
|
#Adding this as XBAR is used in pin mux
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_xbara.c']
|
|
|
|
src += ['MIMXRT1060/drivers/fsl_xbarb.c']
|
|
|
|
|
|
|
|
# #fsl os abstract files
|
|
|
|
# src += ['MIMXRT1060/drivers/fsl_os_abstraction_rtthread.c']
|
|
|
|
# src += ['MIMXRT1060/drivers/generic_list.c']
|
|
|
|
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2022-03-11 12:13:56 +08:00
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, ASFLAGS = '$ASFLAGS -D __STARTUP_CLEAR_BSS')
|
|
|
|
else:
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
|
|
|
|
|
|
|
|
Return('group')
|