diff --git a/tools/building.py b/tools/building.py index 6ae8d32e5fcc3c8988d2e8f6fe4b6fb9ef047383..8418ccd3eb731642085d16c1fd32066d823b7b9e 100644 --- a/tools/building.py +++ b/tools/building.py @@ -43,6 +43,12 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ Env = env Rtt_Root = root_directory + # add compability with Keil MDK 4.6 which changes the directory of armcc.exe + if rtconfig.PLATFORM == 'armcc': + if not os.path.isfile(os.path.join(rtconfig.EXEC_PATH, 'armcc.exe')): + if rtconfig.EXEC_PATH.find('bin40') > 0: + rtconfig.EXEC_PATH = rtconfig.EXEC_PATH.replace('bin40', 'armcc/bin') + # patch for win32 spawn if env['PLATFORM'] == 'win32' and rtconfig.PLATFORM == 'gcc': win32_spawn = Win32Spawn()