4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 05:43:31 +08:00
BruceOu e498687a58
[BSP] Add n32g4frml-stb bsp (#6773)
新增n32g4frml-stb bsp,在n32g4frml-stb 开发板上测试通过。
Add n32g4frml-stb bsp. passed the test on the n32g4frml-stb board.
2023-01-05 01:45:17 -05:00

59 lines
1.6 KiB
Python

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
''')
if GetDepend(['RT_USING_SERIAL']):
src += ['n32g4fr_std_periph_driver/src/n32g4fr_usart.c']
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')