Greetings all,
I was having a terrible time trying to get passed the
Abort mission! error has occured ...
error message, which always appeared at the 66% (during or after erase) when trying to upload under Linux. It wasn't the USB connection, nor permissions, and was really frustrating.
So I finally found a dual-boot machine where Linux was having the same problem, but no issue under Windows. I did notice this message, though:
Eep! Connection to device lost during erase! Not to worry
This happens on some computers - reconnecting...
Aha... short version is that it seems we need to re-interpret the Linux error code (-84), from
usbfs: USBDEVFS_CONTROL failed cmd micronucleus rqt 192 rq 2 len 0 ret -84
to something the micronucleus program can grok so it will automagically reconnect after the erase.
I've made the change and a pull request for the micronucleus mod (
pull request here)
but in case in doesn't go through and/or for the impatient I'm including the diff file for the minor change, here.
I've successfully uploaded to the digispark using this modified micronucleus, and get messages like this now:
Binary sketch size: 756 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 40% complete
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 60% complete
> Erasing the memory ...
erasing: 79% complete
>> Eep! Connection to device lost during erase! Not to worry
>> This happens on some computers - reconnecting...
erasing: 80% complete
> Starting to upload ...
writing: 100% complete
>> Micronucleus done. Thank you!
Regards,
PatD