Excellent AVR-Eclipse setup HOWTO

The Arduino environment and associated hardware is nice and very straightforward for quick-and-dirty prototyping and development, but it’s sometimes overkill. Some projects just don’t need a full Atmega328. Atmel manufactures a wide variety of 8-bit MCUs with different features to meet simpler design requirements; the ATTiny family fills the lower end of this product line with 8-, 14-, 20-, and 28-pin variants and a variety of features and memory capacities. My favorite devices in the ATTiny family are the 8-pin ATTiny85 and the 20-pin ATTiny2313, which are available for well under $1 each in quantities of 10. While it is indeed possible to develop code for ATTiny with the Arduino IDE (thanks to the folks at the MIT Media labs High-Low Tech research group), I often prefer to code directly in C. Direct manipulation of the Tiny allows for much tighter code without the bloat and performance implications introduced by the Arduino’s hardware abstractions. This often allows me to fit more complex functionality into the Tiny than is possible with Arduino + Tiny.

My initial foray into ATTiny development was through Atmel’s AVR Studio. While AVR Studio is a very nice, very capable IDE, it suffers from one major flaw from my perspective: it’s Windows-only. I’m no stranger to the environment – I held both MCSD and MCSE certifications in the 90s and developed commercial applications for the platform for well over a decade. My professional roots, however, are in UNIX development, and I submitted myself to the penguin’s warm embrace in 2000. I managed to purge the last vestiges of Windows from my house (and my family’s houses) in 2006 and frankly I don’t miss it one bit. My primary development machines are Apple Macs (at home and at work), but I primarily use them as shiny UNIX boxes. But I digress…

Most of my experiments with the ATTiny have been decidedly old-school: coded in emacs, built with avr-gcc, and flashed with avrdude. Not bad, really; avr-gdb is available for those odd occasions where a debugger is necessary. I found myself missing some of the niceties available in a modern IDE, however, which led me to search around for alternatives. Several options are available on the commercial front; I played with several and was quite impressed by Rowley Crossworks. It’s an interesting business model – they provide a common IDE that supports several microcontrollers (AVR, MSP430, ARM, MaxQ), but you need to license each controller family separately. This would be an easy value proposition for a professional shop, but the pricing is higher than I can justify for my hobby ($150 each for a personal, non-commercial license, $300 for education, and $1500 for commercial.) Sorry guys, above my pain threshold.

While browsing the other day I stumbled across a forum post discussing the AVR-Eclipse plugin and decided to check it out. One of the more interesting links that I discovered was this excellent tutorial by the folks at Interactive Matter. I think I’ll be using this environment for my next couple of ATTiny experiments, as it’s pretty nice. Stay tuned for additional feedback.


Dangerous Prototypes Big Box of Parts

I discovered The Great Internet Migratory Box of Electronics Junk (TGIMBOEJ for short, ranking right up there as Worst Acronym Ever) recently. It’s a neat idea; sign up on The TGIMBOEJ site and a box chock full ‘o stuff magically appears on your doorstep some time later. Relying on the principal that one person’s junk is another person’s treasure, these magical boxes of cruft get passed along, telephone game style, from one geek to the next. Participants in the game take items out of the box that they find useful and put some of their spare parts in as a replacement. In theory, this process should be very effective with electronics components, as deep discounts can often be attained when purchasing items in larger quantities. Most electronics hobbyests that I’ve met have acquired small hoards of components, whether due to the psychology of THE DISCOUNT (one part for $5, or 20 for $10? Sold!) or through some failed project notion which never fully materialized.

Alas, though I have volunteered my name for one of these mystical TGIMBOEJ packages, I have not yet been blessed by the arrival of the magical component fairy. However, one day while eating a particularly terrible bowl of soup for lunch and reading through my RSS feeds, I discovered that a user on the Dangerous Prototypes forum was starting a new box of parts in the TGIMBOEJ tradition. I threw my hat in the ring and became recipient #3 of this box! Continue reading