LUFA Library  120219
LUFA vs the Atmel 8-bit USB AVR Stack

Atmel offers an official 8-bit USB AVR stack, which may be incorporated into user projects and products. As LUFA and the Atmel stack aims to give roughly the same functionality to a design, it is often asked what advantages LUFA carries over the official Atmel USB stack for the 8-bit USB AVRs. Below are just some of the advantages to choosing LUFA over the official Atmel stack.

  • Licensing: LUFA is released under a very permissive MIT license (see Source Code License), while the Atmel stack carries several restrictions as to how and where it can be used. LUFA's licensing should be suitable for both Commercial and Non-Commercial entities alike.
  • Demos and Projects: Unlike the Atmel stack, LUFA comes with many different Device and Host mode Demos and Projects ready to run out of the box. Atmel favors separate downloads for each of their (small set) of USB AVR demos, which requires more time and offers less to the end-user. LUFA also contains several open source Bootloaders, which can be modified as the user wishes to suit his or her application, instead of being forced to use Atmel's single prebuilt (closed-source) DFU bootloader.
  • Central Library Code: LUFA is designed to allow the central library core code to be shared amongst several projects, so long as the compiled object files are cleaned between different projects. This is in direct contrast to the Atmel library, which is strongly coupled to the project it is integrated with. Using LUFA allows for only one copy of the library core to be needed for all applications, and makes updating the library used in all projects a trivial copy-and-paste process.
  • Clean API: One of the main design goals of LUFA is to make the API easy to use. While LUFA is a fluid project which has undergone many API improvements, the API is arguably much nicer to use and easier to understand than the equivalent Atmel stack code. LUFA's API is also more complete than the Atmel stack, and contains many features to speed up application development.
  • Full Hardware Support: LUFA supports the full range of Atmel's USB AVR microcontrollers (see Device and Hardware Support), with porting between chips being as simple as a single compile switch in many cases. Atmel's stack requires different libraries to be used based on the USB AVR microcontroller series, complicating the process of moving between USB AVR models. In addition, LUFA contains drivers for all the hardware contained on Atmel's USB AVR based boards, so you can get started quickly and easily.
  • Better Library Support: As many people are now using LUFA, there is a community being built around it. You can get answers to your LUFA related questions quickly by either emailing the library author (subject to author's schedule) or by posting to the official LUFA support mailing list.
  • More Compact Code: LUFA is written from the ground up to compile optimally, using clean code and good design. Two demos giving the same functionality - the LUFA Low Level API Mouse Demo vs. the Atmel AVR270 HID Mouse application note shows LUFA to be the clear size winner *.

* LUFA Low Level Mouse Demo: 3510 bytes, Atmel AVR270 Mouse Application Note: 4222 bytes, using an identical build environment.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines