I am a hobbyist with prior experience in embedded PIC programming, and just getting into the AVR world. I've read a fair bit about USB, but admittedly my understanding of the complexities of the protocol is weak. The LUFA project looks amazing, and I am trying to improve my understanding of its functionality.
To that end, I acquired an Adafru.it Atmega32u4 breakout board. I am running AVR Studio 6.1 on a Win7 64-bit Home premium laptop. I've installed the latest GCC stuff, WinAVR, AVRDude, and of course the LUFA library.
I am able to create a new AVR Studio example project using the LUFA "Virtual Serial CDC Device Demo (Class Driver APIs) - AVR8 Architecture" selection from the ASF/Extensions. This compiles successfully unchanged, as well as if I change the device to "ATMega32u4" in project properties. However, if I try to set LUFA board support to "Ada_u4," (in the IDE - right hand pane) I get this compiler error:
Error 1 Board/Joystick.h: No such file or directory C:\Users\SLF\Documents\Atmel Studio\6.1\CLASS_CDC1_Test2\CLASS_CDC1_Test2\src\LUFA\LUFA\Drivers\Board\Joystick.h 125 31 CLASS_CDC1_Test2
So I haven't even made it to blinking an LED and I've messed up :-p
Assuming I can be helped past this issue <G>, I am in need of some direction regarding getting going. Specifically:
1. Please help me wrap my head around organizing a project using this breakout board or a future user-defined board. Specifically, I'm not sure where to start regarding which header files to modify, how to map ports (e.g. how do I "tell" LUFA the function of each microcontroller port or pin or where do I find the button/led/adc/other maps if the board is pre-defined)?
2. I presume I would place my user functions in VirtualSerial.c and prototypes in VirtualSerial.h, then call them from main() or an appropriate interrupt handler?
Thanks for any help you can provide this newbie!
Scott