Copyright
©
Kanda 2013
14
There are example C Projects in Sample Code folder in Kanda AVR folder. Create a
project without creating an initial file and then add a C file as source file, just like
assembler.
Alternatively, you can open a C project file (*.aps) from C Sample code folder.
Important
The C compiler is a plug-in for AVR Studio and is not directly controlled by it, so there
are some important points to be aware of
1. C projects must have AVR device set correctly, unlike assembler files which are not
so fussy, otherwise code will not run.
2. Changing device in AVR Studio project does NOT change device in C compiler. You
need to go to
Project > Configuration Options
and change device there as well.
Also on this screen, make sure
Create Hex File
is checked.
3. Output files are stored in a sub-folder called Default
Embedded C Book
There is a PDF book on Embedded C Programming in Embedded C Book folder. It
covers the basics of writing C for AVR microcontrollers but uses IAR C compiler instead
of WinAVR and AVR Studio. A free 4KB limited version of the IAR compiler, called Kick
Start, is available for download from IAR. It is similar to WinAVR but produces smaller
code and has lots of advanced features.