rt-thread/bsp/stm32f10x/SConscript

26 lines
719 B
Python

import rtconfig
Import('RTT_ROOT')
from building import *
src_bsp = ['application.c', 'startup.c', 'board.c', 'stm32f10x_it.c', 'system_stm32f10x.c']
src_drv = ['rtc.c', 'usart.c', 'led.c']
if GetDepend('RT_USING_DFS'):
if rtconfig.STM32_TYPE == 'STM32F10X_HD':
src_drv += ['sdcard.c']
else:
src_drv += ['msd.c']
if GetDepend('RT_USING_LWIP'):
if rtconfig.STM32_TYPE == 'STM32F10X_CL':
src_drv += ['stm32_eth.c']
else:
src_drv += ['enc28j60.c']
src = src_bsp + src_drv
CPPPATH = [RTT_ROOT + '/bsp/stm3210']
CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
Return('group')