2022-05-19 14:06:35 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2022-08-14 10:06:38 +08:00
|
|
|
path = [cwd + '/CMSIS/Include',cwd + '/MIMXRT1176', cwd + '/MIMXRT1176/drivers', cwd + '/MIMXRT1176/drivers/cm7']
|
2022-05-19 14:06:35 +08:00
|
|
|
src = Split('''
|
|
|
|
MIMXRT1176/drivers/fsl_anatop_ai.c
|
|
|
|
MIMXRT1176/system_MIMXRT1176_cm7.c
|
|
|
|
MIMXRT1176/drivers/fsl_common.c
|
|
|
|
MIMXRT1176/drivers/fsl_common_arm.c
|
|
|
|
MIMXRT1176/drivers/fsl_dcdc.c
|
|
|
|
MIMXRT1176/drivers/fsl_pmu.c
|
|
|
|
MIMXRT1176/drivers/fsl_clock.c
|
|
|
|
MIMXRT1176/drivers/cm7/fsl_cache.c
|
|
|
|
''')
|
|
|
|
|
2022-08-15 22:32:27 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2022-05-19 14:06:35 +08:00
|
|
|
src += ['MIMXRT1176/gcc/startup_MIMXRT1176_cm7.S']
|
2022-08-15 22:32:27 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2022-05-19 14:06:35 +08:00
|
|
|
src += ['MIMXRT1176/arm/startup_MIMXRT1176_cm7.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2022-05-19 14:06:35 +08:00
|
|
|
src += ['MIMXRT1176/iar/startup_MIMXRT1176_cm7.s']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_GPIO']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_gpio.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_LPUART']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_lpuart.c']
|
2022-08-15 11:21:27 +08:00
|
|
|
|
2022-05-19 14:06:35 +08:00
|
|
|
if GetDepend(['BSP_USING_RTC']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_snvs_hp.c']
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_snvs_lp.c']
|
2022-08-15 11:21:27 +08:00
|
|
|
|
2022-05-19 14:06:35 +08:00
|
|
|
if GetDepend(['BSP_USING_HWTIMER']) or GetDepend(['BSP_USING_PWM']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_gpt.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_PWM']):
|
2022-08-15 11:21:27 +08:00
|
|
|
src += ['MIMXRT1176/drivers/fsl_pwm.c']
|
|
|
|
|
2022-05-19 14:06:35 +08:00
|
|
|
if GetDepend(['BSP_USING_SDIO']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_usdhc.c']
|
2022-08-15 11:21:27 +08:00
|
|
|
|
2022-08-15 15:34:49 +08:00
|
|
|
if GetDepend(['BSP_USING_SDRAM']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_semc.c']
|
|
|
|
|
2022-08-17 21:41:31 +08:00
|
|
|
if GetDepend(['BSP_USING_ETH']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_enet.c']
|
|
|
|
|
2022-09-01 09:19:02 +08:00
|
|
|
if GetDepend(['RT_USING_CAN']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_flexcan.c']
|
|
|
|
|
2022-09-15 17:08:26 +08:00
|
|
|
if GetDepend(['BSP_USING_FLEXSPI']):
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_flexspi.c']
|
2022-11-15 12:51:35 +08:00
|
|
|
|
|
|
|
#fsl os abstract files
|
|
|
|
src += ['MIMXRT1176/drivers/fsl_os_abstraction_rtthread.c']
|
|
|
|
src += ['MIMXRT1176/drivers/generic_list.c']
|
2022-09-15 17:08:26 +08:00
|
|
|
|
2022-08-15 22:32:27 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2022-05-19 14:06:35 +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')
|