2016-08-19 00:35:30 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = os.path.join(str(Dir('#')), 'drivers')
|
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
stm32f4xx_it.c
|
|
|
|
usart.c
|
2016-08-20 18:27:07 +08:00
|
|
|
drv_sdram.c
|
2016-08-19 00:35:30 +08:00
|
|
|
""")
|
|
|
|
|
|
|
|
# add Ethernet drivers.
|
|
|
|
if GetDepend('RT_USING_LWIP'):
|
|
|
|
src += ['stm32f4xx_eth.c']
|
|
|
|
|
|
|
|
# add gpio drivers.
|
|
|
|
if GetDepend('RT_USING_PIN'):
|
|
|
|
src += ['gpio.c']
|
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|