[Arduino Leonardo] Unable to upload the code

Dear Arduino users,

I’m really disappointed with my Arduino Leonardo. After just two weeks of using it, I started facing problems to upload new codes. It’s important to remember that Arduino Leonardo uses the ATmega32u4 microcontroller, which has built-in an USB communication.
I’ll describe the problem and the solutions I’ve tried (without success). Some of solutions were found in this Forum and were proposed by other users that faced the same problem.

CONTEXT
The code is perfectly compiled and Arduino Leonardo is automatically reset before the upload process (it’s a normal procedure). So, compiler starts transferring the code for Arduino, but without any response of microcontroller. In a normal upload process, both TX and RX leds blink. When the problem occurs, just RX blinks twice. After about a minute trying to upload the code, the following error is displayed:

Found Programmer: Id = "BÏH"; type =
Software Version = . ; Hardware Version = . 
avrdude: error: buffered memory access not supported. Maybe it isn't a butterfly/AVR109 but a AVR910 device?

ATTEMPTS

I also read the troubleshooting instruction at Arduino website (http://arduino.cc/en/guide/troubleshooting).

Thank you in advance.
Best Wishes,
Rafael

I had the same problem as you. I am assumming that you are uploading the code, i.e. via avrdude? You should not have problems

The trick is that when Leonardo is resetted, it briefly appears in "programming" mode for about 2 secs before reverting back to "normal" mode. The serial port used for "programming" mode can be different to "normal" mode.

So to upload my sketch, I need to:

  1. reset the board. (press the reset button or poll board at 1200bps using "normal" serial port)
  2. determine the "programming " port. (Keep device manager open and observe the change in 'Ports COM & LPT'. In programming mode, L13 is flashing)
  3. before it reverts back to "normal" mode, upload your program (a single flash at 'TX' signals the end of the "programming" mode)

Hope this helps.

Reference:
http://www.visualmicro.com/post/2012/06/02/Arduino-Leonardo-Upload-Differences.aspx