Bootloader Problems with the Arduino Robot

Hello,

I started working with the Arduino Robot a few days ago. I did a few tutorials and everything was fine. I could perfectly upload my programs using the Arduino IDE. Today, I was working on a project and already did uploading, testing, adjusting, uploading again,... I pressed the Upload button and nothing happened and I got the following error message with verbose output enabled:

Der Sketch verwendet 14960 Bytes (52%) des Programmspeicherplatzes. Das Maximum sind 28672 Bytes.
Globale Variablen verwenden 1539 Bytes (60%) des dynamischen Speichers, 1021 Bytes für lokale Variablen verbleiben. Das Maximum sind 2560 Bytes.
Erzwinge Reset durch öffnen/schließen mit 1200 bps auf dem Port /dev/ttyACM1
Beim Hochladen des Sketches ist ein Fehler aufgetreten
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
PORTS {/dev/ttyACM1, } / {/dev/ttyACM1, } => {}
Uploading using selected port: /dev/ttyACM1
/home/lukas/Dokumente/Arduino/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/home/lukas/Dokumente/Arduino/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/ttyACM1 -b57600 -D -Uflash:w:/tmp/arduino_build_7255/Interrupts.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 06:01:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/lukas/Dokumente/Arduino/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/lukas/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM1
         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
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "�"; type = �
    Software Version = Y.�; Hardware Version = .
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader

I did check the connection, made sure, that the usb cable is not broken,... I read a lot of forum posts but couldn't find a working solution.

I am currently on Lubuntu 16.04.3 LTS.

Does anyone have an idea? Cannot be the first one :frowning:

Thanks for replies,
lukas96

My guess would be that the last code you uploaded is crashing. This will take out the native USB when it happens - leaving the computer unable to tell the arduino to restart into bootloader via USB.

As you're uploading the code, right when it finishes compiling (when it's doing that 1200 baud reset thing), press reset on the board. The goal is to time it such that avrdude is trying to talk to it within about 2 seconds of resetting it, so that your bad code doesn't have a chance to run before you upload new code.

This is the price one pays for a native USB bootloader!
On the arduino's that don't have native USB (and instead use a separate usb-serial bridge), no matter what unholy code you upload to the microcontroller, you can't put it into a state where you can't upload different code to it, as a hardware reset is performed - but this comes at the cost of not being able to act as types of USB device other than a serial port (and, in the case of the genuine Uno/Mega, having a serial adapter that is much more fragile than the rest of the board). Native USB gives you that capability - but it's a pain to upload if you write code that crashes the microcontroller (for example, by writing off the end of an array).

Another thing to try if all else fails. Double click the reset button. This should put the board in bootload mode. Next try uploading a simple blink program from the IDE.