RESOLVED!! Arduino Leonardo not uploading

Hi I am building a USB MIDI controller and have nearly finished my project when suddenly my Leonardo has stopped uploading. This is very frustrating considering the time I took for this project and changing the board would be a real problem.

The board is recognised and still transmitting on serial port when I connect it, with potentiometers and button working fine (only my trellis LEDs turn on in a weird way when I turn the controller on) but I can no longer upload any sketch.

I have pasted the error message:

Archiving built core (caching) in: E:\Users\WEB\AppData\Local\Temp\arduino_cache_79589\core\core_arduino_avr_leonardo_de2016e466ce3eaab2c66f7991bbc0b4.a
Sketch uses 5088 bytes (17%) of program storage space. Maximum is 28672 bytes.
Global variables use 457 bytes (17%) of dynamic memory, leaving 2103 bytes for local variables. Maximum is 2560 bytes.
Forcing reset using 1200bps open/close on port COM10
PORTS {COM1, COM10, } / {COM1, COM10, } => {}
PORTS {COM1, COM10, } / {COM1, COM10, } => {}
PORTS {COM1, COM10, } / {COM1, } => {}
PORTS {COM1, } / {COM1, COM10, } => {COM10, }
Found upload port: COM10
E:\Users\WEB\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/bin/avrdude -CE:\Users\WEB\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM10 -b57600 -D -Uflash:w:E:\Users\WEB\AppData\Local\Temp\arduino_build_470710/MIDIUSB_read.ino.hex:i 

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

         System wide configuration file is "E:\Users\WEB\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

         Using Port                    : COM10
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         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 : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding

avrdude: butterfly_recv(): programmer is not responding

I have disconnected all midi programs that could interfere with with the Leonardo (midi Ox, bome midi translator, previously the have interfered at times when uploading), rebooted computer and reset the board but nothing works... I have connected an arduino UNO just to test another board and that works fine but communication with the leonardo is gone....!!

Could it be the bootloader? (I don't know a lot about it)
I have also noticed that on my windows port list the device is seen as "Teensy" (I used a Teensy for a previous project).

I wander whether this may also be the result of following the direction in this website: (MIDI device with a name of your choice) to change the device name. However, after changing the name it had been working OK for days, until today...

Another possible reason could be that I corrupted the bootloader. My code involved writhing char arrays in progmen...

Any advice ?

:o :o

I have now managed to upload the bootloader on the Leonardo but still get the same message when trying to upload a sketch

UPDATE: RESOLVED!

thanks to this thread: SOLVED: unable to programm Arduino Leonardo after loading unstable programm - Installation & Troubleshooting - Arduino Forum

i initially made a mistake (selected Arduino ISP instead of Arduino as ISP...
then I followed the instruction on the above post (changing the Programmes.txt file), which initially did not work for some reason, I tried again and it worked.

the reason my bootloader was corrupted is the same as explained in the above thread, memory was over 75 % but I ignored the warning message....

I hope this will be useful to others.

1 Like