Can't upload, tried Flashlight and Reset [Solved]

Hi All,

I would greatly appreciate any help, guidance, or tips with the following:

I can no longer upload any games nor examples. First successful upload was Arduboy2 Hello World. Second successful upload was the game Space Cab. Since Space Cab I can’t seem to upload anything else. During the last several days I’ve combed through many other similar help requests and haven’t found a solution.

I’ve tried the following:

  • Latest Arduino IDE
  • Updated all related Arduboy libraries
  • IDE board and port both set to Arduino Leonardo
  • OS X Arduino IDE upload example while in flashlight mode
  • OS X Arduino IDE upload example while various states of clicking reset button
  • IDE will reset Arduboy when attempting upload (lights flash and game is reset)
  • Windows 8 IDE upload example while in flashlight mode
    -Windows 8 upload game using Arduboy Uploader by @erid (which is how I got Space Cab working)

All roads lead to Space Cab booting up and its driving me a little crazy. Thank you in advance for any help.

Below is the errors copied from latest attempt uploading Arduboy 2 Hello World example. I used the verbose upload selection:

Arduino: 1.8.9 (Mac OS X), Board: "Arduino Leonardo"

Sketch uses 7000 bytes (24%) of program storage space. Maximum is 28672 bytes.
Global variables use 1216 bytes (47%) of dynamic memory, leaving 1344 bytes for local variables. Maximum is 2560 bytes.
Forcing reset using 1200bps open/close on port /dev/cu.usbmodem14201
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem14201, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem14201, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem14201, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem14201, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem14201, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem14201, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodem14201, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodem14201, } => {/dev/cu.usbmodem14201, /dev/tty.usbmodem14201, }
Found upload port: /dev/cu.usbmodem14201
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/cu.usbmodem14201 -b57600 -D -Uflash:w:/var/folders/6s/2q6f9hm122l_cdbx3q_nph9h0000gp/T/arduino_build_338578/HelloWorld.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 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/n/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem14201
         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 = �.�; 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

avrdude done.  Thank you.

the selected serial port 
 does not exist or your board is not connected

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

It says it is trying to use programmer “avr109” is that right?

Wait, you’ve used 2 different machines? IN flashlight mode?

Any chance you’ve been doing this all with the same cable? But the first upload a different cable?

Is it possible you’ve got your hands on a charge-only cable? Do you see a green light flash when you plug in the Arduboy and get a chime from the operating system indicating a USB device has been plugged in?

And, how did you upload space cab?
I see you flashed space cab from @eried upload tool. I am a little worried here, if it isn’t the USB cable that is bad… meaning, you used the same USB cable (possibly the included one) during the succesful upload and now with the same cable it’s not working… There was some history of that app having the ability to overwrite the bootloader.

But that was supposed to be fixed, and the Arduboy should also have the fuse protections set if it’s a recent production batch.

Where did you get the Arduboy from? (Probably going to say the Arduboy store :pensive:)

Thank you so much for replying bateske.

I’m not sure what the “avr109” refers to.

I haven’t technically used two different machines, I have a macbook and tried OS X, and then Windows 8 via bootcamp on the same macbook. I’ll see if I can try on a completely different machine.

The cable I used to get a successful upload (and one I’ve been using since) was the white cable included with my Arduboy. I have tried a different cable but believe its just a charge-only cable(I get no green light, nor chime). When I use the white, included cable I do see a green light flash, and I do get the chime from Windows 8 when using the white cable. OS X also recognizes Arduboy when using the white, included cable

I did purchase my Arduboy from the Arduboy store, but quite awhile ago in 2016.

If you get the usb chime, then flashlight mode SHOULD work, if it doesn’t then the reset button really should.

I don’t know, maybe there is some strange bug in osx we are dealing with here.

But if it worked before then, I suspect perhaps part of the bootloader may be corrupted?

But it kind of looks like there is some other problem with arduino, unfortunately I’m not that well veresed in how it runs on OS X.

Maybe @crait can be of some assistance, if he is around?

If you can try it on a different computer and it still doesn’t work let me know at arduboy.com/contact and I’ll try to help you from there.

That is fake news. Newer versions will refuse to write bad hex files (with bootloader or too big).

Thanks all,

I will contact via the Arduboy site contact link soon — I’m happy to wait and see if/when @crait weighs in. I did try on Windows 10 with the same results > USB connected chime, green light blinks, USB disconnected chime, Arduboy reboots, loads Space Cab, and upload fails. Below is the copied errors for more info:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino Leonardo"

Sketch uses 7000 bytes (24%) of program storage space. Maximum is 28672 bytes.
Global variables use 1216 bytes (47%) of dynamic memory, leaving 1344 bytes for local variables. Maximum is 2560 bytes.
Forcing reset using 1200bps open/close on port COM3
PORTS {COM3, } / {} => {}
PORTS {} / {COM3, } => {COM3, }
Found upload port: COM3
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM3 -b57600 -D -Uflash:w:C:\Users\ni\AppData\Local\Temp\arduino_build_882802/HelloWorld.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 "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         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
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Yeah I didn’t really think it was the cause for sure but this does sound like a corrupted bootloader, and it does sound like the tool was the last thing used…

@polymoth you’ll want to use the contact form. I’m going to probably have you send it in so I can figure out what’s wrong and repair it for you.

Thank you. I sent a message via the contact form.

Have you tried this?

Thanks Mr. Blinky, I did try the Blink example and got the same results. After reset Arduboy is detected, green light flashes, boots into Space Cab, and upload fails.

Do you have an Android phone? I usually reflash my Arduboy with my phone and so far never had any issues doing so. Even for the known to have issues.

Using Arduboy Mate app on Google store, you can plug in your Arduboy to your phone with a OTG cable, then have any .hex file in your phone of a small sketch. Turn on your Arduboy while plugged in your phone and try to upload a sketch. Chances are it will say that it failed, let the Arduboy plugged in and press the reset button on your Arduboy, yellow light should start blinking in the Arduboy and the sketch your tried to upload earlier will be uploaded. If even that method doesn’t work, I fear it’s more a hardware failure.

I used that same technique for flashing a game after Space Cab many times and it never failed me.

Thanks, I can likely borrow a friend’s android and try your suggestion.

Any success?

By the way it does seem like something else is amiss here. If you aren’t able to solve it be sure to use the contact page.

I’m tracking down something down in Arduino that might be causing this.

I’ve looked into this pretty deeply, there is really no reason this shouldnt work. As best as I can tell there is something on the users system that is causing a problem with the bootloader being enumerated when the Arduboy resets.

But, then why does it happen on multiple computers?

@polymoth I’d love it if you could send this Arduboy for me for testing…

It is strange that the port is the same after the reset. I would say it is the typical bootloader corruption (Bring your Arduboy back from the dead (burn bootloader))

I disagree. When the Arduino IDE tries to start bootloader mode and the program changes the magic key value then the program will just reset / restart and same COM port will pop up again.

:face_with_monocle: same comport for a different usb id? mmm… I am not sure

@polymoth, can you run http://www.nirsoft.net/utils/usb_log_view.html and try to upload again, posting the results here?

The program (sketch) doesn’t change the USB VIDPID on power-on or reset. it only changes when you successfully enter the bootloader mode. which it doesnt.

The most obvious: the magic key value is over written and prevents entering bootloader mode.

I think the solution lies in pressing the Arduboys reset button. When you press the small reset button Arduboy enters bootloader for about 8 seconds and then exits to run the game again.

To verify that youe arduboy can enter bootloader mode, open device manager on Windows and when you press the reset button you will see an ‘Arduino Leonardo bootloader’ COM port appear under ports. and dissapear after about 8 seconds.

When you have confirmed this. Start Arduino IDE and make sure you have the verbose option for upload enabled under preference and press the upload button. When you see the com ports logging press the reset button on Arduboy. If it still doesnt upload, try a few more times.

You can press the tiny reset button with a sim tool, toothpick, refillable pencil tip or other thin but non sharp object.

2 Likes