2018-10-10 09:26:50 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
# add the general drivers.
|
|
|
|
src = Split("""
|
|
|
|
board.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
CPPDEFINES = []
|
|
|
|
|
2018-12-29 19:06:25 +08:00
|
|
|
if GetDepend('PKG_USING_EASYFLASH'):
|
|
|
|
src += ['ports/ef_fal_port.c']
|
|
|
|
|
|
|
|
if GetDepend('PKG_USING_FAL'):
|
|
|
|
src += ['ports/fal_flexspi_nor_flash_port.c']
|
|
|
|
|
|
|
|
if GetDepend('PKG_USING_FAL') and GetDepend('PKG_USING_EASYFLASH'):
|
|
|
|
src += ['ports/fal_flash_init.c', 'ports/ef_update.c']
|
|
|
|
|
|
|
|
CPPPATH += [cwd + '/ports']
|
|
|
|
|
2018-10-10 09:26:50 +08:00
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|