Right now I am using the standard Arduino IDE 1.0.1.
Yet I find both the IDE itself flunky and myself editing the code in other editors only to have to copy paste it inside the IDE and upload it there to my Arduino.
I really dislike this workflow.
So I am wondering: Is there a different way to deploy an Arduino project at best via commandline? Basically I am looking for a way to run something like arduino deploy /path/to/project /dev/ttyUSB0 from bash.
You need a program called avrdude to upload the binary onto your target, and modify the parameters according to your setup and target:
mcu=atmega8
f_cpu=16000000
format=ihex
rate=19200
port=/dev/ttyusb0
programmer=stk500
target_file=test.hex
avrdude -F -p $mcu -P $port -c $programmer -b $rate -U flash:w:$target_file
If you're on a Debian or an Ubuntu machine, you should be able to do this to install avrdude:
sudo apt-get install avrdude 
Otherwise you should be able to grab the sources from here and build it yourself.
Also there is a comprehensive Makefile that you could use to build and upload to your Arduino which again uses the similar avrdude commands to upload to the target. After changing the parameters in the Makefile, run make upload to upload the hex file to the target.
NOTE: You need to have gcc-avr and avr-libc packages installed to build the binaries (which from the question looks like you're already doing).
Following are two options which you can try
Arduino 1.5.x only
If you are using Arduino 1.5.x then you can use the arduino executable can accept commandline parameters.
Note that Arduino 1.5.x is still in beta, so you may face some issues.
Arduino 1.0.x
If you are using Arduino 1.0.x then you can use my makefile for Arduino which can be used to compile and upload Arduino (or plain AVR C) programs to Arduino from the commandline.
Following are some of the important features of this makefile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With