2021-08-20 16:37:50 +08:00
|
|
|
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/system_fm33lc0xx.c
|
|
|
|
Src/fm33lc0xx_fl_dma.c
|
|
|
|
Src/fm33lc0xx_fl_crc.c
|
|
|
|
Src/fm33lc0xx_fl_rcc.c
|
|
|
|
Src/fm33lc0xx_fl_gpio.c
|
|
|
|
""")
|
|
|
|
|
2022-07-26 10:11:12 +08:00
|
|
|
if GetDepend(['RT_USING_PIN']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_exti.c']
|
|
|
|
|
2021-08-20 16:37:50 +08:00
|
|
|
if GetDepend(['RT_USING_SERIAL']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_uart.c']
|
|
|
|
src += ['Src/fm33lc0xx_fl_lpuart.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_I2C']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SPI']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_spi.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
|
2021-08-27 15:19:21 +08:00
|
|
|
src += ['Src/fm33lc0xx_fl_atim.c']
|
|
|
|
src += ['Src/fm33lc0xx_fl_bstim32.c']
|
2021-08-20 16:37:50 +08:00
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ADC']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_adc.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2021-08-20 16:37:50 +08:00
|
|
|
if GetDepend(['RT_USING_RTC']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_rtc.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2021-08-20 16:37:50 +08:00
|
|
|
if GetDepend(['RT_USING_WDT']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_wwdt.c']
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
|
|
|
|
src += ['Src/fm33lc0xx_fl_flash.c']
|
|
|
|
|
2023-01-09 10:14:23 +08:00
|
|
|
path = [cwd + '/CMSIS/Include',
|
2021-08-20 16:37:50 +08:00
|
|
|
cwd + '/Inc']
|
|
|
|
|
|
|
|
CPPDEFINES = ['USE_HAL_DRIVER']
|
|
|
|
group = DefineGroup('FM33LC0xx_FL_Driver', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|