ST / ST_Events-old

Dependents:   HelloWorld_CCA01M1 HelloWorld_CCA02M1 CI-data-logger-server HelloWorld_CCA02M1 ... more

This is a fork of the events subdirectory of https://github.com/ARMmbed/mbed-os.

Note, you must import this library with import name: events!!!

Revision:
7909:8d21dcb647f6
Parent:
7908:0f6ef9835afc
Child:
7931:ed4b0bd31270
diff -r 0f6ef9835afc -r 8d21dcb647f6 tools/toolchains/gcc.py
--- a/tools/toolchains/gcc.py	Tue Sep 13 12:06:01 2016 -0500
+++ b/tools/toolchains/gcc.py	Tue Sep 13 13:38:58 2016 -0500
@@ -15,8 +15,7 @@
 limitations under the License.
 """
 import re
-from os.path import join, basename, splitext, dirname, exists
-from distutils.spawn import find_executable
+from os.path import join, basename, splitext
 
 from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
 from tools.hooks import hook_tool
@@ -275,12 +274,7 @@
         """Returns True if the executable (arm-none-eabi-gcc) location
         specified by the user exists OR the executable can be found on the PATH.
         Returns False otherwise."""
-        if not TOOLCHAIN_PATHS["GCC_ARM"] or not exists(TOOLCHAIN_PATHS['GCC_ARM']):
-            exe = find_executable('arm-none-eabi-gcc')
-            if not exe:
-                return False
-            TOOLCHAIN_PATHS['GCC_ARM'] = dirname(exe)
-        return True
+        return mbedToolchain.generic_check_executable("GCC_ARM", 'arm-none-eabi-gcc', 1)
 
     def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
         GCC.__init__(self, target, options, notify, macros, silent, TOOLCHAIN_PATHS['GCC_ARM'], extra_verbose=extra_verbose)
@@ -312,12 +306,7 @@
         """Returns True if the executable (arm-none-eabi-gcc) location
         specified by the user exists OR the executable can be found on the PATH.
         Returns False otherwise."""
-        if not TOOLCHAIN_PATHS["GCC_CR"] or not exists(TOOLCHAIN_PATHS['GCC_CR']):
-            exe = find_executable('arm-none-eabi-gcc')
-            if not exe:
-                return False
-            TOOLCHAIN_PATHS['GCC_CR'] = dirname(exe)
-        return True
+        return mbedToolchain.generic_check_executable("GCC_CR", 'arm-none-eabi-gcc', 1)
 
     def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
         GCC.__init__(self, target, options, notify, macros, silent, TOOLCHAIN_PATHS['GCC_CR'], extra_verbose=extra_verbose)