diff options
| author | Meco Man <[email protected]> | 2022-09-17 17:01:14 -0400 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2022-09-22 22:57:09 -0400 |
| commit | c38259d336852ddcc438e8d8540d438952b6a3cf (patch) | |
| tree | 60f3eaa77960c18385ebeac3bf7cadf21e0ae0dc /tools | |
| parent | 61e1e31ca9ee3e99a7d6b5ce0ad83164a7afe115 (diff) | |
[tools] 增加scons --exec-path=xxx命令 用于动态设置编译链路径
scons --target=iar --exec-path=xxxx
scons --exec-path=xxxx
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/building.py | 5 | ||||
| -rw-r--r-- | tools/options.py | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/building.py b/tools/building.py index ed5672d228..2512ad6c76 100644 --- a/tools/building.py +++ b/tools/building.py @@ -214,6 +214,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ del os.environ['RTT_EXEC_PATH'] utils.ReloadModule(rtconfig) + exec_path = GetOption('exec-path') + if exec_path: + os.environ['RTT_EXEC_PATH'] = exec_path + utils.ReloadModule(rtconfig) + # add compability with Keil MDK 4.6 which changes the directory of armcc.exe if rtconfig.PLATFORM in ['armcc', 'armclang']: if rtconfig.PLATFORM == 'armcc' and not os.path.isfile(os.path.join(rtconfig.EXEC_PATH, 'armcc.exe')): diff --git a/tools/options.py b/tools/options.py index 947a0259f9..edc39d5e75 100644 --- a/tools/options.py +++ b/tools/options.py @@ -85,6 +85,10 @@ def AddOptions(): dest = 'target', type = 'string', help = 'set target project: mdk/mdk4/mdk5/iar/vs/vsc/ua/cdk/ses/makefile/eclipse/codelite/cmake') + AddOption('--exec-path', + dest = 'exec-path', + type = 'string', + help = 'set RTT_EXEC_PATH temperately') AddOption('--stackanalysis', dest = 'stackanalysis', action = 'store_true', |
