2023-01-05 14:45:17 +08:00
|
|
|
import rtconfig
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# The set of src files associated with this SConscript file.
|
|
|
|
|
|
|
|
src = Split('''
|
|
|
|
CMSIS/device/system_n32g4fr.c
|
|
|
|
n32g4fr_std_periph_driver/src/n32g4fr_gpio.c
|
|
|
|
n32g4fr_std_periph_driver/src/n32g4fr_rcc.c
|
|
|
|
n32g4fr_std_periph_driver/src/n32g4fr_exti.c
|
|
|
|
n32g4fr_std_periph_driver/src/misc.c
|
|
|
|
''')
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2023-01-05 14:45:17 +08:00
|
|
|
if GetDepend(['RT_USING_SERIAL']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_usart.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2023-01-05 14:45:17 +08:00
|
|
|
if GetDepend(['RT_USING_I2C']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_i2c.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SPI']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_spi.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_CAN']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_can.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ADC']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_adc.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_DAC']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_dac.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_HWTIMER']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_tim.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_RTC']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_rtc.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_WDT']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_wwdg.c']
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_iwdg.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SDIO']):
|
|
|
|
src += ['n32g4fr_std_periph_driver/src/n32g4fr_sdio.c']
|
|
|
|
|
|
|
|
path = [
|
|
|
|
cwd + '/CMSIS/core',
|
|
|
|
cwd + '/CMSIS/device',
|
|
|
|
cwd + '/CMSIS',
|
|
|
|
cwd + '/n32g4fr_std_periph_driver/inc',]
|
|
|
|
|
|
|
|
CPPDEFINES = ['USE_STDPERIPH_DRIVER']
|
|
|
|
|
|
|
|
group = DefineGroup('libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|