From cdcf0756355ecccc5180d12c6e8bc3496420a498 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 14:56:31 +0300 Subject: [PATCH] Use $PLATFORM from build environment instead from the board config --- platformio/builder/scripts/frameworks/mbed.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 4f8fd57e..2b1bd2ad 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -152,8 +152,7 @@ def add_mbedlib(libname, libar): } target_includes = ( - "TARGET_%s" % target_map.get( - env.get("BOARD_OPTIONS", {}).get("platform", ""), ""), + "TARGET_%s" % target_map.get(env.subst("$PLATFORM"), ""), "TARGET_%s" % variant, "TARGET_CORTEX_M" ) @@ -222,7 +221,7 @@ def get_build_flags(data): def _mbed_whole_archive_hook(libs_): if (not isinstance(libs_, list) or - env.get("BOARD_OPTIONS", {}).get("platform") == "nordicnrf51"): + env.subst("$PLATFORM") == "nordicnrf51"): return libs_ _dynlibs = []