New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

digispark-tiny upload failing #106

Closed
jonlorusso opened this Issue Mar 3, 2015 · 8 comments

Comments

Projects
None yet
4 participants
@jonlorusso

jonlorusso commented Mar 3, 2015

digispark-tiny upload is failing:

platformio run --target upload

Fails with:

[Tue Mar 3 20:01:16 2015] Processing digispark-tiny (platform: atmelavr, board: digispark-tiny, framework: arduino)
BeforeUpload(["upload"], [".pioenvs/digispark-tiny/firmware.hex"])
scons: *** [upload] Explicit exit, status Error: Please specify upload_port for environment or use global --upload-port option.

Error: Please specify upload_port for environment or use global --upload-port option.

When uploading to the digispark via micronucleus I am normally prompted to insert the device. No port name is required.

@ivankravets ivankravets added the bug label Mar 3, 2015

@ivankravets ivankravets added this to the 1.1.0 milestone Mar 3, 2015

@ivankravets ivankravets assigned ivankravets and unassigned valeros Mar 3, 2015

@ivankravets

This comment has been minimized.

Member

ivankravets commented Mar 3, 2015

Thanks a lot for report! This is a bug, I will fix it as soon as possible! Current solution is to put "something" to --upload-port, like:

> platformio run -t upload --upload-port /dev/null

Does it work for you?

@jonlorusso

This comment has been minimized.

jonlorusso commented Mar 3, 2015

$ platformio run --target upload --upload-port /dev/null

[Tue Mar 3 21:38:14 2015] Processing digispark-tiny (platform: atmelavr, board: digispark-tiny, >framework: arduino)
BeforeUpload(["upload"], [".pioenvs/digispark-tiny/firmware.hex"])
"/home/pi/.platformio/packages/tool-micronucleus/micronucleus" -c digispark --timeout 60 -b -P /dev/null -U flash:w:.pioenvs/digispark-tiny/firmware.hex:i

At this point, output pauses, and I plug in the device (despite not being prompted to). Once I plug in the device, I see:

micronucleus: library/micronucleus_lib.c:66: micronucleus_connect: Assertion `res >= 4' failed.

Please plug in the device ...
Press CTRL+C to terminate the program.

Aborted
scons: *** [upload] Error 134
========================= [ ERROR ] Took 14.70 seconds =========================

@ivankravets

This comment has been minimized.

Member

ivankravets commented Mar 3, 2015

@jonlorusso We will fix it tomorrow. I've just opened for it separated issue #107

@valeros

This comment has been minimized.

Member

valeros commented Mar 3, 2015

It seems that this error is caused by usb permissions issue.
Did you try to insert platformio udev.rules file? https://github.com/ivankravets/platformio/blob/develop/scripts/99-platformio-udev.rules

@jonlorusso

This comment has been minimized.

jonlorusso commented Mar 3, 2015

Getting closer:

[Tue Mar 3 22:09:52 2015] Processing digispark-tiny (platform: atmelavr, board: digispark-tiny, framework: arduino)
BeforeUpload(["upload"], [".pioenvs/digispark-tiny/firmware.hex"])
"/home/pi/.platformio/packages/tool-micronucleus/micronucleus" -c digispark --timeout 60 -b -P /dev/null -U
flash:w:.pioenvs/digispark-tiny/firmware.hex:i
Please plug in the device ...
Press CTRL+C to terminate the program.
Device is found!
connecting: 40% complete
Device has firmware version 1.2
Available space for user applications: 6010 bytes
Suggested sleep time between sending pages: 8ms
Whole page count: 94 page size: 64
scons: *** [upload] Error 1
Erase function sleep duration: 752ms
parsing: 40% complete
Error opening flash:w:.pioenvs/digispark-tiny/firmware.hex:i: No such file or directory
Error loading or parsing hex file.
========================= [ ERROR ] Took 16.18 seconds =========================

@ivankravets ivankravets modified the milestones: 1.0.2, 1.1.0 Mar 4, 2015

@ivankravets

This comment has been minimized.

Member

ivankravets commented Mar 4, 2015

Fixed in #107 and will be released in PlatformIO 1.0.2 today.

Please re-open if you still have this issue.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Mar 5, 2015

Could you try new version 1.1.0? Please use platformio upgrade command.

Thanks in advance!

@nebulous

This comment has been minimized.

nebulous commented Mar 27, 2016

For future Googlers: a similar problem occurs in OS X with USB3 ports. Try connecting the target device via a USB2 hub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment