Skip to content
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 error #400

Closed
fitzterra opened this issue Dec 23, 2015 · 8 comments
Closed

Digispark-tiny upload error #400

fitzterra opened this issue Dec 23, 2015 · 8 comments
Assignees
Labels
Milestone

Comments

@fitzterra
Copy link

Trying to upload to a digispark-tiny (arduino, attiny85) via micronuclues fails with:

$ platformio run -e digispark-tiny -t upload
[Wed Dec 23 08:27:59 2015] Processing digispark-tiny (platform: atmelavr, board: digispark-tiny, framework: arduino)
-----------------------------------------------------------------------------------------------------------------
BeforeUpload(["upload"], [".pioenvs/digispark-tiny/firmware.hex"])
Please unplug/plug device ...
"/home/tomc/.platformio/packages/tool-micronucleus/micronucleus" -c digispark --timeout 60 .pioenvs/digispark-tiny/firmware.hex
sh: 1: /home/tomc/.platformio/packages/tool-micronucleus/micronucleus: not found
scons: *** [upload] Error 127

There is no pause at the point where the message Please unplug/plug device ... comes up and the error appears immediately.

This is on a Xubuntu 15.10 64-bit machine with PlatformIO installed inside a virtualenv.

Looking at the micronucleus binary, it seems it is a 32-bit version. Not sure if this is the issue:

$ file /home/tomc/.platformio/packages/tool-micronucleus/micronucleus
/home/tomc/.platformio/packages/tool-micronucleus/micronucleus: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=37731088830509f6a90d9765e9784239bb32ffc8, not stripped

Anyone seen this before or have any advice?

Thanks,
Tom

@ivankravets
Copy link
Member

@valeros please check that this 32-bit binary works on 64-bit host OS

@ivankravets
Copy link
Member

Similar issue #394

@valeros
Copy link
Member

valeros commented Dec 23, 2015

Hi @fitzterra
Could you test upload with this micronucleus:
https://dl.dropboxusercontent.com/u/10025728/tool-micronucleus.zip

@fitzterra
Copy link
Author

I got it to work by doing the following:

  • installing lib32stdc++6 from the package manager - I doubt if this has anything to do with the result, but saw somewhere that it may be needed for the USB support
  • copying the 64-bit micronucleus from the Digistump v2.04a library installed by the Arduino library installer.

Here are my current ~/.platformio/packages/tool-micronucleus dir:

$ ls
micronucleus  micronucleus.orig

The .orig version is the original installed by platformio and the other is the one from Digistump:

$ file *
micronucleus:      ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=cdbba5533de04828c8a94ab502d6effab96a7a4c, not stripped
micronucleus.orig: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=37731088830509f6a90d9765e9784239bb32ffc8, not stripped

Does this help?

@valeros
Copy link
Member

valeros commented Dec 24, 2015

@fitzterra Please, update your tool-micronucleus package via platformio update

@fitzterra
Copy link
Author

@valeros A great big thank you! After the update I now have a 64-bit micronucleus and the unplug/replug pause and timeout seems to work perfectly. I can only test and actual flash tomorrow and will report here if it does not work, but am confident the issue is now resolved.

A great big thank you for your effort on Christmas Eve (or Christmas Day, depending where you are :-) ) - much appreciated.

@ivankravets ivankravets added this to the 2.6.4 milestone Dec 24, 2015
@ivankravets
Copy link
Member

@fitzterra please reopen this issue if it doesn't work.

@ivankravets
Copy link
Member

@fitzterra I would recommend you to gift @valeros ⭐ here https://github.com/platformio/platformio/stargazers. He likes them 😊 🎄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants