Atmel Studio 6.1

Hey all.
Hope you enjoyed the last post. This post deals with LUFA, the lightweight USB framework for AVRs, which is a...framework...for building USB devices using USB-capable AVR chips.
I first came across LUFA a year or two ago when researching doing just that. Back then, I used AVR Studio 4.x, and getting LUFA to compile was no mean task. I have no idea how I managed. Anyone who's had to use LUFA in the past will testify. Its a great project in itself..compiling and using it seems to have a bit of a learning curve though.
However, Atmel have since updated their IDE and its bigger and meaner than ever before..enter Atmel Studio!
The most current version is Atmel Studio 6.1, which is built on a VS2010 shell. Essentially this means it looks alot like VS2010, and has quite a number of similiarities to it. One of them is the use of extensions.
Dean Camera, the creator of LUFA, recently released an extension for AS6.1 which greatly simplifies using LUFA. You still need to know a thing or two about USB and LUFA itself though, but at least compiling it is no longer an issue.
First off, you'll need to download and install AS6.1; its a hefty download of about 800MB last I checked. Once that's done, all you need do is open the Tools menu and open the Extension Manager. LUFA should appear right before you, else you can search for it.
You'll need a myAtmel account though, to actually download it. Luckily AS6.1 gives you a dialog where you can login or signup and its a quick and painless process. After that, you should be able to download it with no trouble.
For users in Nigeria and other "unsupported" regions, you'll probably want to change your myAtmel profile location to someplace supported..like the US..at least until Nigeria becomes a "supported" region.
However, even when that's done, you may encounter issues with Atmel Studio 6.1 ignoring the download request. In that case, you can simply head on over to the online Atmel gallery and manually download the extension. Once that's done, you can then double-click to install.
If everything went well there should be a 'LUFA Help' menu option in the Help menu. Quite useful stuff. To get started, use the "Getting Started" option and you'll be on your way in no time, if the page wasn't already open when you restarted AS6.1. The example projects provided are both very useful markers and extremely useful starting points for any future code. For more in-depth help, you could try opening Atmel Studio 6.1's help and seeing if there are any LUFA nodes to the left. If there aren't, then select "Reinstall Local Help" from the LUFA Help submenu in the Help menu.
Now that that's said and done, tinker with LUFA a bit. If you've ever wanted to build a USB keyboard, mouse or something similar, this is for you. The only caveat is you'll need a USB-capable AVR chip. I recommend the Teensy 2.0 board. It has an Atmega32u4 chip with 32k of Flash and 2k of SRAM (which is ample for most projects), is cheap, and is extremely easy to breadboard and program to boot. And, its still an AVR chip and can be used for non-USB code as well.
I have no doubt you'll like what you see, and in addition there's alot of info to be found on the internet about its internals and how to use it. If need be, head over to the LUFA site mentioned above and download the zipped release. That always contains example code for both ClassDriver (higher level programming stuff) and LowLevel (lower level programming stuff..manually flushing endpoints and other frightening stuff) usages of this excellent library, though you still get that from the example projects.
+1000 to Dean Camera.
Have fun.

Comments

Popular posts from this blog

Bitbanging SPI on the Raspberry Pi (via spi-gpio)

Getting Started with Logic Analyzers and Pulseview

Enabling SPI1 on the Raspberry Pi B+/Zero/2/3