Can't upload sketches after Arduventure [Solved]

First of all:

  1. I did read about the similar issues, none of them appear the same
  2. I tried uploading sketch after pressing the ‘Reset’ button - it did not help.

About the issue:

So I installed the Arduventure demo and then tried to install a HelloWorld sketch and it’s failed.

Error messages:

Arduino: 1.6.12 (Mac OS X), Board: “Arduino Leonardo”

Sketch uses 9,574 bytes (33%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,242 bytes (48%) of dynamic memory, leaving 1,318 bytes for local variables. Maximum is 2,560 bytes.

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: error: programmer did not respond to command: exit bootloader

Then I tried pressing the reset butting and uploading the sketch, didn’t work.

Error messages:

Arduino: 1.6.12 (Mac OS X), Board: “Arduino Leonardo”

Sketch uses 9,574 bytes (33%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,242 bytes (48%) of dynamic memory, leaving 1,318 bytes for local variables. Maximum is 2,560 bytes.
avrdude: butterfly_recv(): programmer is not responding

avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_drain(): read error: Device not configured
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = “��”; type = �
Software Version = .; Hardware Version = �.
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
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: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: ser_close(): can’t reset attributes for device: Device not configured
the selected serial port avrdude: ser_close(): can’t reset attributes for device: Device not configured
does not exist or your board is not connected

Also it appears that it on a Mac at least it takes more than 6 seconds to upload the sketch. Any suggestions?

Thanks!

1 Like

Ok so I studied the forum a bit more and found out about the Flashlight Mode:

  1. Turn off Arduboy
  2. Press and hold UP
  3. Turn it on
  4. Flash the sketch

This helped me.

UPDATE
It appears that from now on the Flashlight Mode is the only way I can upload sketches :frowning:
Any ideas?

2 Likes

I don’t think I have a solution to your problem, but I would like to point out that I believe avrdude is no longer one of the recommended tools for working with the Arduboy. Have to tried using the official Arduino IDE to upload sketches?

(And as an aside, have you read the Arduboy Quickstart Guide?)

1 Like

I am using official Arduino IDE, see screenshot.

And I have indeed read the official guide :frowning:

It is used to work fine until I uploaded the Arduventure sketch. Now it only allows me uploading the sketch in Flashing Mode.

From reading the forum I understand that this issue could be caused by memory intensive programs. However I did re-flash it with Hello World, which is a tiny program, so the problem should go away. But apparently being memory intensive is not the only cause of the issue.

The only thing that was different about Arduventure is that it has a ‘Save’ feature. Which I reckon saves something to the flash memory. I wonder could that be the issue? There must be a way to clean the flash memory…

Update:
So I wrote a sketch that clears the EEPROM and tried uploading it and… it went through as if everything was back to normal. I didn’t have to switch to the flashing mode.
And it has been working fine since then. So my conjecture about EEPROM being the reason of the uploading issue was wrong.

It is strange, because one or two times I had to switch to the flashing mode even after Arduventure was long erased. Some artifacts left in memory maybe? I think when I tried I didn’t reset the device…

1 Like

@friendofmegaman I had exactly the same issue earlier today and was able to fix it by using the reset button trick. You have to time it perfectly. It took me a lot of tries, but it does work. Just prep a new sketch (I used ardubreakout), compile it, and get ready to press the upload button, then use a paperclip to press the reset button and hit upload right away. You may have to press upload a few times and it will likely take a few tries with the reset button but it does work.

2 Likes

So this is an issue introduced in a newer version of Arduino.

I’ll come in and edit this when I can do more testing.

Windows:
1.6.7 = confirmed working
1.6.8 = confirmed working
1.6.9 = confirmed working
1.6.10 = confirmed issue
1.6.11 = confirmed issue
1.6.12 = confirmed issue
1.6.13 = confirmed issue

You should be able to rescue the device using the reset button for sure, this puts the device into hardware bootloader mode, but only for 6 seconds so the timing is important. The easier way is to use flashlight mode by turning on the device while holding the up button.

But it is important that if you have a failure uploading with Arduino you have to close out of all instances of the program, disconnect and turn off your arduboy. Then plug in the device, turn it on while holding the up button.

You should be able to program as normal. You need to close down Arduino because after a failed upload it puts the COM port into a weird state that can’t easily be used again without restarting Arduino.

And add more mystery, the issue we are having here has happened in the past and actually Arduino made a patch that fixed it in 1.6.9

https://blog.arduino.cc/2016/05/10/ide-1-6-9-just-released-with-yun-shield-support-and-more/

It’s possible they partially implemented this before it was published?

2 Likes

So after much testing, if arduventure is compiled with version 1.6.10 or later of Arduino it will cause auto-reset to fail.

In all cases though, using flashlight mode will allow you to reprogram the unit again.

If you continue to have this problem or would like to add more information to your setup it would be helpful.

1 Like

It turns out any sketch that writes to memory location 0x800 in the ram is possible to cause this. If a sketch uses a lot of ram we will have to rely on flashlight mode to be able to switch games.

reset button trick worked for me on my production model. a little tricky to get the timing right, but it’ll work.
thanks @johnbug

1 Like