|
Page 1 of 4 When I started using the AVR micro controllers back in 1999, I coded most of my applications in assembly. After a while GCC for AVR became available, and now, with the integration of GCC support in Atmels AVR studio, starting with GCC for the AVRs is now as easy as coding in assembly.
I will show you how to make a simple C project from scratch using AVR studio and GCC. Hopefully this will inspire some of you to move from assembly language and into the convenience of coding in C. Step 1: Installation First you must download and install the winAVR package for Windows. This is a AVR GCC distribution that enables easy integration between GCC and AVR studio. Then download and install the latest version of AVRStudio with the latest service packs. You are now ready to start. Step 2: Creating a project Start AVR studio. It will start its project wizard. Click on "New Project" 
In the next window select AVR GCC as Project Type. Name your project, and select wether or not you want AVR studio to create the initial file for you, and a folder for the project.Press Next >>. 
Select which debugging target you would like to use. Note that tools as STK500, STK600, AVRISP etc are not listed as they only provide programming support, and no debug support. If you do not have any debuggers you should select AVR Simulator or AVR simulator 2. Only devices supported by the selected debug target will be possible to select. The unsupported devices will be grayed. AVR simulator 2 is Atmels newest simulator and should be selected if your device is supported. 
Here I have selected the new ATxmega128A1 XMEGA device. Press finish, and your project files will be generated.
|