[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] avrdude and usbasp - solution!
From: |
Christoffer Jarnaker |
Subject: |
Re: [avrdude-dev] avrdude and usbasp - solution! |
Date: |
Sun, 28 Oct 2012 10:09:40 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Joerg Wunsch <j <at> uriah.heep.sax.de> writes:
>
> As René Liebscher wrote:
>
> > I think the patch should be modified not to include the usb ids in the
> > c-code.
>
> I like that idea, too. Unless there's some serious objection from
> Thomas Fischl, I'm willing to accept a patch for that.
As far as I can see it never made it to the version that is being deployed, so
here's a writeup on how to get it in order.
Hi,
First - I've found a working solution for the issue with those Chinese USBasp
clones that doesn't work.
I was afraid that after receiving my USBasp from China (http://dx.com/p/usbasp-
usb-isp-programmer-board-kit-for-at89s52-avr-silver-black-151567?item=3 for
$9.50) that I'd never get it to work as intended, as deal extreme didn't
provide
any instructions or manuals. It was also very discouraging to read on the net
from a bunch of people that I’d be better off just ordering ‘a real one’, but
as
I don’t really give up that easy I couldn’t let this go by without really
trying.
When I started digging around on how to get this to work I found out that
though
the programmer uses the right VID and PID, it doesn't report the right
manufacturer (it reports XWOpen ), which causes in turn causes avrdude.exe to
reject the device as he believes that it's not the right one.
Some smart people already figured out how to circumvent all of this by adding
functionality to avrdude and recompiling it which would make it distinguish
from
original clones ;) and Chinese clones. Last night a saw some great code on the
net from different people basically doing just this, and apparently Christian
Moll implemented these changes into the kkflashtool.
So this is what I did:
(Note, don’t use notepad when editing the files, use like wordpad or any other
real editor that handles line breaks better than notepad)
* Downloaded the latest version of KKflashtool from
http://lazyzero.de/kkflashtool#download and extracted it.
* Backup your original AVR directory, or at least the files to be changed. If
you're using the Arduino development environment then this is located as a
subdirectory of your install, at \hardware\tools\avr.
The bin directory for the Arduino environment is located as a subdirectory at
\hardware\tools\avr\bin.
* Copy avrdude.exe, libusb0.dll and libusb0_x64.dll from your KKflash
directory,
kkmulticopterflashtool_0.70beta5\lib\avrdude\windows, to your avr bin directory
and overwrite the existing files. Don’t copy avrdude.conf!!
* Open bin\avrdude.conf and find the section about USBasp and replace this:
programmer
id = "usbasp";
desc = "USBasp, http://www.fischl.de/usbasp/";
type = usbasp;
;
with this:
programmer
id = "usbasp";
desc = "USBasp, http://www.fischl.de/usbasp/";
type = usbasp;
usbvid = 0x16C0; # VOTI
usbpid = 0x05DC; # Obdev's free shared PID
usbvendor = "www.fischl.de";
usbproduct = "USBasp";
# following variants are autodetected for id "usbasp"
# original usbasp from fischl.de
# see above "usbasp"
# old usbasp from fischl.de
#usbvid = 0x03EB; # ATMEL
#usbpid = 0xC7B4; # (unoffical) USBasp
#usbvendor = "www.fischl.de";
#usbproduct = "USBasp";
# NIBObee (only if -P nibobee is given on command line)
# see below "nibobee"
;
programmer
id = "nibobee";
desc = "NIBObee";
type = usbasp;
usbvid = 0x16C0; # VOTI
usbpid = 0x092F; # NIBObee PID
usbvendor = "www.nicai-systems.com";
usbproduct = "NIBObee";
;
programmer
id = "usbasp-clone";
desc = "Any usbasp clone with correct VID/PID";
type = usbasp;
usbvid = 0x16C0; # VOTI
usbpid = 0x05DC; # Obdev's free shared PID
#usbvendor = "";
#usbproduct = "";
;
...then save the file.
* AVRdude should now be able to work with your clone as long as you speak to it
the right way, e.g. like avrdude -c USBasp-clone -p ATtiny84
To get it to work with the Arduino development environment do this:
* In your Arduino installation open \hardware\arduino\programmers.txt and under
the section usbasp add this:
usbasp-clone.name=USBasp-clone
usbasp-clone.communication=usb
usbasp-clone.protocol=usbasp-clone
* Copy your bin/avrdude.conf to the etc directory at \hardware\tools\avr\etc.
Seems like arduino.exe prefers reading it there.
You now have a new programmer available on the Tools/Programmer which you can
use, USBasp-clone.
Good luck ;)
Christoffer Jarnaker
- Re: [avrdude-dev] avrdude and usbasp - solution!,
Christoffer Jarnaker <=