I'm trying to go with Atmel Atudio 6. But i'm not sure how to add .h files to my project. Is that something allowed? if so, how can i add them?
2 Answers
If you want to add an existing .h file, you simply right-click your project in the "Solution Explorer"
If you don't have the Solution Explorer view open, you will find it under the menu item "View -> Solution Explorer").
In the pop-up menu, you then select "Add -> Existing Item..." (Ctrl+Alt+A)
Now you can browse to locate your .h file, select it and press "Add".
Notice the little drop down arrow on the "Add" button. You can use that to select whether you want to copy the .h file to your project, or just add a link to the existing file.
If you want to add a new file, right-click your project, and select "Add -> New Item..." (Ctrl+Shift+A) and select the "Include File" template.

- 4,747
- 2
- 32
- 34
-
Thanks, that helped. Sorry for the dumb question. I'm new to this (actually, started today). Can you point me to a **good** tutorial (from basics to advanced stuff). I'll catch up. I've already become successful with USART communication. But unlike in the case of PICs , I couldn't find any proper Atmel tutorial.. – Anubis Nov 23 '12 at 16:47
-
1I guess you could search the AVR Freaks forum for links to tutorials: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=index Perhaps take a look at this one: http://metku.net/index.html?path=articles/microcontroller-part-1/index_eng3 Atmel have also produced some short videos on YouTube with various tips & tricks on how to use Atmel Studio: http://www.youtube.com/user/AtmelCorporation – Ivar Bonsaksen Nov 23 '12 at 21:22
-
Well, avrfreaks is a good forum. But I was looking for something more like a tutorial. And the second link just talk about the basics, which I already understand. But anyway, thanks for the help. Maybe I'll learn in the hard way.. (I'm a bit experienced with PIC programming. I felt like of going for this after I got my Arduino Mega. Feel like the Arduino IDE is too childish) – Anubis Nov 24 '12 at 03:31
Often it's better to add an include directory where the compiler looks for include files (specifically those included with < > marks).
This can be done in Atmel Studio 6: Project properties -> Toolchain -> ARM/GNU C Compiler* -> Directories -> Add Item (button with green plus sign).
*will be AVR/GNU C Compiler if using an AVR board.

- 562
- 8
- 19
-
I is really helpful. My Atmel Studio 8 refused to work without this config. Thanks. – Avseiytsev Dmitriy Nov 07 '16 at 22:02