Go Down

Topic: [SOLVED]Problems using USBasp with Arduino IDE 1.6.10/Arduino AVR Boards 1.6.12 (Read 15306 times) previous topic - next topic

pert

UPDATE: The problem was solved by installing a different Windows driver. See http://forum.arduino.cc/index.php?topic=415210.msg2862244#msg2862244 for instructions.


ORIGINAL POST:
I was excited to see that Arduino IDE 1.6.10/Arduino AVR Boards 1.6.12 includes avrdude 6.3 but it seems to be causing me some problems with USBasp.

The first problem I ran into is:
Code: [Select]
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
avrdude: Warning: cannot query manufacturer for device: No such file or directory
avrdude: Warning: cannot query product for device: No such file or directory
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

avrdude done.  Thank you.

Error while burning bootloader.

Apparently avrdude 6.3 checks that the usbvendor and usbproduct product entries in avrdude.conf are correct. Looking at avrdude.conf I saw this issue has already been addressed by the usbasp-clone entry. So I added the following entry to programmers.txt:
Code: [Select]
usbaspclone.name=USBasp Clone
usbaspclone.communication=usb
usbaspclone.protocol=usbasp-clone
usbaspclone.program.protocol=usbasp-clone
usbaspclone.program.tool=avrdude
usbaspclone.program.extra_params=-Pusb

With Tools > Programmer > USBasp Clone selected when I try to do do Tools > Burn Bootloader I get:
Code: [Select]
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-clone -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-clone
         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     : 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
Error while burning bootloader.
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.

I have similar results with Sketch > Upload using programmer.

I've tried a variety of USBasp firmwares: fischl v1.04, Baite, USBASP V2.0 LC Technology, PeterVH's v1.05, and bperrybap/PeterVH's v1.06-alpha-2016-05-18 connected to Uno and Mega, all with the same result.

With Arduino IDE 1.6.9 and previous everything works fine. The only difference in the commands between 1.6.9 and 1.6.10 is the avrdude path, avrdude.conf path, and programmer type:
Code: [Select]

C:\Program Files (x86)\arduino-1.6.9\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\arduino-1.6.9\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
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-clone -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m

pert

If anyone tries using USBasp with Arduino AVR Boards 1.6.12(included with Arduino IDE 1.6.10) could you pretty please let me know what your results are.

Two other users have reported it working fine for them.

I'm wondering if this might be a Windows specific issue(I'm using Windows 7).

I've tried with 6 different USBasps, 3 different models, on two computers with multiple IDE versions, all with the same results: Using Arduino AVR Boards 1.6.12 I can't get USBasp to work, any other version works fine with any IDE version(including 1.6.10).

USBtinyISP and Arduino as ISP work fine for me after making this change to boards.txt: https://github.com/arduino/Arduino/pull/5182

If this turns out to be a bug I'll submit a pull request or issue report to the Arduino developers. If necessary I'll publish a workaround and make it installable via Boards Manager if possible. I have other types of programmers I can use and other IDE versions installed, the main reason I want to find a solution is because this issue could potentially affect the future changes that may need to be made to multiple 3rd party boards packages I'm involved with to ensure toolchain compatibility for all users.

DrAzzy

#2
Jul 30, 2016, 08:23 am Last Edit: Jul 30, 2016, 08:31 am by DrAzzy
Hmm. Works out of the box for me on my Windows 10 desktop using PeterVH/bperrypap 5/18 f/w. I did not have to change programmers.txt, the command line that worked was

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\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

or

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cusbasp -Pusb -Uflash:w:F:\Temp\build2b84f704c1ebd37becbea1083fad8f6c.tmp/sketch_jul30a.ino.hex:i


