Arduino Leonardo, sketch upload and Pc port problem

Hello everbody,

I am tring to get a Leonardo to work. I am Using the IDE 1.8.16 on Win 10.

First I did was setting the IDE to the Arduino Leonardo Board (not the ETH version) and upload the Blink sketch, which work so far. So I guessed that everything is working well.

But since then i can not upload any sketch.
1:So I tried the rest button, at different times and holding, but with any succes.

2: Next I tried burning the Bootloader, so i configured an Chinese Nano board. What make me wonder, was that that only works, if i reset the Leonardo at the beginning, other wise the connection will not be suceccfully established.

After the IDE responsed with a success and observing the blinking RX Led on both board, I hope I was done.

But I can not find the Leonardo in the device manager nor can I upload a sketch to it (Pluging the arduino direcly to the PC and detachted all other wires ofcourse). Since I haven't checkt it the first time pulging the borad to the PC, I am confused. having no Board attached, I still have a Com1 port (2 Display, 1 USB mouse and keyboard how can there be a Com1). The Com1 port was also the one i used in the first place. The Leonardo start blinking again after the bootloader was burned.

So I tried uninstalling the Com1 port, which automatecly reinstall it self, no difference if the Leonardo is attached or not. I purge the IDE and reinstalled it, I tried using the Legacy harddrive mode to install the correct driver for the leonardo board (all 4 versions) resulting in a not accesable com port.

So can the sketch itself be a problem, if yes can i clear it with my nano board? Are there anythings I have missed?

This is one guied I tried

Thanks for any help
Working to solve this for some days now.

A first check would be to see what happens in Windows device manger when you press and release the reset button. You should see a port with the text "Arduino Leonardo (boot loader)" in the ports section.

Further be aware that there are charge only USB cables that don't carry data. You might have used a different cable the first time when the upload succeeded so I suggest that you try different cables if the resetting of the board does not show the Leonardo bootloader in Windows device manager.

Let us know and we can take it from there.

1 Like

I checked the device mangaer serveral times, noting also while the led is puslating. Also searching for new device, while the led is pulsationg doesn change any thing. (Also testet it with the same cable on a different pc). I does not pop up and i can not force to install the drivers "Arduino Leonardo" or "Arduino Leonardo bootloader", testet Arduino LLC and Arduino Srl. Also remoed them completely after the test and reinstalled the IDE.
Would it help to connect it to a Linux OS, just to be sure?

I am aware of the charge only cables, that's why I only use that one which worked the first time. I will test a different cable also, maybe it is broken now, just to be safe. I just forget to mentioned it in the first post.

Can it make a difference, if the nano has the old bootloader. Since the burining just works, if i reset the nano while initialision the burn?

If you have a Linux machine handy, it is certainly worth a try.

Also make sure the USB cable is completely plugged into both the Arduino board and the PC.

A damaged cable or partial insertion can result in the power connections being made (and thus LED lights on the board), but no data connections (and thus no port for the board).

No. The bootloader on the Nano is not relevant. As long as you are able to upload the "ArduinoISP" sketch to the Nano to turn it into an "Arduino as ISP" programmer, it doesn't matter which bootloader is on it.

You should not reset the Nano. It probably won't cause any permanent damage to the Leonardo, but it is not necessary and it will likely cause the Burn Bootloader process to fail.

By "beginning", are you referring to the beginning of the Burn Bootloader process?

Many computers have an internal built-in serial port that is enumerated as COM1. If you have this port even when the Leonardo is not connected then that is not the port of your Leonardo.

Yes I have tested the connection. I just haven't found an other micro-cable I trust at the moment.

First the Output without resetting:

C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03

avrdude done.  Thank you.

Fehler beim Brennen des Bootloaders.

I rebote the Nano after 'avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03', than it works.

Hope it is clear, what I mean with beginning now.

C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -PCOM4 -b19200 -Uflash:w:C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4/bootloaders/caterina/Caterina-Leonardo.hex:i -Ulock:w:0x2F:m 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\User\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xcb"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xcb:
avrdude: load data efuse data from input file 0xcb:
avrdude: input file 0xcb contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xd8"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd8:
avrdude: load data hfuse data from input file 0xd8:
avrdude: input file 0xd8 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xff:
avrdude: load data lfuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.


         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4/bootloaders/caterina/Caterina-Leonardo.hex"
avrdude: writing flash (32730 bytes):

Writing | ################################################## | 100% 35.75s

avrdude: 32730 bytes of flash written
avrdude: verifying flash memory against C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: load data flash data from input file C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: input file C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4/bootloaders/caterina/Caterina-Leonardo.hex contains 32730 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 19.60s

avrdude: verifying ...
avrdude: 32730 bytes of flash verified
avrdude: reading input file "0x2F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x2F:
avrdude: load data lock data from input file 0x2F:
avrdude: input file 0x2F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.```

[quote="in0, post:5, topic:935810"]
No. The bootloader on the Nano is not relevant. As long as you are able to upload the "ArduinoISP" sketch to the Nano to turn it into an "Arduino as ISP" programmer, it doesn't matter which bootloader is on it.
[/quote]
Okay just checking every possibility. Working with the Nano and Micro Borad was going very well.

[quote="in0, post:5, topic:935810"]
Many computers have an internal built-in serial port that is enumerated as COM1. If you have this port even when the Leonardo is not connected then that is not the port of your Leonardo.
[/quote]
I mussed be something internal, yes. Otherwise It should not reinstall itself. Just making clear, what configuration I have and if there could be interferring with what I try to do.

Yes, I was the Cable. The first cable must have been damage after the first upload.
Working perfecly fine again.

Would be great have the Arduino with the uptodate USB C.

That is interesting. There are a couple of common reset-related issues when using an "Arduino as ISP" programmer:

  • Making a RST-RST pin connection between the boards instead of 10-RST
  • The need to disable auto reset on the programmer board by adding a 10 uF capacitor between reset and ground.

However, my notes indicate that those result in different error messages.

I'm very glad to hear that. Thanks for taking the time to post an update.

They did put one on the new Uno Mini: