When you have enough of the "all very easy and basic" Arduino IDE you can switch to Atmel Studio and have much better IDE and editor for your Arduino projects. The following is based on this post by EngBlaze.com
Install Arduino from http://arduino.cc/
- Install e.g. in
C:\Program Files (x86)\Arduino
Start Arduino
- File / Preferences / Show verbose output during: [ ✓ ] compilation
- Ensure correct board is set in Tools / Board. I've selected Arduino Duemilanove w/ ATmega328 for the Diavolino Arduino clone
- Compile any example program, e.g. from File / Examples / 01. Basics / Blink
- In output log, look for the name of the path where the core library was generated, e.g.
C:\Users\{YOUR_USERNAME}\AppData\Local\Temp\build4980286967124578172.tmp\core.a
- Generate a new directory and copy the core.a file to this directory with the new name libcore.a, e.g.
copy C:\Users\{YOUR_USERNAME}\AppData\Local\Temp\build4980286967124578172.tmp\core.a C:\docs\Arduino\arduinocore_105\libcore.a
Start Atmel Studio
Change your project settings (Alt + F7)
The following steps should be done for Debug and Release configuration separately: Once for Debug, once for Release. Changing Debug and Release at the same time using All Configurations led to strange error message boxes when saving the configuration.
AVR/GNU C++ Compiler / Symbols
F_CPU=16000000L
ARDUINO=101
AVR/GNU C++ Compiler / Directories
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino
C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard
AVR/GNU C++ Compiler / Optimization
Optimization Level: Optimize for size (-Os)
Other optimization flags: -fdata-sections
AVR/GNU C++ Compiler / Miscellaneous
Other flags:-fno-exceptions
AVR/GNU Linker / Libraries
Libraries / Add item: core
Library search path: C:\docs\Arduino\arduinocore_105
AVR/GNU Linker / Optimization
Garbage collect unused sections [ ✓ ]
Create an external tool
In Tools / External tools... create an external tool to send a compiled program to the chip:
- Command:
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe
- Arguments:
-C"C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -patmega328p -carduino -P\\.\COM4 -b57600 -D -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i