Avrdude fail with atmega2560 standalone over programmer USBasp

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:

The solution is to use the libusbK driver instead:

  1. 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/
  2. Plug your USBasp into your computer.
  3. Start "Zadig".
  4. From the dropdown menu in the "Zadig" window, select "USBasp".
    :exclamation: If it doesn't show up on the menu, then select Options > List all devices from the Zadig menus and check again.
  5. Click the up or down arrows next to the Driver selection box on the right side until you see "libusbK".
  6. Click the "Replace Driver" button.
  7. Wait for the driver replacement process to finish.
  8. Close the "Zadig" window.

Now try using the USBasp programmer once more. Hopefully the error will no longer occur.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.