dfu-programmer is an implementation of the Device Firmware Upgrade class
USB driver that enables firmware upgrades for various USB enabled (with the
correct bootloader) Atmel chips.  This program was created because the
Atmel "FLIP" program for flashing devices does not support flashing via USB
on Linux, and because standard DFU loaders do not work for Atmel's chips.

Check out the Atmel website for more information.  They are kind enough to
provide generally correct specifications this implementation is based on.

The project website is http://dfu-programmer.sourceforge.net and you can
use that to check for updates.

Currently Supported Chips
=========================
8051 based:
  at89c51snd1c
  at89c51snd2c
  at89c5130
  at89c5131
  at89c5132

AVR8 based:
  at90usb1287
  at90usb1286
  at90usb647
  at90usb646
  at90usb162
  at90usb82
  atmega32u6
  atmega32u4
  atmega32u2
  atmega16u4
  atmega16u2

AVR32 based:
  at32uc3a0128
  at32uc3a1128
  at32uc3a0256
  at32uc3a1256
  at32uc3a0512
  at32uc3a1512
  at32uc3a0512es
  at32uc3a1512es
  at32uc3a364
  at32uc3a364s
  at32uc3a3128
  at32uc3a3128s
  at32uc3a3256
  at32uc3a3256s

  at32uc3b064
  at32uc3b164
  at32uc3b0128
  at32uc3b1128
  at32uc3b0256
  at32uc3b1256
  at32uc3b0256es
  at32uc3b1256es
  at32uc3b0512
  at32uc3b1512

  at32uc3c064
  at32uc3c0128
  at32uc3c0256
  at32uc3c0512
  at32uc3c164
  at32uc3c1128
  at32uc3c1256
  at32uc3c1512
  at32uc3c264
  at32uc3c2128
  at32uc3c2256
  at32uc3c2512


Simple install procedure for Unix/Linux/MAC
===========================================

  % tar -xzf dfu-programmer-<version>.tar.gz    # unpack the sources
  % cd dfu-programmer                           # change to the top-level
                                                # directory

  [ If the source was checked-out from SVN, run the following command.
    You may also need to do this if your libusb is in a non-standard location,
    or if the build fails to find it for some reason. ]
  % ./bootstrap.sh                              # regenerate base config
                                                # files
  
  % ./configure                                 # regenerate configure and
                                                # run it

  [ Optionally you can specify where dfu-programmer gets installed
    using the --prefix= option to the ./configure command.  See
    % ./configure --help for more details. ]

  [ By default the build process will use libusb-1.0 if available.
    It tries to auto-discover the library, falling back to the older
    libusb if libusb-1.0 is not available. This process is not entirely
    reliable and may decide that libusb-1.0 is available when in fact
    it is not. You can select libusb using --disable-libusb_1_0. ]

    % make                                        # build dfu-programmer
  [ Become root if necessary ]
  % make install                                # install dfu-programmer

Build procedure for Windows
===========================

  Building Windows apps from source is never quite as simple ...
  Firstly you need to have MinGW and MSys with developer tools.
  Get them from http://sourceforge.net/projects/mingw/files/

  The windows build uses the libusb-win32 library, which is a
  port of libusb 0.1. For convenience these files are included
  with this distribution, located in the windows sub-directory.
  You need to copy these files to your MinGW install directory
  if they are not already there:

    windows/usb.h -> {path-to-mingw}/include/usb.h
    windows/libusb.a -> {path-to-mingw}/lib/libusb.a

  Open the MinGW shell window and change to the dfu-programmer folder.
  Note that C:\dir is accessed in MinGW using the path /c/dir

  [ If the source was checked-out from SVN, run the following command ]
  $ ./bootstrap.sh

  $ ./configure --disable-libusb_1_0

  $ make

  The executable will be built in the dfu-programmer/src folder.


Windows Driver Files
====================
Atmel's FLIP programmer also uses libusb-win32, so we use the same
library here and take advantage of Atmel's official certified driver
set. The windows driver files can be downloaded as a separate zip file
dfu-prog-usb-x.x.x.zip


Building RPM Binary Packages
============================
This section is intended to make it easier for those people that wish to
build RPMs from the source included in this package, but aren't sure how.

1) Copy dfu-programmer-<version>.tar.gz to your RPM SOURCES directory. Usually
   this is /usr/src/redhat/SOURCES/.

2) Extract or copy dfu-programmer.spec into your RPM SPECS directory. Usually
   this is /usr/src/redhat/SPECS/.

3) In your RPM SPECS directory, issue the command 'rpm -ba dfu-programmer.spec'.
   This will cause rpm to extract the dfu-programmer sources to a temporary
   directory, build them, and build rpm packages based on the information in
   the spec file. The binary rpms will be put into your RPM RPMS directory.
   Usually this is /usr/src/redhat/RPMS/<platform>/.

If you have any further questions, please refer to the RPM documentation.
