From c38259d336852ddcc438e8d8540d438952b6a3cf Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sat, 17 Sep 2022 17:01:14 -0400 Subject: [PATCH] =?UTF-8?q?[tools]=20=E5=A2=9E=E5=8A=A0scons=20--exec-path?= =?UTF-8?q?=3Dxxx=E5=91=BD=E4=BB=A4=20=E7=94=A8=E4=BA=8E=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=BC=96=E8=AF=91=E9=93=BE=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=20scons=20--target=3Diar=20--exec-path=3Dxxxx=20scons=20--exec?= =?UTF-8?q?-path=3Dxxxx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/building.py | 5 +++++ tools/options.py | 4 ++++ 2 files changed, 9 insertions(+) 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', -- GitLab