From 7ce1dd4f5c5382bd35da61e9bf8d44326f15cda3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 27 Nov 2015 21:59:08 +0200 Subject: [PATCH] Fix ParseFlags for mbed --- platformio/__init__.py | 2 +- platformio/builder/scripts/frameworks/mbed.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 7b30378b..4a829ad3 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, 3, "6.dev2") +VERSION = (2, 3, "6.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 a5f9b76e..a0454b07 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -29,7 +29,7 @@ http://mbed.org/ import re import xml.etree.ElementTree as ElementTree from binascii import crc32 -from os import walk +from os import getenv, walk from os.path import basename, isfile, join, normpath from SCons.Script import DefaultEnvironment, Exit @@ -226,7 +226,11 @@ env.Replace( ) # restore external build flags -env.ProcessFlags() +env.ProcessFlags([ + env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags", None), + env.get("BUILD_FLAGS"), + getenv("PLATFORMIO_BUILD_FLAGS", None), +]) # Hook for K64F and K22F if board_type in ("frdm_k22f", "frdm_k64f"):