Using uisp to talk to bootloader (linux)


I’m trying to upload to the Arduino bootloader directly using uisp on my linux dev machine; I like the Arduino board but don’t want to use the IDE. (Which I did get running on my SuSE linux box.) Kernel is 2.6.5-something. The arduino board shows up fine as /dev/ttyUSB0. I have read/write permissions on the device. I’ve got an LED and resistor stuck onto Digital 13, and see the bootloader blinking properly.

I’m setting the serial port up with

$ stty -F /dev/ttyUSB0 19200 raw clocal

If I do something crude like “ls > /dev/ttyUSB0” (ouch! :slight_smile: I can see the TX light on the Arduino board light.

I’m running uisp thusly:

$ uisp -dprog=stk500 -dserial=/dev/ttyUSB0 -dpart=atmega8

I can see the Arduino TX light blink >>briefly<<, once, then a second or two later, “Programmer not responding”.

I’m assuming that the Arduino looks like stk500 protocol on the serial port? Or am I off in outer space here?

(I’m putting together a how-to webpage for this; I’ll post to this forum when I get it working.)

I’d appreciate any hints, poking-with-stick or aiming in correct direction, or such… thanks in advance!


Yea, the board should talk stk500.

Two silly questions: you also have a “–upload foo.hex” on the uisp command line, right? And you’re resetting the board before uploading?

Does the board work with the IDE on your machine? What about on another machine?

Have you tried 9600 baud (uisp -dspeed=9600)? Some old boards came with a bootloader that communicates at that speed.

avrdude (eeagh, what's with that name?) worked fine, first time. Who knows what the problem was with uisp... another forum topic about avrdude vs. uisp turned me on to it, end of problem.

$ avrdude -c stk500 -p atmega8 -b 19200 -P /dev/ttyUSB0 -U flash:r:foo.hex:i

(Just read flash to a file to test access to the device.)

Two silly questions: you also have a "--upload foo.hex" on the uisp command line, right? And you're resetting the board before uploading?

Yup did reset, no, no file yet -- uisp should see the board, then complain no file. uisp never got a response from the Arduino.

Does the board work with the IDE on your machine?

I got the IDE to the point where it complained about gcc not in the path, then I abandoned it (not cause and effect there :-) I just don't like IDEs; I personally find them too cumbersome, and actually more complicated. They don't usually integrate into larger, existing schemes (source code control, documentation, etc) and 1, 2, 5, 10 years later -- who knows where that IDE will be, or what it will run on?

(Coincidentally I'm repairing a PIC-based project from 2000, only 6 years ago, and the environment that was OK then (EPIC programmer, DOS compiler) now is rather obsolete; who's got parallel ports? and PBP runs in dosemu... in 2010 I doubt I could run a parallel port programmer.)

vi and gcc will be there, and likely USB will be becoming as silly as parallel is now...