Arduino Leonardo - No Serialport

Hello,

I might have made a big mistake:

First I compiled a program with avr-gcc using this tutorial: Setting up AVR-GCC Toolchain on Linux and Mac OS X » maxEmbedded

The program I compiled is the one in the tutorial.

Next I uploaded the resulting .hex file via nodejs and avrgirl-arduino (GitHub - noopkat/avrgirl-arduino: A NodeJS library for flashing compiled sketch files to Arduino microcontroller boards.) to the Leonardo.

After the first upload the Leonardo disappeared. If I connect it to the Computer no serial ports are shown in the Arduino IDE or anywhere else. If I connect my Yun everything works fine.

Did I crash something like a USB driver?

I appreciate any ideas or tips on how to fix this.

Thank you!

If the program you uploaded has a severe problem such as using all memory or otherwise crashes the Leonardo, it won't be visible any more. You can hold the reset button on the Leonardo until you are ready to upload something you know works, such as the blink sketch. Release the reset button and the USB port will show up for a few seconds, long enough for the blink sketch upload.

In some cases you can "brick" your Leonardo with "problematic code" and it disappears from the USB/Com-Port-List.
I had this problem some times before (but not very often).
But I did not use the software you do. I always used the "normal" Arduino IDE.

Solutions (maybe):

  1. You can try to reprogram the bootloader. But you need some kind of ISP programmer. You can also use an other Arduino board like UNO or Mega as ISP programmer.
    Take a look at:
    http://arduino.cc/en/Tutorial/ArduinoISP
    or Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer

  2. If the Leonardo did not "disappear completely" you can:
    Try to upload a very basic sketch, like an "empty" sketch or the "blink sketch" from the Arduino IDE examples.
    Press and hold the reset button and release it just before the upload starts. To get the right timing you may need some tries.

Good luck!

1 Like

Thank you very much. Your answers really helped me.

I solved it by pressing the reset button and immediate uploading of the blink sketch.
Worked after the fifth time.

1 Like

Good to hear that your Leonardo is working again!