4. Getting Started in Linux
The Pololu USB AVR programmer can be used in Linux to program AVRs and to send and
receive bytes on the USB-to-TTL-serial adapter.
The configuration utility is written for Windows; there is no Linux version. All of the
parameters that can be set in the configuration utility are stored in persistent memory, so
Linux users only have to use Windows when they want to change those parameters, which
should not be too often.
The SLO-scope client is written for Windows, and there is no Linux version; Linux users are
unable to use the SLO-scope at this time.
If you would like to write a configuration utility or SLO-scope application for Linux, you can
[http://www.pololu.com/contact]
for information.
4.a. Linux Driver
No driver installation is necessary to use the Pololu USB AVR Programmer in Linux. The
Linux Kernel comes with a USB-to-serial driver (the cdc_acm module) that automatically
works with the programmer. (The source code for this driver is in the kernel source under
drivers/usb/class/cdc-acm.c
.)
When you plug your programmer in to a Linux computer, the CDC ACM driver should
automatically detect it and create two serial port devices. Unless you have other devices
plugged in that use the CDC ACM driver, the names of these two serial port devices should
be
/dev/ttyACM0
for the programming port and
/dev/ttyACM1
for the USB-to-TTL-serial
adapter.
If the programmer is plugged in, but you do not see these devices, please see
Troubleshooting (
) for help identifying and fixing the problem.
4.b. Programming AVRs in Linux
To program AVRs in Linux using the Pololu USB AVR Programmer, you will need to install
four software packages, which can be downloaded from their respective websites. In Ubuntu
Linux, these packages are provided in the “Universe” repository.
1.
gcc-avr:
the GNU C compiler, ported to the AVR architecture
2.
avr-libc:
a library giving access to special functions of the AVR
3.
binutils-avr:
tools for converting object code into hex files
4.
avrdude:
the software to drive the programmer
Once these packages are installed, you will be able to compile C programs for the AVR with
gcc to produce hex files. These hex files can be loaded on to your AVR using avrdude and a
programmer.
We will not go into the details of writing C programs for the AVR here, but, as an example,
we will show you how to use your Linux computer and the USB AVR Programmer to
make an LED connected to PD1 of an AVR blink. On any of the Orangutan
[http://www.pololu.com/catalog/category/8]
and
the
[http://www.pololu.com/catalog/product/975]
, this program will blink the red user LED. If
Pololu USB AVR Programmer User's Guide
© 2001–2010 Pololu Corporation
4. Getting Started in Linux
Page 21 of 36