Clone of official tools

Revision:
30:f12ce67666d0
Parent:
29:1210849dba19
Child:
31:8ea194f6145b
--- a/toolchains/arm.py	Mon Aug 29 11:18:36 2016 +0100
+++ b/toolchains/arm.py	Mon Aug 29 11:56:59 2016 +0100
@@ -15,12 +15,12 @@
 limitations under the License.
 """
 import re
-from os.path import join, dirname, splitext, basename
-from distutils.spawn import find_executable
+from os.path import join, dirname, splitext, basename, exists
 
 from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
 from tools.hooks import hook_tool
 from tools.utils import mkdir
+import copy
 
 class ARM(mbedToolchain):
     LINKER_EXT = '.sct'
@@ -56,11 +56,6 @@
         else:
             cpu = target.core
 
-        if not TOOLCHAIN_PATHS['ARM']:
-            exe = find_executable('armcc')
-            if exe:
-                TOOLCHAIN_PATHS['ARM'] = dirname(dirname(exe))
-
         ARM_BIN = join(TOOLCHAIN_PATHS['ARM'], "bin")
         ARM_INC = join(TOOLCHAIN_PATHS['ARM'], "include")
         
@@ -86,8 +81,6 @@
         self.ar = join(ARM_BIN, "armar")
         self.elf2bin = join(ARM_BIN, "fromelf")
 
-        self.toolchain_path = TOOLCHAIN_PATHS['ARM']
-
     def parse_dependencies(self, dep_path):
         dependencies = []
         for line in open(dep_path).readlines():