Merge pull request #4686 from mysterywolf/drv_sdcard.c

[bsp][stm32f407-explorer] 修复drv_sdcard.c没有被包含到工程的bug
This commit is contained in:
Bernard Xiong 2021-05-15 07:38:56 +08:00 committed by GitHub
commit a896d977c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import rtconfig
import os
from building import *
cwd = GetCurrentDir()
@ -9,4 +10,10 @@ main.c
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
group = group + SConscript(os.path.join(d, 'SConscript'))
Return('group')

View File

@ -19,7 +19,7 @@ if GetDepend(['BSP_USING_SPI_FLASH']):
src += Glob('ports/spi_flash_init.c')
if GetDepend(['BSP_USING_SDCARD']):
src += Glob('ports/sdcard_port.c')
src += Glob('ports/drv_sdcard.c')
if GetDepend(['BSP_USING_SRAM']):
src += Glob('ports/drv_sram.c')
@ -40,4 +40,4 @@ elif rtconfig.CROSS_TOOL == 'iar':
CPPDEFINES = ['STM32F407xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')
Return('group')