浏览代码

update tools/building.py.
添加stackanalysis选项

来日方长 4 年之前
父节点
当前提交
07519cf020
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      tools/building.py

+ 10 - 0
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',