diff --git a/tools/building.py b/tools/building.py index ed5672d228a3b290a57466a31996cebc9c93a141..2512ad6c76151e7d7c0e4fc3576465d6c1da1c1a 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 947a0259f96220d8852574f8e2544205e2b6260f..edc39d5e75a82d7627aadb59b53d3d32e03f92f0 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',