0

problems with the downloadable patched version of avrdude
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

problems with the downloadable patched version of avrdude

by uhclem on Sun Jul 08, 2007 6:09 pm

./configure and 'make && sudo make install' went successfully on my 32-bit gentoo box. Thankfully it chose /usr/local/bin and did not touch my existing avrdude which does work with my stk500.

The usbtiny lights up green when plugged into a usb port.

Code: Select all | TOGGLE FULL SIZE
usb 2-2: new low speed USB device using uhci_hcd and address 2
usb 2-2: configuration #1 chosen from 1 choice


However, when I try a basic avrdude command to query the programmer, I get this:

Code: Select all | TOGGLE FULL SIZE
alex@t60 ~ $ /usr/local/bin/avrdude -vvvv

avrdude: Version 5.3.1, compiled on Jul  8 2007 at 17:51:55
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "/usr/local/etc/avrdude.conf"
avrdude: libusb access not available in this configuration
avrdude: error at /usr/local/etc/avrdude.conf:371: programmer type not specified
alex@t60 ~ $ dmesg
Linux version 2.6.19-gentoo-r5 (root@t60) (gcc version 4.1.1 (Gentoo 4.1.1-r3)) #6 SMP Wed Jul 4 14:03:14 EDT 2007


All sorts of usb devices work great on this system. Also, line 371 of the config file is just the end of the 'usbtiny' section.

I am very confused. I must be missing something very obvious here.

Thanks!

uhclem
 
Posts: 107
Joined: Sun Jul 08, 2007 6:03 pm

by adafruit on Sun Jul 08, 2007 7:42 pm

argh i know what the problem is. so in the Makefile theres a -DHAVE_USB that should be set but its not. i cant quite figure out autoconf to make it add it in there maybe you know autoconf better. otherwise...
grep the source files i think its HAVE_USB or maybe its HAVEUSB
anyways
add a -DHAVE_USB or whatever to the compiler flags and a -lusb in the linker flags in the Makefile and try again. -dont- do a ./configure again
hopefully i can get this ubuntu box up and then ill be able to make a distribution for it. :-S

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Fixed in Makefile

by uhclem on Sun Jul 08, 2007 10:06 pm

Thank you very much for your reply. You were correct.

A 'cat *.c | grep -e USB turned up a bunch of 'HAVE_LIBUSB', so a quick trip to the Makefile to set CFLAGS like this:

CFLAGS = -g -O2 -DHAVE_LIBUSB


After a 'make clean', 'make' worked fine.

Now this:
/usr/local/bin/avrdude -v -c usbtiny -p 2313


Gives this:
avrdude: Version 5.3.1, compiled on Jul 8 2007 at 21:53:43
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "/usr/local/etc/avrdude.conf"
User configuration file is "/home/alex/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/parport0
Using Programmer : usbtiny
AVR Part : AT90S2313
Chip Erase delay : 20000 us
PAGEL : P00
BS2 : P00
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 :


Success! There is a complaint later about timing but I recall seeing something about that elsewhere so no big deal.

Thanks again.

uhclem
 
Posts: 107
Joined: Sun Jul 08, 2007 6:03 pm

by adafruit on Sun Jul 08, 2007 10:38 pm

sweet! can you maybe package up the binary and .conf file and send it to me: support-at-adafruit.com?
ill post it on the site

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Please be positive and constructive with your questions and comments.