2021-08-21 14:10:33 +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("""
|
|
|
|
HC32L136_StdPeriph_Driver/src/adc.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/gpio.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/uart.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/lpuart.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/rtc.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/sysctrl.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/timer3.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/trim.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/flash.c
|
|
|
|
HC32L136_StdPeriph_Driver/src/ddl.c
|
|
|
|
CMSIS/Device/HDSC/HC32L136/Source/system_hc32l13x.c
|
|
|
|
CMSIS/Device/HDSC/HC32L136/Source/interrupts_hc32l136.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
#src += Glob('HC32F4A0_StdPeriph_Driver/src/*.c')
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_WDT']):
|
|
|
|
src += ['HC32L136_StdPeriph_Driver/src/wdt.c']
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
#add for startup script
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2024-10-20 00:23:07 +08:00
|
|
|
src = src + ['CMSIS/Device/HDSC/HC32L136/Source/GCC/startup_hc32l136.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-08-21 14:10:33 +08:00
|
|
|
src = src + ['CMSIS/Device/HDSC/HC32L136/Source/ARM/startup_hc32l136.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2021-08-21 14:10:33 +08:00
|
|
|
src = src + ['CMSIS/Device/HDSC/HC32L136/Source/IAR/startup_hc32l136.s']
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
#add headfile script
|
|
|
|
path = [cwd + '/CMSIS/Include',
|
2021-08-21 14:10:33 +08:00
|
|
|
cwd + '/CMSIS/Device/HDSC/HC32L136/Include',
|
|
|
|
cwd + '/HC32L136_StdPeriph_Driver/inc']
|
|
|
|
|
|
|
|
CPPDEFINES = ['USE_DDL_DRIVER', rtconfig.MCU_TYPE, '__DEBUG']
|
|
|
|
|
|
|
|
group = DefineGroup('HC32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|