diff --git a/bsp/stm32/stm32f103-blue-pill/applications/SConscript b/bsp/stm32/stm32f103-blue-pill/applications/SConscript index ef1c39fd83..d6acfac79f 100644 --- a/bsp/stm32/stm32f103-blue-pill/applications/SConscript +++ b/bsp/stm32/stm32f103-blue-pill/applications/SConscript @@ -1,11 +1,16 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, ] +CPPPATH = [cwd] 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') diff --git a/bsp/stm32/stm32f407-atk-explorer/applications/SConscript b/bsp/stm32/stm32f407-atk-explorer/applications/SConscript index d229539fc7..64381a1679 100644 --- a/bsp/stm32/stm32f407-atk-explorer/applications/SConscript +++ b/bsp/stm32/stm32f407-atk-explorer/applications/SConscript @@ -1,12 +1,9 @@ -import rtconfig -import os from building import * +import os cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +CPPPATH = [cwd] +src = Glob('*.c') group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/SConscript b/bsp/stm32/stm32l475-atk-pandora/applications/SConscript index f45bd21bc2..77d927a66b 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/SConscript +++ b/bsp/stm32/stm32l475-atk-pandora/applications/SConscript @@ -1,6 +1,7 @@ from building import * +import os -cwd = GetCurrentDir() +cwd = GetCurrentDir() src = Split(''' main.c @@ -12,8 +13,14 @@ if GetDepend(['BSP_USING_SPI_LCD']): if GetDepend(['PKG_USING_NRF24L01']): src += ['nrf24l01_init.c'] -CPPPATH = [str(Dir('#')), cwd] +CPPPATH = [cwd] 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')