diff --git a/bsp/stm32/stm32f103-blue-pill/applications/SConscript b/bsp/stm32/stm32f103-blue-pill/applications/SConscript index ef1c39fd83245f317e1fb64035e62c169c430c62..d6acfac79f4482aa9948e13b3e5f2d02f3edd96e 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 d229539fc79e41b9165eac94e21e0874df403c8e..64381a167927ef244a56a252014806bf5af3f0ce 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 f45bd21bc2943a4711d73b2e5cd53e801060ba94..77d927a66b16ed6614a5d3bb7cf0d3d56502bcee 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')