rt-thread-official/bsp/apm32/libraries/APM32F10x_Library/SConscript

63 lines
2.0 KiB
Python
Raw Normal View History

2021-09-02 09:55:07 +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("""
Device/Geehy/APM32F10x/Source/system_apm32f10x.c
APM32F10x_StdPeriphDriver/src/apm32f10x_gpio.c
APM32F10x_StdPeriphDriver/src/apm32f10x_misc.c
APM32F10x_StdPeriphDriver/src/apm32f10x_rcm.c
APM32F10x_StdPeriphDriver/src/apm32f10x_usart.c
APM32F10x_StdPeriphDriver/src/apm32f10x_eint.c
APM32F10x_StdPeriphDriver/src/apm32f10x_dma.c
2021-09-02 09:55:07 +08:00
""")
if GetDepend(['RT_USING_ADC']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_adc.c']
if GetDepend(['RT_USING_DAC']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_dac.c']
if GetDepend(['RT_USING_RTC']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_rtc.c']
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_pmu.c']
if GetDepend(['RT_USING_SPI']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_spi.c']
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_tmr.c']
2023-01-09 10:14:23 +08:00
if GetDepend(['RT_USING_WDT']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_wwdt.c']
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_iwdt.c']
2023-01-09 10:14:23 +08:00
if GetDepend(['RT_USING_CAN']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_can.c']
if GetDepend(['RT_USING_SDIO']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_sdio.c']
if GetDepend(['BSP_USING_SDRAM']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_dmc.c']
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
src += ['APM32F10x_StdPeriphDriver/src/apm32f10x_fmc.c']
if GetDepend(['BSP_USING_ETH']):
src += ['APM32F10x_ETH_Driver/src/apm32f10x_eth.c']
2023-01-09 10:14:23 +08:00
path = [cwd + '/Device/Geehy/APM32F10x/Include',
2021-09-02 09:55:07 +08:00
cwd + '/APM32F10x_StdPeriphDriver/inc',
cwd + '/CMSIS/Include',
cwd + '/APM32F10x_ETH_Driver/inc']
2021-09-02 09:55:07 +08:00
CPPDEFINES = ['USE_STDPERIPH_DRIVER']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')