f5mze
April 12, 2024, 7:33pm
1
Hi there,
I am using a chinese USBasp. I have installed the driver libusb-win32 with zadig software.
USBasp device is recognized by my windows 10.
Its connected to my circuit board with ICSP pins.
I am trying to burn the bootloader.
Here is the command launched by arduino ide :
"C:\Users\XXXXXX\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\XXXXXX\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega2560 -cusbasp-clone -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m
And the result :
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\XXXXXX\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp-clone
AVR Part : ATmega2560
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 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 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 : usbasp
Description : Any usbasp clone with correct VID/PID
avrdude: error: usbasp_transmit: No such file or directory
avrdude: auto set sck period (because given equals null)
avrdude: error: usbasp_transmit: No such file or directory
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: usbasp_transmit: No such file or directory
avrdude: error: usbasp_transmit: No such file or directory
avrdude: error: program enable: target doesn't answer. 0
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: error: usbasp_transmit: No such file or directory
avrdude done. Thank you.
Failed chip erase: uploading error: exit status 1
Whats wrong docs ?
thanks
regards
I had a similar situation with a ATTiny84. I got it working with this driver:
Device USB\VID_16C0&PID_05DC\5&37076cf8&0&4 was configured.
Driver Name: oem65.inf
Class Guid: {88bae032-5a81-49f0-bc3d-a4ff138216d6}
Driver Date: 06/02/2012
Driver Version: 6.1.7600.16385
Driver Provider: libwdi
Driver Section: USB_Install
Driver Rank: 0xFF0001
Matching Device Id: USB\VID_16C0&PID_05DC
Outranked Drivers: oem66.inf:USB\VID_16C0&PID_05DC:00FF0001
Device Updated: false
Parent Device: USB\ROOT_HUB30\4&9b30c21&0&0
I believe I used zadig software.
I concur with @JohnRob on the driver being the cause of the problem. In case it will be helpful, I'll provide instructions you can follow to fix this:
This error is caused by using the "libusb-win32 " driver with Arduino's version of AVRDUDE:
opened 10:08AM - 30 Jul 16 UTC
Using Arduino IDE 1.6.10/Arduino AVR Boards 1.6.12 with Windows 7 64 bit and 32 … bit
With libusb-win32 v1.2.6.0 driver installed for USBasp:
1. Tools > Board > Arduino/Genuino Uno
2. Tools > Programmer > USBasp
3. Tools > Burn Bootloader fails with:
```
C:\Program Files (x86)\arduino-1.6.10\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\arduino-1.6.10\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3, compiled on Jun 22 2016 at 16:05:21
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\arduino-1.6.10\hardware\tools\avr/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
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 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 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 : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
Error while burning bootloader.
avrdude: error: program enable: target doesn't answer. 0
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
```
If I replace C:\Program Files (x86)\arduino-1.6.10\hardware\tools\avr\bin\avrdude.exe with the stock AVRDUDE 6.3 from http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3-mingw32.zip it works as expected(I encounter https://github.com/arduino/Arduino/issues/5175). It also works with USBasp/libusb-win32 v1.2.4.0, I didn't try it with libusb-win32 v1.2.2.0. This indicates to me that there is a way to make AVRDUDE 6.3 compatible with USBasp/libusb-win32. Since this is a very commonly used programmer I think it would be worth trying to make the AVRDUDE included with Arduino compatible with as many drivers as possible. I've already seen two other users report similar issues on the Arduino forum.
If I change the USBasp driver to libusbK v3.0.7.0 it works as expected.
Using avrdude 6.3.0-arduino2 with USBasp/libusb-win32 v1.2.4.0, or v1.2.2.0 also doesn't work but with a different error output(I can post it if necessary).
Using avrdude 6.0.1-arduino5 with USBasp/libusb-win32 v1.2.6.0, v1.2.4.0, or v1.2.2.0 works correctly.
Using avrdude 6.3.0-arduino2 with USBtinyISP/libusb-win32 v1.2.6.0 works as expected.
EDIT: I installed the drivers using [Zadig](http://zadig.akeo.ie/).
The solution is to use the libusbK driver instead:
Download the "Zadig " driver installation tool from this website:
http://zadig.akeo.ie/
ⓘ Zadig is recommended on the official USBasp website: http://www.fischl.de/usbasp/
Plug your USBasp into your computer.
Start "Zadig ".
From the dropdown menu in the "Zadig " window, select "USBasp ".
If it doesn't show up on the menu, then select Options > List all devices from the Zadig menus and check again.
Click the up or down arrows next to the Driver selection box on the right side until you see "libusbK ".
Click the "Replace Driver " button.
Wait for the driver replacement process to finish.
Close the "Zadig " window.
Now try using the USBasp programmer once more. Hopefully the error will no longer occur.
system
Closed
October 12, 2024, 1:17am
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.