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

tool-micronucleus package (Digispark support) needs update to fix "flash erase error" -71, -32, etc. on Linux #303

Open
jlunder opened this issue Jan 26, 2023 · 0 comments

Comments

@jlunder
Copy link

jlunder commented Jan 26, 2023

I’ve been experiencing the pervasive micronucleus “flash erase error” -71, -32, etc. (see Digispark gets "Flash erase error -71 has occured" - #5 by Paul3492) with the micronucleus upload method. It looks like for most people this is happening because the flash erase takes long enough for the USB hardware to timeout and disconnect. This problem is described accurately here:

http://digistump.com/board/index.php/topic,464.msg2088.html#msg2088

That workaround in the micronucleus upload tool, which reconnects and retries when it detects a disconnect during flash erase, has existed forever and works properly in the latest upstream source. I suspect the reason I’m seeing this now with the PlatformIO package is that more different error codes became associated with the disconnection in Linux or libusb, and the PlatformIO package is a little out-of-date with respect to upstream (-84 is what’s described in that patch from 2013, but I see -71 and -32 now – -84 might still be returned by libusb but obviously that particular code is handled).

Building latest upstream fixes the problem for me, but the shipped micronucleus binary seems to be modified to take an extra “-c” parameter (I made a wrapper script to strip it out), and I can’t figure out where that patch or any of the package source comes from, or I'd try to include a PR...

Related to #101 in that that issue also requests an update to this tool package.

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

No branches or pull requests

1 participant