[finsh] support to check static thread size

增加检查finsh线程实际使用是否超过当前设定的线程大小
This commit is contained in:
Meco Man 2023-12-30 19:26:03 +08:00 committed by Rbb666
parent db5bdb1ffa
commit 58a159a0d6
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,5 @@
from building import *
from gcc import GetGCCLikePLATFORM
cwd = GetCurrentDir()
src = Split('''
@ -7,14 +8,19 @@ msh.c
msh_parse.c
''')
CPPPATH = [cwd]
LOCAL_CFLAGS = ''
if rtconfig.PLATFORM in GetGCCLikePLATFORM():
LOCAL_CFLAGS += ' -Wstack-usage=' + str(GetConfigValue('FINSH_THREAD_STACK_SIZE')) # check finsh thread stack size
if GetDepend('MSH_USING_BUILT_IN_COMMANDS'):
src += ['cmd.c']
if GetDepend('DFS_USING_POSIX'):
src += ['msh_file.c']
CPPPATH = [cwd]
group = DefineGroup('Finsh', src, depend = ['RT_USING_FINSH'], CPPPATH = CPPPATH)
group = DefineGroup('Finsh', src, depend = ['RT_USING_FINSH'], CPPPATH = CPPPATH,
LOCAL_CFLAGS = LOCAL_CFLAGS)
Return('group')