IDE 1.0.1 Problems with Leonardo, Windows XP and Windows 7 Enterprise

I have already commented on this problem, but decided to start a new post specific to IDE 1.0.1, Windows, and Leonardo.

I purchased a new Leonardo, Italain version, at the Maker's Faire last weekend.

With both Windows XP and Windows 7 Enterprise, I get the same error message when trying to run the example program, Blink and using IDE 1.0.1:

Binary sketch size: 4,858 bytes (of a 28,672 byte maxium)
Found programmer: Id = "S*q ": type = p
Software Version = V. ; Hardware Version = v.
avrdude: error: buffered memory access not supported. Maybe it
isn't
a butterfly/AVR109 but a AVR910 device?

Has anyone experienced similar problems? Has anyone been successful loading programs from Windows to the new Leonardo board using IDE 1.0.1?

Thanks - Rick

Here is the same problem after making sure I set the usb port and ran the upload in verbose mode:

My Leonardo is on COM4 - which I set in the IDE 1.0.1:

Binary sketch size: 4,858 bytes (of a 28,672 byte maximum)
Forcing reset using 1200bps open/close on port COM4
PORTS {COM1, COM3, COM4, } / {COM1, COM3, COM4, } => {}
PORTS {COM1, COM3, COM4, } / {COM1, COM3, COM4, } => {}
PORTS {COM1, COM3, COM4, } / {COM1, COM3, COM4, } => {}
PORTS {COM1, COM3, COM4, } / {COM1, COM3, COM4, } => {}
PORTS {COM1, COM3, COM4, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, COM3, COM4, } => {COM4, }
Found Leonardo upload port: COM4
C:\Downloads\arduino\arduino-1.0.1\arduino-1.0.1-windows\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\Downloads\arduino\arduino-1.0.1\arduino-1.0.1-windows\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega32u4 -cavr109 -P\.\COM4 -b57600 -D -Uflash:w:C:\DOCUME~1\Rick\LOCALS~1\Temp\build6743039881646635356.tmp\Blink.cpp.hex:i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Downloads\arduino\arduino-1.0.1\arduino-1.0.1-windows\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM4
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 10 8 0 no 1024 8 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


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: Send: . [1b]
avrdude: Send: S [53]
avrdude: Recv:

avrdude: Recv:
avrdude: Send: V [56]
avrdude: Recv:
avrdude: Send: v [76]
avrdude: Recv:
avrdude: Recv:
avrdude: Send: p [70]
avrdude: Recv:
Found programmer: Id = "¨ÿ""; type = m
Software Version = E.

I'm unable to use this incredible micro controler with the IDE 1.0.1 - where do I go from here?

Thanks - Rick

Hmm... Yep, you do seem to have the correct COM port set (as seen by the fact that the IDE restarts the board as expected).

I don't have a ready explanation but do have a few more questions:

You say you've tried it on two flavors of Windows. Was that on two different physical machines or are one or more of the OSes virtualized?

Is there a USB hub or KVM between the Leonardo and the computer or is the Leonardo plugged directly to one of the computer's own ports (the "root hub")?

If you manually reset the board does the LED "breathe" for several seconds? Once it stops breathing does it start blinking with a period of two seconds?

Do you have any shields or other electronics connected to the board?

Can you try uploading and manually resetting the board? Time it so you hit the reset button when "Compiling sketch..." in the status bar is replaced with "Uploading...".

Have you read this page: http://arduino.cc/en/Guide/ArduinoLeonardo

You say you've tried it on two flavors of Windows. Was that on two different physical machines or are one or more of the OSes virtualized?

Two different physical machines, one with USB 2.0, and one with USB 1.0.

Is there a USB hub or KVM between the Leonardo and the computer or is the Leonardo plugged directly to one of the computer's own ports (the "root hub")?

Plugged directly to the USB port.

If you manually reset the board does the LED "breathe" for several seconds? Once it stops breathing does it start blinking with a period of two seconds?

No.

Do you have any shields or other electronics connected to the board?

No

Can you try uploading and manually resetting the board? Time it so you hit the reset button when "Compiling sketch..." in the status bar is replaced with "Uploading...".

I tried this and got the same error message.

Thanks so much for taking the time to look into this. I'm excited to start using the Leonardo - feels close...

  • Rick

open_market:
If you manually reset the board does the LED "breathe" for several seconds? Once it stops breathing does it start blinking with a period of two seconds?

No.

On this part specifically, does the LED "breathe" after a manual reset?

And, fter a few seconds of breathing does it start blinking with a period of two seconds?

In normal operation those are two distinct phases. Breathing indicates that the bootloader is running. After the bootloader runs for a few seconds it starts the sketch. On a fresh board you should see blinking because they load the Blink sketch at the factory to test. Of course, if you've managed to upload any sketch it will overwrite Blink but it doesn't sound like you've ever had success?

Also, can you confirm that Device Manager shows the board enumerated and drivers loaded in both bootloader and sketch mode? Just open Device Manager, check that you have an entry for the Leonardo without any errors or warnings (sketch mode), then manually reset the board and confirm that it comes up again with no errors or warnings (bootloader mode). Eventually it should automatically reset and go back into sketch mode. If you want to confirm which you're seeing, look at the PIDs: 0x0034 is bootloader, 0x8034 is sketch.

Good news - it's working now. I will summarize in a moment what was different, but first to the questions:

To Kd7eir's question, yes, I read the Guide for Leonardo.

On this part specifically, does the LED "breathe" after a manual reset?

Yes
And, after a few seconds of breathing does it start blinking with a period of two seconds?

No

On a fresh board you should see blinking because they load the Blink sketch at the factory to test. Of course, if you've managed to upload any sketch it will overwrite Blink but it doesn't sound like you've ever had success?

No success up until now on uploading a sketch; It appears that this board did not come pre-loaded with blink?

Also, can you confirm that Device Manager shows the board enumerated and drivers loaded in both bootloader and sketch mode?

This time, which works loading the blink program, I loaded the driver twice, once when the cable was plugged in, and second time after checking the Device Manager and seeing that the driver was still no installed - Not sure what than means exactly.

Just open Device Manager, check that you have an entry for the Leonardo without any errors or warnings (sketch mode), then manually reset the board and confirm that it comes up again with no errors or warnings (bootloader mode). Eventually it should automatically reset and go back into sketch mode. If you want to confirm which you're seeing, look at the PIDs: 0x0034 is bootloader, 0x8034 is sketch.

Using the Device Manager this is what I saw as the Device Instance ID:
USB\VID_2341&PID_8036&MI_00\6&3557C49D&0&0000
This is while the Blink program is running.

Note: I did not hold the reset button during the compile phase and once the upload was complete, I did not press the reset button. It just started running the Blink program on its own.

This time, the driver was on Com6.

Not sure what this all means. Will try a more complex program next.

Thanks for all the suggestions. I think installing the driver twice made it start working.

  • Rick

My final update on this topic. I connected an adafruit rgb lcd to my leonardo, everything is working as advertised! I'm delighted. Thanks for everyone's input and providing a great development tool!

  • Rick

Very glad to hear it!

The driver issue is a strange one and the exact behavior varies across flavors of Windows. Win7 x64 seems to be much more finicky than any other version including 32-bit Win7. It shouldn't be necessary to explicitly install the driver twice since the same INF is used for both sketch and bootloader, but there you have it...

Just to confirm, for anyone having this problem in the future: you saw an entry in the Serial Port menu for your Leonardo but weren't able to upload. Upload failed with strange values for programmer ID, type, and software version. To fix it you opened Device Manager, saw that there was a driver problem when the board was in bootloader mode, and installed the driver a second time. Is that all right?

you saw an entry in the Serial Port menu for your Leonardo but weren't able to upload. Upload failed with strange values for programmer ID, type, and software version. To fix it you opened Device Manager, saw that there was a driver problem when the board was in bootloader mode, and installed the driver a second time. Is that all right?

Yes.

Now I'm trying to get the serial monitor working. I'll post more on that later once I've reviewed the relevant documents/forum notes.

I have similar problems.

At one Laptop (Lenovo T61, W7prof) all seems to be ok.
My second Laptop (T410, also W7) has problems. In device-manager all seems to be ok, but programming is only occasionally possible.
The funny thing: if i connect the leonardo at an USB-Hub, it seems to be better, but not ever...