(well, it didn't work, exactly, it reads the efuse as 0xfd - but it can write the other fuses, and and it can write the flash and all)

 I don't know how you managed to get the first errors. On my system, the default USBAsp entry "just works"

What's the version info for the USBAsp driver you're using?

I'm using

Not going to risk breaking anything on my laptop, as that's my development system...
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

OldSteve

#3
Jul 30, 2016, 08:41 am Last Edit: Jul 30, 2016, 08:44 am by OldSteve
If anyone tries using USBasp with Arduino AVR Boards 1.6.12(included with Arduino IDE 1.6.10) could you pretty please let me know what your results are.
I mentioned it in another thread earlier, Problems with Arduino AVR Boards v 1.6.12, but it looks like this is an equally appropriate place.

I tried Arduino AVR Boards V1.6.12 in IDE V1.6.9 running under Windows 10 Pro 64-bit earlier, and both of my USBASPs failed to work, with the same error as pert:-
Code: [Select]
avrdude: Warning: cannot query manufacturer for device: No such file or directory
avrdude: Warning: cannot query product for device: No such file or directory
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'


One of the USBASPs has the original firmware, the other has firmware updated several months ago. Neither has the latest firmware mentioned by DrAzzy, (PeterVH/bperrypap 5/18 f/w).

I didn't play around any further, and rolled back to Arduino AVR Boards V1.6.11. Both USBASPs are working fine again now.

When I feel inspired, I might load the PeterVH/bperrypap 5/18 firmware onto one and try again.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

pert

#4
Jul 30, 2016, 12:21 pm Last Edit: Jul 31, 2016, 05:35 am by pert Reason: Make Zadig link clickable
(well, it didn't work, exactly, it reads the efuse as 0xfd - but it can write the other fuses, and and it can write the flash and all)
That issue is fixed by changing the extended_fuses values in boards.txt as described here: https://github.com/arduino/Arduino/pull/5182
The problem is that AVRDUDE 6.3 handles unused bits differently and the Arduino developers didn't update boards.txt to account for this.

What's the version info for the USBAsp driver you're using?
I was using libusb-win32 v1.2.4.0. Using libusb-win32 turns out to be the problem. Once I updated the driver to libusbK v3.0.7.0 the problem was solved, thanks DrAzzy! Here's how I did it:

  • Plug in USBasp
  • Download Zadig from http://zadig.akeo.ie
  • Start zadig
  • Options > List all devices
  • Select USBasp from the drop down menu
  • Select libusbK(v3.0.7.0) driver
  • Click Install

For some reason the first time I did this it broke avrdude 6.3. Trying to use any programmer now resulted in an immediate "Error burning bootloader". I uninstalled and then reinstalled libusbK and the second time the problem was solved. I can now use the stock USBasp programmers entry, no need for the usbasp-clone modification.
When I feel inspired, I might load the PeterVH/bperrypap 5/18 firmware onto one and try again.
I tested with every firmware version I listed in my original post and they all worked so that shouldn't be necessary to fix the issue.

I also tried using zadig to install libusb-win32 v1.2.6.0, the latest libusb-win32 driver version. This also didn't work but the error output is different:
Code: [Select]
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.

That's with the standard USBasp programmer selected, my modified USBasp Clone entry also didn't work.

This issue seems to only occur with Arduino's avrdude 6.3.0-arduino2. I tried replacing it with the stock AVRDUDE 6.3 from http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3-mingw32.zip and it works fine with libusb-win32 v1.2.6.0, v1.2.4.0, and v1.2.2.0 as well as libusbK v3.0.7.0. I have reported this incompatibility issue to the Arduino developers: https://github.com/arduino/avrdude-build-script/issues/1 in hopes they can make Arduino's AVRDUDE version compatible with the libusb-win32 driver also.

Thanks so much for responding both of you. I'm sure we'll see others have this same problem but at least now we know the solution.

OldSteve

This issue seems to only occur with Arduino's avrdude 6.3.0-arduino2.
The issue that I described happened with avrdude 6.0.1. That was using the "libusb-win32 v1.2.6.0" driver installed using Zadig, (installed to get USBASP working with Win10), along with IDE V1.6.9 and "AVR Arduino Boards" V1.6.12. I haven't tried changing to the "libusbK" driver.

Anyway, it's not an issue for me right now, since I'm using IDE V1.6.9 and "AVR Arduino Boards" V1.6.11, and everything is currently working.

It won't become a problem for me until I update to IDE V1.6.10, which I can't do until DrAzzy's ATtiny cores are compatible with it and "Boards Manager".

Thanks for putting in the time and effort to help sort out these issues as they appear, pert. Much appreciated. (Worth another Karma point, too. :) )

Edit: N.B. I'm keeping a link to this thread for reference when I do update to IDE V1.6.10.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

pert

The issue that I described happened with avrdude 6.0.1. That was using the "libusb-win32 v1.2.6.0" driver installed using Zadig, (installed to get USBASP working with Win10), along with IDE V1.6.9 and "AVR Arduino Boards" V1.6.12.
Are you sure? Arduino AVR Boards 1.6.12 does install avrdude 6.3.0-arduino2 and cause it to be used by the Arduino IDE but if you have 3rd party AVR boards installed via Boards Manager it may cause avrdude 6.0.1 to be used instead. Things are a real mess right now.

It won't become a problem for me until I update to IDE V1.6.10, which I can't do until DrAzzy's ATtiny cores are compatible with it and "Boards Manager".
We did make a fix to the ATTinyCore Boards Manager file so it shouldn't cause any problems with Arduino IDE 1.6.10 now. As to whether the new versions of avr-gcc and avrdude will cause issues with that core, I'm not sure.

OldSteve

Are you sure? Arduino AVR Boards 1.6.12 does install avrdude 6.3.0-arduino2 and cause it to be used by the Arduino IDE
Oh, I didn't realise that installing "Arduino AVR Boards" V1.6.12 also installed avrdude 6.3.0-arduino2. And since IDE V1.6.9 has avrdude V6.01 by default, I just assumed that it was being used. My bad. (When I typed the reply earlier, I'd already rolled back to "Arduino AVR Boards" 1.6.11, so couldn't double-check.)

Quote
We did make a fix to the ATTinyCore Boards Manager file so it shouldn't cause any problems with Arduino IDE 1.6.10 now. As to whether the new versions of avr-gcc and avrdude will cause issues with that core, I'm not sure.
I wasn't aware of this. I had a look at the 'spencekonde' ATtiny cores Github webpage yesterday, and there was still a warning to use IDE V1.6.9 and not IDE V1.6.10.

Anyway, since IDE V1.6.10 still seems to have bugs, particularly the one relating to not being able to upload if the *.ino file is directly clicked on to open the IDE, I'll stick with IDE V1.6.9 for now.

It would be lovely to see some of these things sorted out over the next one or two releases. Fingers crossed. :)
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

