forked from platformio/platformio-core
Fix firmware uploading using USB programmer (USBasp) for atmelavr platform // Resolve #221
This commit is contained in:
@@ -8,9 +8,13 @@ Release History
|
||||
`Shippable CI <https://shippable.com>`_
|
||||
* Disabled "nano.specs" for ARM-based platforms
|
||||
(`issue #219 <https://github.com/platformio/platformio/issues/219>`_)
|
||||
* Fixed "ConnectionError" when PlatformIO SF Storage is off-line
|
||||
* Fixed resolving of C/C++ std libs by Eclipse IDE
|
||||
(`issue #220 <https://github.com/platformio/platformio/issues/220>`_)
|
||||
* Fixed "ConnectionError" when PlatformIO SF Storage is off-line
|
||||
* Fixed firmware uploading using USB programmer (USBasp) for
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html>`_
|
||||
platform
|
||||
(`issue #221 <https://github.com/platformio/platformio/issues/221>`_)
|
||||
|
||||
2.0.2 (2015-05-27)
|
||||
------------------
|
||||
|
@@ -20,14 +20,18 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
||||
with open(path, "w") as f:
|
||||
f.write(str(value))
|
||||
|
||||
if "micronucleus" in env['UPLOADER']:
|
||||
print "Please unplug/plug device ..."
|
||||
|
||||
upload_options = env.get("BOARD_OPTIONS", {}).get("upload", {})
|
||||
|
||||
if "usb" in env.subst("$UPLOAD_PROTOCOL"):
|
||||
upload_options['require_upload_port'] = False
|
||||
env.Replace(UPLOAD_SPEED=None)
|
||||
|
||||
if env.subst("$UPLOAD_SPEED"):
|
||||
env.Append(UPLOADERFLAGS=["-b", "$UPLOAD_SPEED"])
|
||||
|
||||
if "micronucleus" in env['UPLOADER']:
|
||||
print "Please unplug/plug device ..."
|
||||
|
||||
if not upload_options.get("require_upload_port", False):
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user