update tools/building.py.

添加stackanalysis选项
This commit is contained in:
来日方长 2020-06-21 22:11:13 +08:00 committed by Gitee
parent 6e36f54e28
commit 07519cf020
1 changed files with 10 additions and 0 deletions

View File

@ -209,6 +209,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
dest = 'target', dest = 'target',
type = 'string', type = 'string',
help = 'set target project: mdk/mdk4/mdk5/iar/vs/vsc/ua/cdk/ses/makefile/eclipse') help = 'set target project: mdk/mdk4/mdk5/iar/vs/vsc/ua/cdk/ses/makefile/eclipse')
AddOption('--stackanalysis',
dest = 'stackanalysis',
action = 'store_true',
default = False,
help = 'thread stack static analysis')
AddOption('--genconfig', AddOption('--genconfig',
dest = 'genconfig', dest = 'genconfig',
action = 'store_true', action = 'store_true',
@ -363,6 +368,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
genconfig() genconfig()
exit(0) exit(0)
if GetOption('stackanalysis'):
from WCS import ThreadStackStaticAnalysis
ThreadStackStaticAnalysis(Env)
exit(0)
if env['PLATFORM'] != 'win32': if env['PLATFORM'] != 'win32':
AddOption('--menuconfig', AddOption('--menuconfig',
dest = 'menuconfig', dest = 'menuconfig',