You can program Arduino in C language using Atmel Studio and AVRdude. The Atmel studio not configured with AVRdude by default. You have to configure it manually. For that, open ATMEL studio and go to Tool > External Tools . There you will see a form for specifying the external tool. Here you have to set up the AVRdude.exe that Arduino uses as our external tool so that ATMEL studio can use it.
Fill up the window with fields as indicated below.
Title : Arduino_Flasher
Command : C:\Program Files\Arduino\hardware\tools\avr\bin\avrdude.exe
Arguments : -C “C:\Program Files\Arduino\hardware\tools\avr\etc\avrdude.conf” -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:$(TargetDir)$(TargetName).hex:i
- Leave the Initial Directory field empty.
- Check mark the Use Output Window .
- Once done OK button.
Now, AVRdude is added to Atmel studio as an external tool. Now you have to write Arduino code in C language and save it with ‘.c’ extension. Compile and click Arduino_Flasher button when you want to flash the code to Arduino.