# 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'] #add for startup script if rtconfig.PLATFORM == 'gcc': src = src + ['CMSIS/Device/HDSC/HC32L136/Source/GCC/startup_hc32l136.S'] elif rtconfig.PLATFORM in ['armcc', 'armclang']: src = src + ['CMSIS/Device/HDSC/HC32L136/Source/ARM/startup_hc32l136.s'] elif rtconfig.CROSS_TOOL == 'iar': src = src + ['CMSIS/Device/HDSC/HC32L136/Source/IAR/startup_hc32l136.s'] #add headfile script path = [cwd + '/CMSIS/Include', 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')