Go Down

Topic: What Avrdude arguments do I need to use the ArduinoISP programmer? (Read 2723 times) previous topic - next topic

TravelerHD

Edit: solved. The standard installation of Avrdude doesn't have arduinoisp or arduinoisporg in the avrdude.conf file. Find that file, open it in a text editor, find the programmers section, and add this:

Code: [Select]

programmer
  id    = "arduinoisp";
  desc  = "Arduino ISP Programmer";
  type  = "usbtiny";
  connection_type = usb;
  usbvid     = 0x2341;
  usbpid     = 0x0049;
;

programmer
  id    = "arduinoisporg";
  desc  = "Arduino ISP Programmer";
  type  = "usbtiny";
  connection_type = usb;
  usbvid     = 0x2A03;
  usbpid     = 0x0049;
;





This is probably a dumb question, so apologies in advance.

I have a keyboard with QMK (at90usb1286 chip), and recently I flashed a bad .hex that essentially soft-bricked the device. It will connect to the PC but keystrokes won't work, and when I try to flash a new .hex I get memory errors. I've tried many things and from the googling I've done what's left for me to do is attempting to ISP program the at90usb1286 chip to get it back up and running.

So I picked up the ArduinoISP (.org version) without doing much research. I didn't realize support for this device is basically nonexistent. I'm having an incredibly hard time figuring out how to use it with avrdude, in both Linux and Windows (I'm primarily trying to do it in Linux due to driver issues). What programmer-id do I need to use? There are a few in the avrdude docs that would make sense:

  • arduino
  • avrisp
  • avrisp2
  • avrispmkII
  • avrispv2


Many of those seem to be for Atmel programmers, which I'm not sure would be seen the same as the ArduinoISP in the system. There's also "arduino-ft232r", but that doesn't look right.

Aside from trying to figure out which programmer-id to use, I think I'm also having trouble with specifying the port. I've blindly tried a variety of the programmer-ids listed above and I'm getting one of two errors depending on what I'm using. If I use "avrisp" or "avrispw" I get this:

avrdude: ser_open(): can't set attributes for device "/dev/ttyS0": Inappropriate ioctl for device


If I use anything else I get this (I can't remember what I get if I try "arduino" though):

avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)

And in Windows my ArduinoISP programmer isn't showing up as a COM device with the drivers from the Getting Started section of this website (which are pretty broken btw; had to modify the .inf file).

Any help would be appreciated. It should be noted that I'm trying to use the ArduinoISP right out of the box without uploading any kind of sketch to it (I assume it came preloaded). I'm incredibly lost and feel like I've spent my money poorly by buying this ArduinoISP instead of something else.

pert

The easiest way to find something like this out is to:
(In the Arduino IDE) File > Preferences > Show verbose output during: > upload (check) > OK
Sketch > Upload Using Programmer - It's ok if the process fails. You don't need to have your programmer connected to the computer at all.
After the process finishes (or fails), examine the contents of the black console window at the bottom of the Arduino IDE window. There you will find the avrdude command generated by the Arduino IDE. You will probably need to scroll the window up to see it.

Since it sounds like you might not have the Arduino IDE installed, here's the command generated on my computer for uploading via ArduinoISP.org:
Code: [Select]
avrdude -CC:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino12/etc/avrdude.conf -v -patmega644p -carduinoisporg -Uflash:w:C:\Users\per\AppData\Local\Temp\arduino_build_588590/Blink.ino.hex:i


So the correct programmer ID is arduinoisporg

TravelerHD

Ah, gotcha. The standard installation of avrdude doesn't have "arduinoisp" and "arduinoisporg", so I'll just grab those from the .conf file that comes with the Arduino IDE. We'll see how that goes.

AndyPreston

I've got a home-made programmer with a USB/serial adaptor hooked up to an ATMEGA328p running the ArdunioISP sketch from Version 2:1.0.5 version of the IDE and the following works fine for me:

avrdude -P /dev/ttyUSB0 -c stk500v1 -b 19200

Of course your /dev/ttyUSB0 may vary but the -c and -b parameters should be just right.


Go Up