rt-thread/bsp/n32/libraries/N32L43x_Firmware_Library/SConscript

64 lines
1.8 KiB
Python
Raw Normal View History

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/system_n32l43x.c
n32l43x_std_periph_driver/src/n32l43x_gpio.c
n32l43x_std_periph_driver/src/n32l43x_rcc.c
n32l43x_std_periph_driver/src/n32l43x_exti.c
n32l43x_std_periph_driver/src/misc.c
''')
if GetDepend(['RT_USING_SERIAL']):
src += ['n32l43x_std_periph_driver/src/n32l43x_usart.c']
if GetDepend(['RT_USING_I2C']):
src += ['n32l43x_std_periph_driver/src/n32l43x_i2c.c']
if GetDepend(['RT_USING_SPI']):
src += ['n32l43x_std_periph_driver/src/n32l43x_spi.c']
if GetDepend(['RT_USING_CAN']):
src += ['n32l43x_std_periph_driver/src/n32l43x_can.c']
if GetDepend(['RT_USING_ADC']):
src += ['n32l43x_std_periph_driver/src/n32l43x_adc.c']
if GetDepend(['RT_USING_DAC']):
src += ['n32l43x_std_periph_driver/src/n32l43x_dac.c']
if GetDepend(['RT_USING_HWTIMER']):
src += ['n32l43x_std_periph_driver/src/n32l43x_tim.c']
if GetDepend(['RT_USING_RTC']):
src += ['n32l43x_std_periph_driver/src/n32l43x_rtc.c']
src += ['n32l43x_std_periph_driver/src/n32l43x_pwr.c']
src += ['n32l43x_std_periph_driver/src/n32l43x_flash.c']
if GetDepend(['RT_USING_WDT']):
src += ['n32l43x_std_periph_driver/src/n32l43x_iwdg.c']
src += ['n32l43x_std_periph_driver/src/n32l43x_wwdg.c']
if GetDepend(['RT_USING_BSP_USB']):
path += [cwd + '/n32l43x_usbfs_driver/inc']
src += [cwd + '/n32l43x_usbfs_driver/src']
path = [
cwd + '/CMSIS/device',
cwd + '/CMSIS/core',
cwd + '/n32l43x_std_periph_driver/inc',]
CPPDEFINES = ['USE_STDPERIPH_DRIVER']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')