0

I use winxp inside a virtualbox with host as ubuntu. The usb programmer connected to host is routed to the guest. I use WinAVR which uses avrdude; the relevant fields in makefile are given as Atmega32 for processor, port as usb and programmer as stk200. Still it says cannot find device "usb". Please help.

10
  • Why aren't you just using avrdude from the Linux side? Commented Aug 13, 2014 at 2:42
  • Yes, I tried. Actually I could not get the type of programmer that I got from the vendor. It seems to be created by him. Its a usb to serial converter with vid/pid : 0x16C0/0x05DF. Commented Aug 13, 2014 at 3:49
  • 1
    That's sort of a "catch-all" USB ID; don't depend on it to find out what it actually is. Commented Aug 13, 2014 at 3:53
  • Ok, thanks. So am exploring the ideal -c parameters in avrdude now. If you have some pointers pls share. Commented Aug 13, 2014 at 4:14
  • Do you have a link to the programmer? Commented Aug 13, 2014 at 4:15

1 Answer 1

1

Your error results from the mistaken -P usb in your command:

avrdude -p atmega32 -P usb -c stk500v2 -U flash:w:main.hex

Do not specity "usb" as a port when using a USB-serial connected programmer or bootloader, because downstream of the operating system driver, these are not treated as USB devices but rather as serial ports.

When you use such a device, determine the com port or device node it is connected to (perhaps by seeing which one appears/disappears when you connect and disconnect it), find out the baud rate required by your programmer, and issue a command such as

COM1 or whatever on Windows

avrdude -p atmega32 -P COM1 -b115200 -c stk500v2 -U flash:w:main.hex

Linux or OSX

avrdude -p atmega32 -P /dev/whatever -b115200 -c stk500v2 -U flash:w:main.hex

The device file on Linux would be something like /dev/ttyUSB0 or /dev/ttyACM0, while on OSX it tends to be /dev/tty.usbmodem or similar.


The alternate solution you propose in comments, of using -P avrdoper leverages the fact that your specific programmer offers an alternate interface which is not a USB-serial device in the eyes of the host operating system, but instead a custom USB protocol which at least some versions of avrdude know how to talk.

Sign up to request clarification or add additional context in comments.

2 Comments

It worked with avrdude -p atmega32 -P avrdoper -c stk500 -U flash:w:main.hex; There was no mention on how to use this with our own makefile (actually I did not install their packages and go through the master makefile provided). I went to the webt site of avr-doper and found this relevant info which worked for me. Thanks all for the info.
Am giving Chris my vote for hinting that the problem could be around -P arg.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.