diff --git a/tools/toolchains/__init__.py b/tools/toolchains/__init__.py index ecda6b88b6..ce0ee7cd3b 100644 --- a/tools/toolchains/__init__.py +++ b/tools/toolchains/__init__.py @@ -887,7 +887,10 @@ class mbedToolchain: if ext == '.c' or ext == '.cpp': base, _ = splitext(object) dep_path = base + '.d' - deps = self.parse_dependencies(dep_path) if (exists(dep_path)) else [] + try: + deps = self.parse_dependencies(dep_path) if (exists(dep_path)) else [] + except IOError, IndexError: + deps = [] if len(deps) == 0 or self.need_update(object, deps): if ext == '.cpp' or self.COMPILE_C_AS_CPP: return self.compile_cpp(source, object, includes)