From f058506bc421f58a7741d7812b48307ed53bb301 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 2 Mar 2015 23:17:45 +0200 Subject: [PATCH] Fix firmware uploading for "atmelavr" boards which work within "usbtiny" protocol --- HISTORY.rst | 7 +++++++ platformio/__init__.py | 2 +- platformio/builder/scripts/atmelavr.py | 10 ++++------ platformio/builder/scripts/baseavr.py | 5 ----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4bbdae70..1f32c398 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,13 @@ Release History =============== +1.0.2 (2015-03-??) +------------------ + +* Fixed firmware uploading for + `atmelavr `__ + boards which work within ``usbtiny`` protocol + 1.0.1 (2015-02-27) ------------------ diff --git a/platformio/__init__.py b/platformio/__init__.py index 24706578..6f55293d 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (1, 1, "0-dev") +VERSION = (1, 0, "2.dev0") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/scripts/atmelavr.py b/platformio/builder/scripts/atmelavr.py index 4cf5276e..0b742948 100644 --- a/platformio/builder/scripts/atmelavr.py +++ b/platformio/builder/scripts/atmelavr.py @@ -20,15 +20,13 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 with open(path, "w") as f: f.write(str(value)) - if "UPLOAD_SPEED" in env: - env.Append( - UPLOADERFLAGS=["-b", "$UPLOAD_SPEED"] - ) - if "usb" not in env.subst("$UPLOAD_PROTOCOL"): env.AutodetectUploadPort() env.Append( - UPLOADERFLAGS=["-P", "$UPLOAD_PORT"] + UPLOADERFLAGS=[ + "-b", "$UPLOAD_SPEED", + "-P", "$UPLOAD_PORT" + ] ) if env.subst("$BOARD") == "raspduino": diff --git a/platformio/builder/scripts/baseavr.py b/platformio/builder/scripts/baseavr.py index 912250bf..bfe19df8 100644 --- a/platformio/builder/scripts/baseavr.py +++ b/platformio/builder/scripts/baseavr.py @@ -50,11 +50,6 @@ env.Replace( SIZEPRINTCMD='"$SIZETOOL" --mcu=$BOARD_MCU -C -d $SOURCES' ) -if "UPLOAD_SPEED" in env: - env.Append(UPLOADERFLAGS=["-b", "$UPLOAD_SPEED"]) -if env.subst("$UPLOAD_PROTOCOL") != "usbtiny": - env.Append(UPLOADERFLAGS=["-P", "$UPLOAD_PORT"]) - env.Append( BUILDERS=dict( ElfToEep=Builder(