2021-08-31 00:38:42 +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/HDSC/HC32L196/Source/system_hc32l19x.c
|
|
|
|
CMSIS/Device/HDSC/HC32L196/Source/interrupts_hc32l19x.c
|
|
|
|
HC32L196_StdPeriph_Driver/src/hc32l196_ddl.c
|
|
|
|
HC32L196_StdPeriph_Driver/src/hc32l196_gpio.c
|
|
|
|
HC32L196_StdPeriph_Driver/src/hc32l196_sysctrl.c
|
|
|
|
HC32L196_StdPeriph_Driver/src/hc32l196_flash.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SERIAL']):
|
|
|
|
src += ['HC32L196_StdPeriph_Driver/src/hc32l196_uart.c']
|
|
|
|
|
|
|
|
#add for startup script
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2021-08-31 00:38:42 +08:00
|
|
|
src = src + ['CMSIS/Device/HDSC/HC32L196/Source/GCC/startup_hc32l19x.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-08-31 00:38:42 +08:00
|
|
|
src = src + ['CMSIS/Device/HDSC/HC32L196/Source/ARM/startup_hc32l19x.s']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
src = src + ['CMSIS/Device/HDSC/HC32L196/Source/IAR/startup_hc32l19x.s']
|
|
|
|
|
|
|
|
#add headfile script
|
|
|
|
path = [cwd + '/CMSIS/Include',
|
|
|
|
cwd + '/CMSIS/Device/HDSC/HC32L196/Include',
|
|
|
|
cwd + '/HC32L196_StdPeriph_Driver/inc']
|
|
|
|
|
|
|
|
CPPDEFINES = []
|
|
|
|
|
|
|
|
group = DefineGroup('HC32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|