Can I load a program in Arduino without the IDE ?

Question from a completely newcomer to Arduino, so please bear with me...

Is there a way (an example of code would be wonderful) to have a C++ program running on the PC downloading code into the Arduino 2009 board ?

I need to have a given program running on the Arduino and communicating via the USB (Serial) port with the host program on the PC, then when some events happen, I would like to be able to replace the program in Arduino with a new one, all done automatically by the host program on the PC.

Thanks in advance for any suggestions and/or examples


This might have some useful info.

yeah, I think you would have to hack the command line...
AVR dude can be used... this isn't something simple.
but yes, it is possible to load a program to an arduino without the ide.

I used the info posted by Franklin (on Ubuntu 8.10 x64). I got Makefile to compile code properly (apart from few "deprecated module" warning). However avrdude gives me the following error:
$avrdude -V -F -C ../../arduino-0012/hardware/tools/avrdude.conf -p atmega168 -P /dev/ttyUSB0 -c stk500v1 -b 19200 -U flash:w:applet/blink.hex
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

I googled and searched this forum for the this error, and everyone suggests a hardware issue. But I am able to run this from the ide without any issues. Any pointers?

Looks like you might have the wrong programmer selected or the wrong usb port.

I used the port value from the Arduino IDE. After I posted the above post, I just executed the same line couple of times, and it worked one time. The cmd line was exactly the same.
Is the communication less trusty? Does the IDE retries internally? Should I encapsulate the cmd line in a shell script to retry until it works?

Interesting Thread. I want to make an updater in Future. Say, an Exe-File that would only install a new "Firmware". Is this file a good starting point:

-> Google Code Archive - Long-term storage for Google Code Project Hosting.


ciao Sunny

PS: Is there any way to only fetch the compiled code and upload it on a later time?

when using makefiles, the usually safest method to get a reliable flash procedure is to press the reset button just before you hit "make upload"
does this work for you guys?