From a38910b3819e0ad533d054a9bc4aa01e8be06f10 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Tue, 14 Jun 2016 13:00:51 +0300 Subject: [PATCH 01/19] Improve include selection for mbed boards with a custom vendor --- platformio/builder/scripts/frameworks/mbed.py | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 55b9fe14..64d269af 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -145,18 +145,24 @@ def add_mbedlib(libname, libar): "lwip-sys" ) + target_map = { + "nxplpc": "NXP", + "freescalekinetis": "Freescale", + "ststm32": "STM" + } + + target_includes = ( + "TARGET_%s" % target_map.get( + env.get("BOARD_OPTIONS", {}).get("platform", ""), ""), + "TARGET_%s" % variant, + "TARGET_CORTEX_M" + ) + for root, _, files in walk(lib_dir): if (not any(f.endswith(".h") for f in files) and basename(root) not in sysincdirs): continue - target_includes = ( - "TARGET_%s" % env.get( - "BOARD_OPTIONS", {}).get("vendor", "").upper(), - "TARGET_%s" % variant, - "TARGET_CORTEX_M" - ) - if "TARGET_" in root: if all([p not in root.upper() for p in target_includes]): continue From 3671d7549dc699e0a9cb1210fb32b647aa06fac5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Jun 2016 18:08:35 +0300 Subject: [PATCH 02/19] Update examples --- examples | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples b/examples index a5498135..ed668f6e 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit a5498135baca2dd71e518406ee5cf19ac4be058b +Subproject commit ed668f6e31d2f99736b10cac209bd59318aa6ecb From 220dcd0f5ce9d4379e174aeffce5419ecf3217bb Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Tue, 14 Jun 2016 19:29:54 +0300 Subject: [PATCH 03/19] Improve linker flags handling for mbed --- platformio/builder/scripts/frameworks/mbed.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 64d269af..2653f2ea 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -201,6 +201,11 @@ def parse_eix_file(filename): result[key].append( node.get(_nkeys[0]) if len(_nkeys) == 1 else node.attrib) + if "LINKFLAGS" in result: + for i, f in enumerate(result["LINKFLAGS"]): + if f.startswith("-u "): + result["LINKFLAGS"][i] = result["LINKFLAGS"][i].split(" ") + return result From 8d03f2dc805127cf0f009007de963706b849ecb1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Jun 2016 19:41:34 +0300 Subject: [PATCH 04/19] Update history --- HISTORY.rst | 8 ++++++++ platformio/__init__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 998b0e61..00374ec1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,14 @@ Release Notes PlatformIO 2.0 -------------- +2.10.2 (2016-06-??) +~~~~~~~~~~~~~~~~~~~ + +* Fixed issue with ARM mbed framework with ``-u _printf_float`` and + ``-u _scanf_float`` when parsing ``$LINKFLAGS`` +* Fixed issue with ARM mbed framework and extra includes for the custom boards, + such as Seeeduino Arch Pro + 2.10.1 (2016-06-13) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index ff8cfe32..4f9d2e11 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 10, 1) +VERSION = (2, 10, "2.dev0") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 350fb885b898f2b93cb7889b79b7005e92c30f5c Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Tue, 14 Jun 2016 19:44:57 +0300 Subject: [PATCH 05/19] Fix pylint error --- platformio/builder/scripts/frameworks/mbed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 2653f2ea..73d5526c 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -202,7 +202,7 @@ def parse_eix_file(filename): node.get(_nkeys[0]) if len(_nkeys) == 1 else node.attrib) if "LINKFLAGS" in result: - for i, f in enumerate(result["LINKFLAGS"]): + for i, flag in enumerate(result["LINKFLAGS"]): if f.startswith("-u "): result["LINKFLAGS"][i] = result["LINKFLAGS"][i].split(" ") From 64c9004036442bec0b528395be46016e7d4f514d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Jun 2016 19:54:27 +0300 Subject: [PATCH 06/19] Fix typo --- platformio/builder/scripts/frameworks/mbed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 73d5526c..7c04af31 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -203,7 +203,7 @@ def parse_eix_file(filename): if "LINKFLAGS" in result: for i, flag in enumerate(result["LINKFLAGS"]): - if f.startswith("-u "): + if flag.startswith("-u "): result["LINKFLAGS"][i] = result["LINKFLAGS"][i].split(" ") return result From 68d834fba0b72c89abf94248fa87a1fc6f5a316e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Jun 2016 19:59:17 +0300 Subject: [PATCH 07/19] Add support for ST Nucleo L031K6 board to ARM mbed framework --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 00374ec1..b73cb776 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ PlatformIO 2.0 2.10.2 (2016-06-??) ~~~~~~~~~~~~~~~~~~~ +* Added support for ST Nucleo L031K6 board to ARM mbed framework * Fixed issue with ARM mbed framework with ``-u _printf_float`` and ``-u _scanf_float`` when parsing ``$LINKFLAGS`` * Fixed issue with ARM mbed framework and extra includes for the custom boards, From d04a7de26b2da76acd478874a591aaa20f1d9c7f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Jun 2016 20:48:56 +0300 Subject: [PATCH 08/19] Restore PIO macros if it was deleted by framework --- platformio/builder/tools/platformio.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 863e0ef1..77d1f60e 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -35,10 +35,13 @@ SRC_DEFAULT_FILTER = " ".join([ def BuildProgram(env): - env.Append( - CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format( - *pioversion_to_intstr())], - ) + def _append_pio_macros(): + env.AppendUnique( + CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format( + *pioversion_to_intstr())], + ) + + _append_pio_macros() # fix ASM handling under non-casitive OS if not case_sensitive_suffixes(".s", ".S"): @@ -60,6 +63,9 @@ def BuildProgram(env): env.BuildFrameworks([ f.lower().strip() for f in env.get("FRAMEWORK", "").split(",")]) + # restore PIO macros if it was deleted by framework + _append_pio_macros() + # build dependent libs deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR") From 7422b99b42ae0798774ea1d96238b73951222c00 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 14 Jun 2016 20:53:30 +0300 Subject: [PATCH 09/19] Process "$BUILD_UNFLAGS" variable --- platformio/builder/scripts/frameworks/mbed.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 7c04af31..4f8fd57e 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -266,9 +266,12 @@ env.Replace( # restore external build flags env.ProcessFlags([ - env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags"), - env.get("BUILD_FLAGS") + env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags") ]) +# remove base flags +env.ProcessUnFlags(env.get("BUILD_UNFLAGS")) +# apply user flags +env.ProcessFlags([env.get("BUILD_FLAGS")]) # Hook for K64F and K22F if board_type in ("frdm_k22f", "frdm_k64f"): From 29781338627005ece00aebec48c33a091a28025b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 00:59:44 +0300 Subject: [PATCH 10/19] Fix upload size checker --- platformio/builder/tools/pioupload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 874d4086..ede4ca74 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -155,7 +155,7 @@ def CheckUploadSize(_, target, source, env): # pylint: disable=W0613,W0621 print "Check program size..." sysenv = environ.copy() sysenv['PATH'] = str(env['ENV']['PATH']) - cmd = [env.subst("$SIZETOOL"), "-B", str(source[0])] + cmd = [env.subst("$SIZETOOL"), "-B", str(target[0])] result = util.exec_command(cmd, env=sysenv) if result['returncode'] != 0: return From b842a1d9b10bb46a94c3aed5a545718f6e9c0602 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 13:18:29 +0300 Subject: [PATCH 11/19] Update HISTORY.rst --- HISTORY.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index b73cb776..edd8c06a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,10 +8,12 @@ PlatformIO 2.0 ~~~~~~~~~~~~~~~~~~~ * Added support for ST Nucleo L031K6 board to ARM mbed framework +* Process ``build_unflags`` option for ARM mbed framework * Fixed issue with ARM mbed framework with ``-u _printf_float`` and ``-u _scanf_float`` when parsing ``$LINKFLAGS`` * Fixed issue with ARM mbed framework and extra includes for the custom boards, such as Seeeduino Arch Pro +* Improved a check of program size before uploading to the board 2.10.1 (2016-06-13) ~~~~~~~~~~~~~~~~~~~ From 9655ca229f6b6fa6170a2e3e4e753f42ec2e29d5 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 15 Jun 2016 14:31:07 +0300 Subject: [PATCH 12/19] Update intel_arc32 platform --- platformio/boards/intel.json | 5 +++-- platformio/builder/scripts/intel_arc32.py | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platformio/boards/intel.json b/platformio/boards/intel.json index 33e35e3c..27e62b7f 100644 --- a/platformio/boards/intel.json +++ b/platformio/boards/intel.json @@ -5,7 +5,7 @@ "extra_flags": "-DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__", "f_cpu": "32000000L", "ldscript": "flash.ld", - "mcu": "ARCv2EM", + "cpu": "quarkse_em", "usb_product": "Genuino 101", "variant": "arduino_101", "hwids": [ @@ -17,7 +17,7 @@ "platform": "intel_arc32", "upload": { "maximum_ram_size": 81920, - "maximum_size": 196608, + "maximum_size": 155648, "protocol": "script", "require_upload_port" : true }, @@ -25,3 +25,4 @@ "vendor": "Intel" } } + diff --git a/platformio/builder/scripts/intel_arc32.py b/platformio/builder/scripts/intel_arc32.py index fcb97512..0a651cd2 100644 --- a/platformio/builder/scripts/intel_arc32.py +++ b/platformio/builder/scripts/intel_arc32.py @@ -42,9 +42,8 @@ env.Replace( "-ffunction-sections", "-fdata-sections", "-Wall", - "-mav2em", "-mlittle-endian", - "-m${BOARD_OPTIONS['build']['mcu']}", + "-mcpu=${BOARD_OPTIONS['build']['cpu']}", "-fno-reorder-functions", "-fno-asynchronous-unwind-tables", "-fno-omit-frame-pointer", @@ -82,7 +81,7 @@ env.Replace( "-Wl,--gc-sections", "-Wl,-X", "-Wl,-N", - "-Wl,-m${BOARD_OPTIONS['build']['mcu']}", + "-Wl,-mcpu=${BOARD_OPTIONS['build']['cpu']}", "-Wl,-marcelf", "-static", "-nostdlib", @@ -93,7 +92,7 @@ env.Replace( "-Wl,--no-whole-archive" ], - LIBS=["c", "m", "gcc"], + LIBS=["nsim", "c", "m", "gcc"], SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES', From 0ba315243ba97bd588d4971786fc6598908ea370 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 15 Jun 2016 14:45:08 +0300 Subject: [PATCH 13/19] Revert mcu option for genuino101 --- platformio/boards/intel.json | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio/boards/intel.json b/platformio/boards/intel.json index 27e62b7f..8d5f97be 100644 --- a/platformio/boards/intel.json +++ b/platformio/boards/intel.json @@ -5,6 +5,7 @@ "extra_flags": "-DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__", "f_cpu": "32000000L", "ldscript": "flash.ld", + "mcu": "ARCv2EM", "cpu": "quarkse_em", "usb_product": "Genuino 101", "variant": "arduino_101", From 13d43425e5e68337ed3cb37a78abb2b4cf5a0785 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 14:48:27 +0300 Subject: [PATCH 14/19] Add support for ST Nucleo L031K6 board to ARM mbed framework --- docs/frameworks/mbed.rst | 7 +++++++ docs/platforms/embedded_boards.rst | 7 +++++++ docs/platforms/ststm32.rst | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index ca428b05..df5d4c00 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -629,6 +629,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_l031k6`` + - `ST Nucleo L031K6 `_ + - STM32L031K6T6 + - 32 MHz + - 32 Kb + - 8 Kb + * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ - STM32L053R8T6 diff --git a/docs/platforms/embedded_boards.rst b/docs/platforms/embedded_boards.rst index 7095dd76..23721690 100644 --- a/docs/platforms/embedded_boards.rst +++ b/docs/platforms/embedded_boards.rst @@ -2013,6 +2013,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_l031k6`` + - `ST Nucleo L031K6 `_ + - STM32L031K6T6 + - 32 MHz + - 32 Kb + - 8 Kb + * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ - STM32L053R8T6 diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index 789d0b6f..fb1acfa4 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -357,6 +357,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_l031k6`` + - `ST Nucleo L031K6 `_ + - STM32L031K6T6 + - 32 MHz + - 32 Kb + - 8 Kb + * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ - STM32L053R8T6 From 4abaa6758032a2204175a92ab05dad4058d14d53 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 14:48:46 +0300 Subject: [PATCH 15/19] Update Intel ARC32 Arduino framework to v1.0.6 --- HISTORY.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index edd8c06a..c7df4ac0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,11 +9,12 @@ PlatformIO 2.0 * Added support for ST Nucleo L031K6 board to ARM mbed framework * Process ``build_unflags`` option for ARM mbed framework -* Fixed issue with ARM mbed framework with ``-u _printf_float`` and +* Updated Intel ARC32 Arduino framework to v1.0.6 +* Improved a check of program size before uploading to the board +* Fixed issue with ARM mbed framework ``-u _printf_float`` and ``-u _scanf_float`` when parsing ``$LINKFLAGS`` * Fixed issue with ARM mbed framework and extra includes for the custom boards, such as Seeeduino Arch Pro -* Improved a check of program size before uploading to the board 2.10.1 (2016-06-13) ~~~~~~~~~~~~~~~~~~~ From 7e027db02b9017a76ea82ad07b3e176601c9febe Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 14:52:11 +0300 Subject: [PATCH 16/19] Update Intel ARC32 Arduino framework to v1.0.6 // Issue #695 --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index c7df4ac0..d4804f06 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,6 +10,7 @@ PlatformIO 2.0 * Added support for ST Nucleo L031K6 board to ARM mbed framework * Process ``build_unflags`` option for ARM mbed framework * Updated Intel ARC32 Arduino framework to v1.0.6 + (`issue #695 `_) * Improved a check of program size before uploading to the board * Fixed issue with ARM mbed framework ``-u _printf_float`` and ``-u _scanf_float`` when parsing ``$LINKFLAGS`` From cdcf0756355ecccc5180d12c6e8bc3496420a498 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 14:56:31 +0300 Subject: [PATCH 17/19] 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 = [] From 682e435ded10a75f2ea46536a3d1defece040808 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 16:02:04 +0300 Subject: [PATCH 18/19] Fix firmware uploading to Arduino/Genuino 101 // Resolve #695 --- platformio/__init__.py | 2 +- platformio/boards/intel.json | 3 ++- platformio/builder/scripts/intel_arc32.py | 10 +++++++++- platformio/builder/tools/pioupload.py | 6 ++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 4f9d2e11..299738de 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 10, "2.dev0") +VERSION = (2, 10, "2.dev1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/boards/intel.json b/platformio/boards/intel.json index 8d5f97be..34950dc8 100644 --- a/platformio/boards/intel.json +++ b/platformio/boards/intel.json @@ -20,7 +20,8 @@ "maximum_ram_size": 81920, "maximum_size": 155648, "protocol": "script", - "require_upload_port" : true + "require_upload_port" : true, + "use_1200bps_touch": true }, "url": "https://www.arduino.cc/en/Main/ArduinoBoard101", "vendor": "Intel" diff --git a/platformio/builder/scripts/intel_arc32.py b/platformio/builder/scripts/intel_arc32.py index 0a651cd2..f654234f 100644 --- a/platformio/builder/scripts/intel_arc32.py +++ b/platformio/builder/scripts/intel_arc32.py @@ -23,6 +23,14 @@ from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, env = DefaultEnvironment() + +def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 + + if env.get("BOARD_OPTIONS", {}).get("upload", {}).get( + "use_1200bps_touch", False): + env.TouchSerialPort("$UPLOAD_PORT", 1200) + + env.Replace( AR="arc-elf32-ar", AS="arc-elf32-as", @@ -178,7 +186,7 @@ AlwaysBuild(target_size) # upload = env.Alias(["upload", "uploadlazy"], target_firm, - [env.AutodetectUploadPort, "$UPLOADCMD"]) + [env.AutodetectUploadPort, BeforeUpload, "$UPLOADCMD"]) AlwaysBuild(upload) # diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index ede4ca74..37cd4826 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -37,13 +37,15 @@ def FlushSerialBuffer(env, port): def TouchSerialPort(env, port, baudrate): + port = env.subst(port) + print "Forcing reset using %dbps open/close on port %s" % (baudrate, port) if system() != "Windows": try: - s = Serial(env.subst(port)) + s = Serial(port) s.close() except: # pylint: disable=W0702 pass - s = Serial(port=env.subst(port), baudrate=baudrate) + s = Serial(port=port, baudrate=baudrate) s.setDTR(False) s.close() sleep(0.4) From c62a3f8ee66986440957f28d1a7d0c8f6e034a98 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 17:57:28 +0300 Subject: [PATCH 19/19] Version bump to 2.10.2 (issues #695) --- HISTORY.rst | 2 +- platformio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index d4804f06..51981ccf 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release Notes PlatformIO 2.0 -------------- -2.10.2 (2016-06-??) +2.10.2 (2016-06-15) ~~~~~~~~~~~~~~~~~~~ * Added support for ST Nucleo L031K6 board to ARM mbed framework diff --git a/platformio/__init__.py b/platformio/__init__.py index 299738de..2c38c6d8 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 10, "2.dev1") +VERSION = (2, 10, 2) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"