From 07519cf020f6d50cffa2fef849d0013e51076d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A5=E6=97=A5=E6=96=B9=E9=95=BF?= <1125934312@qq.com> Date: Sun, 21 Jun 2020 22:11:13 +0800 Subject: [PATCH] =?UTF-8?q?update=20tools/building.py.=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0stackanalysis=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/building.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/building.py b/tools/building.py index 2ddeb9669b..1de54e236b 100644 --- a/tools/building.py +++ b/tools/building.py @@ -209,6 +209,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ dest = 'target', type = 'string', 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', dest = 'genconfig', action = 'store_true', @@ -363,6 +368,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ genconfig() exit(0) + if GetOption('stackanalysis'): + from WCS import ThreadStackStaticAnalysis + ThreadStackStaticAnalysis(Env) + exit(0) + if env['PLATFORM'] != 'win32': AddOption('--menuconfig', dest = 'menuconfig',