hape

  • Plug in USBasp
  • Download Zadig from http://zadig.akeo.ie
  • Start zadig
  • Options > List all devices
  • Select USBasp from the drop down menu
  • Select libusbK(v3.0.7.0) driver
  • Click Install


hi
i ran in the problem with Arduino 1.8.1 . Nothing coulf get the AVRDude to burn the bootloader. The attempt to replace the driver as written above waits for 15 Minutes and than aborts. After that the program says driver installation failed. Is there another way of fixing this problem?
the exact error is:

avrdude: Warning: cannot query manufacturer for device: Input/output error
avrdude: Warning: cannot query product for device: Input/output error
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
Fehler beim Brennen des Bootloaders.

its on Win 10 Pro 1607

any ideas are very welcome

thx

hape



luketanti

hi
i ran in the problem with Arduino 1.8.1 . Nothing coulf get the AVRDude to burn the bootloader. The attempt to replace the driver as written above waits for 15 Minutes and than aborts. After that the program says driver installation failed. Is there another way of fixing this problem?
the exact error is:

avrdude: Warning: cannot query manufacturer for device: Input/output error
avrdude: Warning: cannot query product for device: Input/output error
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
Fehler beim Brennen des Bootloaders.

its on Win 10 Pro 1607

any ideas are very welcome

thx

hape



Open device manager and check that the USBasp is installed successfully.
Then make sure to use libusbK not libusb-win32.
I had this problem because I was using the win32 driver. Replaced and it worked!

selevo

my driver on USBasp:  libusbK USB Devices
but....
Code: [Select]
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
What problem ?

tested on ARDUINO
1.6.9(12) 1.8.2(1)

I think that programmers ARDUINO IDE curves hands or head
Because the problem can not be solved for a long time

pert

I get that error if the USBasp isn't plugged in. Do you see it appear in Device Manager when you plug it in? Using the libusbK driver should definitely fix the problem I described in this thread.

selevo


selevo

solved_2 !

i Download original  (6.3 version) avrdude
http://download.savannah.gnu.org/releases/avrdude/
and  replace avrdude  in arduino (and replace avrdude.conf)
and now  good

In arduino patched 6.3 version of avrdude
I do not understand why they did this, most likely for some financial purpose.


pert

Definitely not for some financial purpose. The Arduino IDE is free, AVRDUDE is free, where's the money? There are a number of reasons Arduino has their own build of AVRDUDE. The ones I'm familiar with are:
  • ArduinoISP programmer entry in avrdude.conf
  • Extended delays in the ATtiny85 entry to make programming work reliably
  • Backwards compatible handling of unused fuse bits. AVRDUDE recently decided to change the handling of these bits to be consistent with Atmel's standard, which previous versions did not do. So that's good but the problem is this meant that fuse values that used to work no longer verified, making it extremely difficult for 3rd party AVR hardware package authors to offer compatibility with a reasonable range of Arduino AVR Boards package versions

I know there are some other differences you can see at https://github.com/arduino/avrdude-build-script but I'm not sure what the purpose is.

Unfortunately they managed to break compatibility with libusb-win32 in the most recent builds, a problem the official AVRDUDE release does not have.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy