I'm trying to program an ATmega644A. It works fine from Linux, but when I try the same project with the same programmer, an Olimex AVR ISP mkII, I get the following error:

avrdude -p ATmega644 -c avrispmkII -P usb -b 115200 -F -U flash:w:build/controller.hex

avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: usbdev_send(): wrote -34 out of 8 bytes, err = Result too large
avrdude: stk500_send_mk2(): failed to send command to serial port
make: *** [flash] Error 1

My AVR toolchain, including avrdude, comes from MacPorts, and I see libusb in /opt/local/lib too. I've tried as a normal user and as root (Linux requires root for USB access with libusb). What could the problem be?

  • \$\begingroup\$ I've also tried the avrdude binary from Arduino IDE with the same result. \$\endgroup\$ – Dan Ellis Jul 1 '13 at 20:51
  • 1
    \$\begingroup\$ I have an old laptop with a working mkII, so it's possible, somehow. However, it's been a while since I used it, I don't remember how I set it up, and it's still running OS 10.6, or maybe even 10.5. \$\endgroup\$ – Phil Frost Jul 1 '13 at 20:56
  • \$\begingroup\$ Can you give us the version of your avrdude binary? \$\endgroup\$ – Turbo J Jul 1 '13 at 21:55
  • \$\begingroup\$ @Turbo J It's 5.11.1 (which is the latest, I believe) -- the same as the version I'm running on Linux. \$\endgroup\$ – Dan Ellis Jul 1 '13 at 22:04
  • \$\begingroup\$ @Derecho - I just answered a similar question here. \$\endgroup\$ – Brett Hale Aug 16 '13 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.