problem with leonardo burn bootloader (AVRISP mkII)

everything works fine with my "AVRISP mkII"-Programmer (and my original Leonardo),
I can upload sketches with "Upload Using Programmer" - that works reliable and fast ...
(using 1.6.5-r5)

But when I wanted to burn the arduino bootloader with the "Burn Bootloader"-command,
then the error occurs:

"Error while burning bootloader.
"avrdude: usbdev_open(): did not find any USB device "usb"

if the normal "Upload Using Programmer"-command works fine,
what is different (or wrong) with the "Burn Bootloader"-command then.

does the "Burn Bootloader" command use other tools (AVRdude) or other settings/parameters
than the "Upload Using Programmer" -command ?

what can I do ?

Sounds like 1.6.x issue.
I'm still using 1.0.6 and Mkii works fine for both there.

Sounds like 1.6.x issue.
I’m still using 1.0.6 and Mkii works fine for both there.

It works before with another 1.6.x version …

now I tried to flash the bootloader hex-file with ATMEL Studio 7.0
then the error message occurs:

“Unable to parse objectfile arduino-1.6.5-r5\hardware\arduino\avr\bootloaders\caterina\Caterina-Leonardo.hex:”
“Unsupported format.”
“ModuleName: TCF”
“command: Modules:add failed.”
normally this specific error only occurs, if the checksum within the hex-file is not correct (!)

I downloaded again
unpacked it again but I got the same issue…

(if I burn another hex-file (e.g. “blink-example.cpp.hex” generated by the arduino-IDE) onto the leonardo, it works with Atmel-Studio 7 as well, no problems)

any Idea someone ?

[edit] I see, that ATMEL Studio 7 updated the firmware of the “AVRISP mkII”-Programmer to 1.18

[edit2] in the attachment you can see the whole log of avrdude when trying to burn the bootloader via the arduino IDE

as you can see there the first call of

“avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200104408”
is successfully finding the AVRISP mkII and doing all the erasing and fuse setting
then there is a second call of “usbdev_open()” which obviously fails (?):

"avrdude: usbdev_open(): did not find any USB device “usb” "

why is that ?

avrdude_logfile.txt (6.06 KB)

Sounds like 1.6.x issue.

seems that you are right,

because if I just execute the following 2 command lines in a shell window (cmd / win7)
everything works just fine so avrdude (executed "stand alone") does its 2 jobs well -> the IDE is the problem (!)

G:\Arduino\arduino-1.6.5-r5\hardware\tools\avr/bin/avrdude -CG:\Arduino\arduino-1.6.5-r5\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m

# wait a little bit ... then:

G:\Arduino\arduino-1.6.5-r5\hardware\tools\avr/bin/avrdude -CG:\Arduino\arduino-1.6.5-r5\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cstk500v2 -Pusb -Uflash:w:G:\Arduino\arduino-1.6.5-r5\hardware\arduino\avr/bootloaders/caterina/Caterina-Leonardo.hex:i -Ulock:w:0x2F:m

[edit] the clue is the waiting between the two steps of programming,
if you don't wait, the programming will fail (!)
on my machine (win7 64) 3 seconds were not enough 5 seconds are OK

I use the following batch-file

"G:\Arduino\arduino-1.6.5-r5\hardware\tools\avr\bin\avrdude" -CG:\Arduino\arduino-1.6.5-r5\hardware\tools\avr\etc\avrdude.conf -v -patmega32u4 -cstk500v2 -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m
timeout /t 5 /nobreak
"G:\Arduino\arduino-1.6.5-r5\hardware\tools\avr\bin\avrdude" -CG:\Arduino\arduino-1.6.5-r5\hardware\tools\avr\etc\avrdude.conf -v -patmega32u4 -cstk500v2 -Pusb -Uflash:w:G:\Arduino\arduino-1.6.5-r5\hardware\arduino\avr\bootloaders\caterina\Caterina-Leonardo.hex:i -Ulock:w:0x2F:m