My project is based around the ATMEGA32u4 microcontroller.

I followed the Arduino Pro Micro schematic to design my own board layout and build a custom PCB, soldered on the components. Then I used the Arduino IDE to successfully upload the Arduino bootloader with SPI.

Currently I can also upload programs to my `32u4 over SPI (using "in-serial programming"). Tested that with Blink.

But I cannot upload programs with the USB, like you would normally be able to do with a Pro Micro. What things should I look for to debug this?

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

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

     Using Port                    : COM12
     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
  • 1
    When you program the blink sketch using ISP, you overwrite the bootloader!!! Did you set the correct fuses? How did you program the bootloader? – Gerben May 10 at 15:53
  • Oh, I did not know that. I used an Arduino UNO as a SPI master to upload the bootloader to my 32u4. After that I uploaded a blink sketch the same way. I will try uploading the bootloader again and then the sketch via USB. – MichaelT May 10 at 16:19
  • Yes, that worked. Thanks, would have taken me a long time to work that out. I will post a reply. – MichaelT May 10 at 16:25
  • 1
    It’s one of those gotchas. Glad you got it working now. – Gerben May 10 at 16:26
up vote 1 down vote accepted

The answer, as kindly pointed out by Gerben, is that ISP program upload overwrites the bootloader.

Only upload the bootloader via ISP, then switch to USB for uploading Arduino sketches.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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