提交 fa4b7ec8 编写于 作者: mysterywolf's avatar mysterywolf

[stm32][bsp] The sconscript script in the application folder increases the...

[stm32][bsp] The sconscript script in the application folder increases the recursion searching capability
上级 9fe546b0
Import('RTT_ROOT')
Import('rtconfig')
from building import * from building import *
import os
cwd = GetCurrentDir() cwd = GetCurrentDir()
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd, ] CPPPATH = [cwd]
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) 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') Return('group')
import rtconfig
import os
from building import * from building import *
import os
cwd = GetCurrentDir() cwd = GetCurrentDir()
CPPPATH = [cwd, str(Dir('#'))] CPPPATH = [cwd]
src = Split(""" src = Glob('*.c')
main.c
""")
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
......
from building import * from building import *
import os
cwd = GetCurrentDir() cwd = GetCurrentDir()
src = Split(''' src = Split('''
main.c main.c
...@@ -12,8 +13,14 @@ if GetDepend(['BSP_USING_SPI_LCD']): ...@@ -12,8 +13,14 @@ if GetDepend(['BSP_USING_SPI_LCD']):
if GetDepend(['PKG_USING_NRF24L01']): if GetDepend(['PKG_USING_NRF24L01']):
src += ['nrf24l01_init.c'] src += ['nrf24l01_init.c']
CPPPATH = [str(Dir('#')), cwd] CPPPATH = [cwd]
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) 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') Return('group')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册