LUFA 090401 Released, ARM Arrives

As usual, I’ve gotten impatient and released the next stable version of my LUFA library early. As always, you can grab the latest official releases from the project page, or grab the latest revision straight from the SVN if that’s more your style.

The changelog is as follows:

  • Fixed MagStripe project configuration descriptor containing an unused (blank) endpoint descriptor
  • Incorporated makefile changes by Denver Gingerich to retain compatibility with stock (non-WinAVR) AVR-GCC installations
  • Fixed makefile EEPROM programming targets programming FLASH data in addition to EEPROM data
  • LUFA devices now enumerate correctly with LUFA hosts
  • Fixed Configuration Descriptor search routine freezing when a comparitor returned a failure
  • Removed HID report item serial dump in the MouseHostWithParser and KeyboardHostWithParser – useful only for debugging, and slowed down the enumeration of HID devices too much
  • Increased the number of bits per track which can be read in the MagStripe project to 8192 when compiled for the AT90USBXXX6/7
  • Fixed KeyboardMouse demo discarding the wIndex value in the REQ_GetReport request
  • USBtoSerial demo now discards all Rx data when not connected to a USB host, rather than buffering characters for transmission next time the device is attached to a host.
  • Added new F_CLOCK compile time constant to the library and makefiles, to give the raw input clock (used to feed the PLL before any clock prescaling is performed) frequency, so that the PLL prescale mask can be determined
  • Changed stream wait timeout counter to be 16-bit, so that very long timeout periods can be set for correct communications with badly designed hosts or devices which greatly exceed the USB specification limits
  • Mass Storage Host demo now uses a USB_STREAM_TIMEOUT_MS of two seconds to maintain compatibility with poorly designed devices
  • Function attribute ATTR_ALWAYSINLINE renamed to ATTR_ALWAYS_INLINE to match other function attribute macro naming conventions
  • Added ATTR_ALWAYS_INLINE attribute to several key inlined library components, to ensure they are inlined in all circumstances
  • Removed SetSystemClockPrescaler() macro, the clock_prescale_set() avr-libc macro has been corrected in recent avr-libc versions
  • Fixed incorrect/missing control status stage transfers on demos, bootloaders and applications (thanks to Nate Lawson)
  • The NO_CLEARSET_FEATURE_REQUEST compile time token has been renamed to FEATURELESS_CONTROL_ONLY_DEVICE, and its function expanded to also remove parts of the Get Status chapter 9 request to further reduce code usage
  • Makefile updated to include output giving the currently selected BOARD parameter value
  • Board Dataflash driver now allows for dataflash ICs which use different shifts for setting the current page/byte address (thanks to Kenneth Clubb)
  • Added DataflashManager_WriteBlocks_RAM() and DataflashManager_ReadBlocks_RAM() functions to the MassStorage demo, to allow for easy interfacing with a FAT library for dataflash file level access
  • Corrected CDC class bootloader to fix a few bugs, changed address counter to store x2 addresses for convenience
  • Fixed typos in the SPI driver SPI_SPEED_FCPU_DIV_64 and SPI_SPEED_FCPU_DIV_128 masks (thanks to Markus Zocholl)
  • Keyboard and Mouse device demos (normal, data interrupt and fully interrupt driven) combined into unified keyboard and mouse demos
  • Keyboard and Mouse host demos (normal and data interrupt driven) combined into unified keyboard and mouse demos
  • Removed AVRISP_Programmer project due to code quality concerns
  • Fixed CDC demo not sending an empty packet after each transfer to prevent the host from buffering incomming data
  • Fixed documentation typos and preprocessor checks relating to misspellings of the USE_RAM_DESCRIPTORS token (thanks to Ian Gregg)
  • Fixed USBTask.h not conditionally including HostChapter9.h only when USB_CAN_BE_HOST is defined (thanks to Ian Gregg)
  • Fixed incorrect ADC driver init register manipulation (thanks to Tobias)
  • Added new GenericHID device demo application

Which all points to this release being a good evolution for the project. I’m particularly excited by the fix made early in this revision which made LUFA hosts compatible with LUFA devices, so that LUFA devices can now control one another effectively. Happy coding everyone, and be sure to give feedback!

This week a number of packages arrived for me. A week or two ago I got my Acer Aspire One back from repairs, which gave me a huge wave of relief after it spent over a month lost in Acer-limbo. Good customer service, but lousy repair times. Unless the thing manages to melt into a pile of sludge in the meantime, I’ll probably live with any faults that might develop until near the end of the 12 month warranty, so I get maximum use of the machine while still covered.

From one of the generous donations made to me by a LUFA-appreciator, I purchased an extended 9-cell battery for my AAO. I was actually aiming for the slightly slimmer 6-cell, but when I found that the price difference was only a few dollars I decided to splurge. The end result is a 7.5 hour practical runtime (Wifi on and in use) with the added bulk and weight not significantly detracting from the machine. If nothing else, it makes going to-and-from University much more tolerable now that I’ve loaded it up with videos to pass the time.

Also on my doorstep this week was my new ARM7 development board and JTAG from Cassainho (picture pending). It seems like a nice board, and I look forward to playing around with it. I’ve managed to get a handle on my EVK1101, after binning my cross-architecture makefile idea and just going with the AVR32Studio automated build process, as I couldn’t figure out the different switches and linker scripts required to make a correct binary. I’ve succeeded in controlling the GPIOs, so I’m confident that the porting of the main LUFA code can now commence. All I need now is to work up the motivation to do so, as it’s a daunting task.

Once I get an initial port working on the EVK1101, I’ll be merging the MultiArch branch back into the mainline (by hand, since I hadn’t worked out how to properly move and delete files using SVN – lesson learned) and progressing with an ARM port. Now, if only I wasn’t so damn lazy…


Comments: 5

Leave a reply »


Hello 🙂

Nice to know that the ARM7 + JTAG programmer and debugger did arrive.

You talked on the AVR32 IDE, for sure you are using it for the AVR32… and for the ARM7, which IDE will you use? — I recommend the Eclipse, which have support for C and C++ programming plus Make files, plus JTAG Debug using OpenOCD. Please read the tutorial “Using Open Source Tools for working with ARM” by Mr. Jim Lynch:



Preferrably, I’d rather write my C source in my own text editor, and only use the IDEs for programming the chip and simulation/debugging — this is the workflow I use for AVR8s and I would love it if I could continue with it across platforms. However, the AVR32 and all their linking complexity has taught me that it is a bad idea, so I’ll probably end up using Eclipse. AVR32Studio is actually just a modified Eclipse (which I find horribly complicated) so hopefully the knowledge I gain from one can be applied to the other.

– Dean


Hello Dean,

Thanks for your work on LUFA project, it was very usefull for me.
I would like to inform you that I tried to download (yesterday and today using 2 different computers) your last release, but after downloading, when I try to open the file using windows XP embedded zip tools, it gives me an error (like invalid zip file). If I try to open it with winrar, it extracts just one file with invalid information…

Can you send me the file by mail?

Thanks in advance.



Downloaded and extracted successfully on my Windows XP SP3 machine – are you sure it’s not just a bad download? I’ve rearchived it and sent it to your address via email.

– Dean


Hi Dan,

I have the same problem as Luis.
I also tried on 2 computers
I have XP-SP3.



Leave a Reply

(will not be published)


Vital Stats

  • 29 Years Old
  • Australian
  • Lover of embedded systems
  • Firmware engineer
  • Self-Proclaimed Geek

Latest Blog Posts