Finally received all the parts I needed.
It worked, my Arduboy is ALIVE!!!
Thank you for this guide
Congrats! Fancy clips, where did you get those?
The clamps are 2 times the price of the usb programmer xD
“fancy” never comes cheap.
Once the boot loader has been successfully re-burned, you should make sure the bootloader area protection fuses have been set, to prevent the problem from happening in the future.
You can verify that the protection fuses have been set properly by uploading a sketch I wrote:
Strange, my only Arduboy that says OK with your sketch is the one I “repaired” with the method exposed here. The two other untouched units have Lock bits: 0xEF
It makes sense that the one you repaired says OK. Using the Arduino IDE to re-burn the bootloader should also set the lock bits properly after burning.
All Kickstarter units probably will say Bootloader UNLOCKED!
And, although @bateske has stated that production units should have the lock bits set properly, there is some evidence that this is not the case with at least some of them.
Are these Kickstarter or production units? What message do you get on the last line of the sketch output? If it says the lock bits are 0xEF, the sketch should and this with 0x3F and then compare with 0x2F and then report LOCK bits are OK. Are you sure the untouched units report Lock bits: 0xEF ?
All are production models, the one in the middle is the one I “repaired”. Yes, it seems the untouched ones are still not being properly locked. Maybe that is why they fail so easily
True. It should be almost impossible to completely brick a properly protected Arduboy, even after attempting to upload a sketch that’s too large. The reset button should always work as a last resort.
The fact that all your units are production ones and were unprotected helps explain reports of other production units being bricked, and contradicts @bateske’s statment:
Either that or (some) preorders were protected but the factory then went back to shipping unprotected units.
Thought I would give the sketch a shot out of curiosity on my Arduboy and its reporting the bootloader is unlocked.
I assume this is fairly new stock as it was purchased from Pimoroni on 30th April 2017.
Think i’ll order a programmer now for just incase.
Mine are also from Pimoroni
@eried Wow thanks for doing some testing looks like we get to have a conversation with our factory and try to figure out how this happened!
I’ll have to admit after the first round of production came out we tested those units so it would seem at some point the factory made a change and switched test jigs or something? We don’t serialize our production batches (yet) so it’s actually pretty tough to say how many units would be effected.
It would be maximum of around 2,000 units but if you do end up having an issue bricking a device, and for sure the reset button doesn’t work then use the contact form to get a hold of us and we can help you resolve the situation.
It’s kind of frustrating and enlightening at the same time to see a post like @eried with the display on the screen of how the lock fuses are, this is kind of like the problem we had with the RGB led where it seems very easy to design a test for it but in the rapid pace of production some times it’s simple to forget that it’s pretty easy to put together something like this.
Anyways, its still remarkably difficult to overwrite the bootloader, as it requires some kind of glitch or malfunction to occur, but it does make it technically possible so obviously we will fix this in the future.
Or attempting to burn a sketch that is too large using an uploader other than the Arduino IDE, which doesn’t check the length before uploading, such as @GrisWoldDiablo described earlier in this topic by using Visual Studio:
I just tested my 2 units. Only the one I “debricked” says LOCK.
Is there a way to set the lock bits with a simple program or I should just do an other burn boot loader?
You can use the command:
Also using Arduinos “burn bootloader” will work with arduino leonardo set as the target, the fuses are set as part of the process.
Maybe I’m missing something but I’m unable to use “burn bootloader” maybe its something wrong with my environment?
Its no big issue as I’ve ordered a USBasp and currently am not bricked its just perked my curiosity.
Arduino: 1.8.2 (Windows 7), Board: "Arduino Leonardo"
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m
Error while burning bootloader. avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : usb Using Programmer : stk500v2 avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)
avrdude done. Thank you.
Look on the bright side, at least the program was very polite
You can only burn the bootloader, or set the fuses, using an AVR hardware programmer. You can’t do it using the Arduboy’s USB port. Since you said you’ve ordered a USBasp, I’m assuming you don’t already have a suitable hardware programmer.
Ahh it makes sense I misinterpreted Kevins post [quote=Also using Arduinos “burn bootloader” will work with arduino leonardo set as the target,"][/quote] I assume it also impossible to for the hardware to lock itself with a sketch?
I should have read the whole post where I found your sketch.