3

I'm doing on-target unit testing for an industrialized application and my test code is too large to fit everything on the board at the same time. I'm using the Sloeber toolset to develop, and I put something on the board that was over 28K, and the programming failed. Now the beetle does not show up as a serial port, and not even when pushing the reset pins, which I've had to do a number of times in the past. If I overwrote the bootloader, which seems likely, is there a way to recover it? Do I need to reprogram the bootloader on a Beetle board? I haven't found any way to do that with a Beetle...

Thanks!

4
  • the upload didn't overwrite the bootloader. see my answer – Juraj Oct 1 '20 at 12:44
  • Yeah, I tried the double reset--that didn't work either. The behavior that happened is that Sloeber failed when it was writing the image and the blue light stayed on. When I reset it, no port came up. When i hit the reset a hundred times, the LED never pulsed and no com port ever showed up in my device manager. I'm pretty sure this is a Sloeber problem with the gcc tools that the Arduino program probably safeguards against. – Laurence Gordon Oct 1 '20 at 16:15
  • not hundred times. only but exactly twice to activate the bootloader. – Juraj Oct 1 '20 at 16:44
  • on ATmega32u4 it is not possible to overwrite the bootloader with serial upload – Juraj Oct 6 '20 at 5:21
2

I don't know the Sloeber toolset, but it seems very unlikely, that it really has overwritten the bootloader. When programming via USB, it is actually the bootloader, which writes the program into the flash memory. So that would mean, that the bootloader had overwritten itself, only because a too large program. Not sure, if this is even possible.

Anyway, you can utilize an ICSP/ISP programmer (or another Arduino, if you don't have one) to burn the bootloader onto the chip again. Google for Arduino ISP to get instructions for it, there are plenty of tutorials.

You need to connect the correct pins on the Beetle with the ISP programmer. According to this site, you should find the ICSP pads at the back of the board (the group of 6 pins in 2 rows). Through these pins you can burn the bootloader.

If that doesn't work either, the problem lies somewhere else. As I already stated, overwriting the bootloader because a program is too big for the MCU should not happen and it is highly unlikely, that this is really your problem. You might have damaged something on your board, though we cannot tell that from the description. So you could just try to burn the bootloader and see what happens.

3
  • OP doesn't have to flash the bootloader. the bootloader is protected with fuses – Juraj Oct 1 '20 at 12:45
  • Yes, the icsp pads are there, which is how you perform the reset. It seems like the Sloeber toolset, which uses the atmel gcc/g++ tools, somehow causes a problem with the beetle if the file is too large. It definitely fails to write and tell you so, but either way, the beetle becomes completely unresponsive. – Laurence Gordon Oct 1 '20 at 16:18
  • on ATmega32u4 it is not possible to overwrite the bootloader with serial uploaad – Juraj Oct 6 '20 at 5:21
0

Use double reset to activate the bootloader. The LED will pulse while it waits for upload.

The board doesn't show up on USB because USB is handled by the sketch on MCU with native USB. If the sketch doesn't run it doesn't handle the USB.

The bootloader is protected by fuses.

(This happen to me with Sloeber a few days ago.)

1
  • 1
    Yeah, I tried the double reset--that didn't work either. The behavior that happened is that Sloeber failed when it was writing the image and the blue light stayed on. When I reset it, no port came up. When i hit the reset a hundred times, the LED never pulsed and no com port ever showed up in my device manager. – Laurence Gordon Oct 1 '20 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.