Closed gurghet closed 3 years ago
I'm no expert but based on the fix that @valeros applied in issue #6 it seems that the changes made (commit 9ceb183) were accidentally removed in commit 89d5e79 when the the uploader configuration was changed to more generically handle jtag2updi from line 200 of builder/main.py
`
if upload_protocol == "jtag2updi":
upload_options = env.BoardConfig().get("upload", {})
for opt in ("require_upload_port", "use_1200bps_touch", "wait_for_upload_port"):
upload_options[opt] = True
`
So in short - looks like the fix was undone which is why it isn't working in the dev branch or master branch
Thanks, tonight I'll try and install https://github.com/platformio/platform-atmelmegaavr/commit/9ceb183865f622dc75fc5a1e32294a5e7ae358f1 and report if it works
Works perfectly! Thanks @chrisinabox
Workaround: downgrade to 9ceb183
No worries, glad to help!
Hopefully @valeros can take a look when they have some spare time. Clearly just a regression issue.
Thanks for reporting.
@MCUdude Could you please clarify whether there is any difference in the uploading process using the jtag2updi
protocol for your targets from PR #5 and Nano Every? I see you used wait_for_upload_port
, but it breaks uploading to the Nano board. Thanks!
@valeros I'll give it a go this evening. When I tried this on my mac, wait_for_upload_port
worked just fine. I'll try it on a Windows machine as well.
It may be that the serial port actually doesn't disappear when it gets the 1200bps touch but only switches functionality internally (unlike the Arduino Leonardo). A "generic/DIY" jtag2updi programmer does not use and will not be affected by a 1200pbs touch, so if wait_for_upload_port
has to be removed for Nano Every, it means that its onboard jtag2updi programmer works more similar to a "generic/DIY" version, which is a good thing!
I just tested this on my mac and on my Windows PC, and uploading works fine on both with the latest release
@valeros I can also mention that it didn't make a difference if I added or removed wait_for_upload_port
to the nano_every.json manifest file or board_upload.wait_for_upload_port
to the platformio.ini file. I still got "Waiting for the new upload port..." regardless; on both MacOS and Windows.
@MCUdude Thanks for looking into it. Probably you need to disable wait_for_upload_port
directly in the main.py#L202 to properly test it. Thanks!
@valeros ok, so basically replace
for opt in ("require_upload_port", "use_1200bps_touch", "wait_for_upload_port"):
upload_options[opt] = True
with
upload_options["require_upload_port"] = True
upload_options["use_1200bps_touch"] = True
upload_options["wait_for_upload_port"] = False
then. I'll give it a try later today!
I can confirm that
upload_options["require_upload_port"] = True
upload_options["use_1200bps_touch"] = True
upload_options["wait_for_upload_port"] = False
Works on both Windows and Mac.
@gurghet Should be fixed in the dev branch, could you please retest with the following configuration:
[env:upstream_develop]
platform = https://github.com/platformio/platform-atmelmegaavr.git
framework = arduino
board = nano_every
Works on my mac! 👍
I'm having a similar issue to https://github.com/platformio/platform-atmelmegaavr/issues/6. Uploading from Arduino IDE works fine but PlatformIO hangs forever. I tried using the develop branch, to no avail. Following is my verbose shell.
After a few minutes it will print
After that it will print continuously