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"):