AVR programming on 11-CURRENT

Warren Block wblock at wonkity.com
Mon Jan 11 15:44:14 UTC 2016


On Mon, 11 Jan 2016, Jonathan Anderson wrote:

> Good morning,
>
> I'm attempting to program a Pololu 3pi AVR-based robot [1] using an 
> STK500v2-compatible programmer [2] on 11-CURRENT. I'm not having a lot of 
> success. I've seen a discussion from 2012 on this list [3], but that seems to 
> be a different issue: I'm using the same command lines that apparently worked 
> then with no success now.
>
> I've tried using the same avrdude command line as I would use from a Linux 
> workstation, but with /dev/ttyACM0 replaced with /dev/cuaU0:
>
> ```
> $ avrdude -p m328p -c stk500v2 -P /dev/cuaU0 -Uflash:w:assign0.hex:a
> ```

Might be worth explicitly setting the baud rate with -b.

> Using trace, I can confirm that the relevant bytes are being written to the 
> file descriptor, but then avrdude goes into a loop of `select()`'ing the 
> descriptor and reading 0 bytes:

Waiting for a response from the programmer, presumably.

> For reference, here is my dmesg output when I first plug in the programmer:
>
> ```
> ugen2.8: <Pololu Corporation> at usbus2
> umodem0: <Pololu Corporation Pololu USB AVR Programmer, class 239/2, rev 
> 2.00/1.07, addr 8> on usbus2
> umodem0: data interface 1, has no CM over data, has no break
> umodem1: <Pololu Corporation Pololu USB AVR Programmer, class 239/2, rev 
> 2.00/1.07, addr 8> on usbus2
> umodem1: data interface 3, has no CM over data, has no break
> ```

The umodem0 and umodem1 are unexpected, but the Pololu website says they 
are a feature of this programmer.

I've successfully used both a homebuilt USBASP and the Arduino-as-ISP 
programmers with various AVRS, but not the STK500v2.  And those were not 
with -CURRENT.


More information about the freebsd-questions mailing list