From a483ecdfdb070b1d7950933abd460ab243ef150b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 7 Dec 2015 14:52:19 +0200 Subject: [PATCH] Warn about missing native support for the library // Resolve #358 --- platformio/__init__.py | 2 +- platformio/builder/scripts/frameworks/mbed.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 54dfffdc..f75f4864 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (2, 5, "0.dev2") +VERSION = (2, 5, "0.dev3") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index be0e4da2..0ae6cf47 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -26,13 +26,16 @@ the mbed Developer Community. http://mbed.org/ """ +from __future__ import print_function + import re +import sys import xml.etree.ElementTree as ElementTree from binascii import crc32 from os import getenv, walk from os.path import basename, isfile, join, normpath -from SCons.Script import DefaultEnvironment, Exit +from SCons.Script import DefaultEnvironment env = DefaultEnvironment() @@ -119,8 +122,9 @@ def add_mbedlib(libname, libar): lib_dir = join(env.subst("$PLATFORMFW_DIR"), "libs", libname) if not isfile(join(lib_dir, "TARGET_%s" % variant, "TOOLCHAIN_GCC_ARM", "lib%s.a" % libar)): - Exit("Error: %s board doesn't support %s library!" % - (env.get("BOARD"), libname)) + print ( + "Warning: %s board doesn't have native support for '%s' library!" % + (env.get("BOARD"), libname), file=sys.stderr) env.Append( LIBPATH=[