I think there is a timing problem, eiter in bootloader or in avrdude. It seems, the time after resetting the leonardo is too short, so the changing of COM-Port will not be detected.

josto, can you send the status messages after a failed upload attempt (turn on verbose output in preferences first)? I'd have to see more to be sure, but your timing problem theory may be correct. Some hubs (and, by extension, the root hub in each computer) introduce their own delay when a USB device is trying to enumerate.

If nothing else, you should be able to manually reset the Leonardo and get a successful upload every time.

josto, can you send the status messages after a failed upload attempt (turn on verbose output in preferences first)? I'd have to see more to be sure, but your timing problem theory may be correct. Some hubs (and, by extension, the root hub in each computer) introduce their own delay when a USB device is trying to enumerate.

If nothing else, you should be able to manually reset the Leonardo and get a successful upload every time.

Binäre Sketchgröße: 8.652 Bytes (von einem Maximum von 28.672 Bytes)
Forcing reset using 1200bps open/close on port COM16
PORTS {COM6, COM12, COM16, COM20, } / {COM6, COM12, COM16, COM20, } => {}
PORTS {COM6, COM12, COM16, COM20, } / {COM6, COM12, COM16, COM20, } => {}
PORTS {COM6, COM12, COM16, COM20, } / {COM6, COM12, COM16, COM20, } => {}
PORTS {COM6, COM12, COM16, COM20, } / {COM6, COM12, COM16, COM20, } => {}
PORTS {COM6, COM12, COM16, COM20, } / {COM6, COM12, COM16, COM20, } => {}
PORTS {COM6, COM12, COM16, COM20, } / {COM6, COM12, COM20, } => {}
PORTS {COM6, COM12, COM20, } / {COM6, COM12, COM20, } => {}
avrdude: Recv:
avrdude: Send: v [76]
PORTS {COM6, COM12, COM20, } / {COM6, COM12, COM15, COM20, } => {COM15, }
Found Leonardo upload port: COM15
E:\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CE:\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega32u4 -cavr109 -P\.\COM15 -b57600 -D -Uflash:w:C:\Users\storchi\AppData\Local\Temp\build3689517327675424525.tmp\sketch_jun13a.cpp.hex:i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "E:\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM15
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 10 8 0 no 1024 8 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


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: Send: . [1b]
avrdude: Send: S [53]
avrdude: Recv: C [43]

avrdude: Recv: A [41] T [54] E [45] R [52] I [49] N [4e]
avrdude: Send: V [56]
avrdude: Recv: 1 [31] 0 [30]
avrdude: Send: v [76]
avrdude: Recv: ? [3f]
avrdude: Send: p [70]
avrdude: Recv: S [53]
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
avrdude: Send: a [61]
avrdude: Recv: Y [59]
Programmer supports auto addr increment.
avrdude: Send: b [62]
avrdude: Recv: Y [59]
avrdude: Recv: . [00]
avrdude: Recv: . [80]
Programmer supports buffered memory access with buffersize=128 bytes.
avrdude: Send: t [74]

Programmer supports the following devices:
avrdude: Recv: D [44]
Device code: 0x44
avrdude: Recv: . [00]

avrdude: Send: T [54] D [44]
avrdude: Recv: . [0d]
avrdude: devcode selected: 0x44
avrdude: Send: P [50]
avrdude: Recv: . [0d]
avrdude: AVR device initialized and ready to accept instructions

Reading | avrdude: Send: s [73]
avrdude: ser_send(): write error: sorry no info avail
avrdude: Recv:
avrdude: Recv:
avrdude: Send: p [70]
avrdude: Recv:
Found programmer: Id = "pÿ""; type = ç
Software Version = E.

Thanks for this. From your results, the bootloader is definitely starting (see the "Found programmer: Id = "CATERIN"; type = S" line) but times out before the upload (see a little later when it gets a write error then reports "Found programmer: Id = "pÿ""; type = ç"). I'm surprised that it takes the Leonardo so long (at least six seconds) to reenumerate after reset - that's much longer than typical.

How frequently do you get this upload problem on the T410 versus how often does upload work? Are you running any virtual machine or security software on the T410 that could be interfering with or slowing down the enumeration of new USB devices?