Firmware

Download Firmware The Hummingbird's firmware is the code running on the microcontroller of the Hummingbird circuit board. We are releasing the source so that:

  • People may modify the Hummingbird firmware to suit their own purposes.
  • Developers of computer-based Hummingbird applications can see the code that their applications communicate with.

The Gory Details

The Hummingbird firmware runs on an Atmel Atmega16u4, which is the 8-bit RISC microcontroller at the heart of the Hummingbird controller that interfaces with USB and controls all of the Hummingbird's peripheral features. The code was compiled using WinAVR-20100110 and is integrated with LUFA, an open-source USB firmware library developed by Dean Camera. As such, the Hummingbird firmware is subject to the same licensing restrictions as LUFA. The code attachment contains the entire LUFA library that the Hummingbird firmware uses. We decided to include it as LUFA is constantly being updated, whereas the Hummingbird firmware was compiled with a specific version of LUFA. The Hummingbird uses LUFA's 091223 release. The Hummingbird code is deeply embedded in the LUFA library; to see the Hummingbird source code, navigate to Demos->Device->ClassDriver->Hummingbird (the Finch Robot's firmware is also present in the ClassDriver directory). The source code contains comments detailing the operation of the firmware. We suggest you begin with the Hummingbird.c file, which contains the main program.

Compiling the Source

To compile the source, you will need to download avr-gcc for your OS. All-in-one packages are available for Windows (WinAVR) and Mac (CrossPack). Once you have a development environment set up, you can compile the code by navigating to the Hummingbird directory and typing "make all". If you create a new main source file, you will need to edit the TARGET argument in the makefile located in the Hummingbird directory. WinAVR and most other current distributions of avr-gcc come with an incorrect header file for the Atmega16u4 - their version is missing address definitions for the i2c or two wire interface. A corrected copy is attached to this page - you must place it in the compiler's include/avr directory. If you wish to reflash the firmware, you'll need to purchase an AVR-ISP or other Atmel programmer and connect it to the ISP header (you will also need to populate the ISP header). A clean version of the .hex file is attached to the page in case you wish to revert your Hummingbird to the default firmware.

Schematic

You may find the schematic of the Hummingbird circuit board helpful when reading or modifying the firmware. Download it here.


Files: