49 lines
1.6 KiB
Python
49 lines
1.6 KiB
Python
Import('rtconfig')
|
|
from building import *
|
|
|
|
cwd = GetCurrentDir()
|
|
path = [cwd + '/CMSIS/Include',cwd + '/MIMXRT1176', cwd + '/MIMXRT1176/drivers']
|
|
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
|
|
''')
|
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
|
src += ['MIMXRT1176/gcc/startup_MIMXRT1176_cm7.S']
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
|
src += ['MIMXRT1176/arm/startup_MIMXRT1176_cm7.s']
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
|
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']
|
|
|
|
if GetDepend(['BSP_USING_RTC']):
|
|
src += ['MIMXRT1176/drivers/fsl_snvs_hp.c']
|
|
src += ['MIMXRT1176/drivers/fsl_snvs_lp.c']
|
|
|
|
if GetDepend(['BSP_USING_HWTIMER']) or GetDepend(['BSP_USING_PWM']):
|
|
src += ['MIMXRT1176/drivers/fsl_gpt.c']
|
|
|
|
if GetDepend(['BSP_USING_PWM']):
|
|
src += ['MIMXRT1176/drivers/fsl_pwm.c']
|
|
|
|
if GetDepend(['BSP_USING_SDIO']):
|
|
src += ['MIMXRT1176/drivers/fsl_usdhc.c']
|
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, ASFLAGS = '$ASFLAGS -D __STARTUP_CLEAR_BSS')
|
|
else:
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
|
|
|
|
Return('group')
|