mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 02:54:25 +02:00
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>`_
|
`Shippable CI <https://shippable.com>`_
|
||||||
* Disabled "nano.specs" for ARM-based platforms
|
* Disabled "nano.specs" for ARM-based platforms
|
||||||
(`issue #219 <https://github.com/platformio/platformio/issues/219>`_)
|
(`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
|
* Fixed resolving of C/C++ std libs by Eclipse IDE
|
||||||
(`issue #220 <https://github.com/platformio/platformio/issues/220>`_)
|
(`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)
|
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:
|
with open(path, "w") as f:
|
||||||
f.write(str(value))
|
f.write(str(value))
|
||||||
|
|
||||||
|
if "micronucleus" in env['UPLOADER']:
|
||||||
|
print "Please unplug/plug device ..."
|
||||||
|
|
||||||
upload_options = env.get("BOARD_OPTIONS", {}).get("upload", {})
|
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"):
|
if env.subst("$UPLOAD_SPEED"):
|
||||||
env.Append(UPLOADERFLAGS=["-b", "$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):
|
if not upload_options.get("require_upload_port", False):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user