2021-09-08 17:04:39 +08:00
|
|
|
# RT-Thread building script for bridge
|
|
|
|
|
|
|
|
import rtconfig
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
src = Split("""
|
|
|
|
CMSIS/Device/Tai_action/TAE32F53xx/Source/system_tae32f53xx.c
|
|
|
|
TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll.c
|
|
|
|
TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_cortex.c
|
|
|
|
TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_sysctrl.c
|
|
|
|
TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_fpll.c
|
|
|
|
TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_gpio.c
|
|
|
|
TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_dma.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SERIAL']):
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_uart.c']
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_tmr.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_I2C']):
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_CAN']):
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_can.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ADC']):
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_adc.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_WDT']):
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_wwdg.c']
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_iwdg.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM'] or GetDepend(['RT_USING_PULSE_ENCODER'])):
|
|
|
|
src += ['TAE32F53xx_StdPeriph_Driver/src/tae32f53xx_ll_tmr.c']
|
|
|
|
|
|
|
|
#add for startup script
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2021-09-08 17:04:39 +08:00
|
|
|
src = src + ['CMSIS/Device/Tai_action/TAE32F53xx/Source/GCC/startup_ARMCM3.S']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-09-08 17:04:39 +08:00
|
|
|
src = src + ['CMSIS/Device/Tai_action/TAE32F53xx/Source/startup_tae32f53xx.c']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
src = src + ['CMSIS/Device/Tai_action/TAE32F53xx/Source/IAR/startup_ARMCM3.s']
|
|
|
|
|
|
|
|
#add headfile script
|
|
|
|
path = [cwd + '/CMSIS/Include',
|
|
|
|
cwd + '/CMSIS/Device/Tai_action/TAE32F53xx/Include',
|
|
|
|
cwd + '/TAE32F53xx_StdPeriph_Driver/inc']
|
|
|
|
|
|
|
|
CPPDEFINES = ['USE_TAE_DRIVER', rtconfig.MCU_TYPE, '__DEBUG']
|
|
|
|
|
|
|
|
group = DefineGroup('TAE32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|