How to download code from a command prompt on Windows

I need to distribute updates for my Arduino project, but don't want for the users to have to use the clunky Arduino software for compiling & downloading code. A simple batch file for downloading updates to the hex file would be much better. When I looked at what is involved with using avrdude, figuring out the fuse settings looks problematic.

Would someone suggest a simple way to download code to an Arduino (328P) that can be easily done from a cmd line- on Windows?

thanks

you need avr dude, and you should never really have to mess with the fuse settings, just make a batch file

your biggest problem is figuring out which serial port it is using, otherwise

avrdude -p atmega328p -c arduino -P com1 -b 57600 -U flash:w:filename.hex

Osgeld: you need avr dude, and you should never really have to mess with the fuse settings, just make a batch file

your biggest problem is figuring out which serial port it is using, otherwise

avrdude -p atmega328p -c arduino -P com1 -b 57600 -U flash:w:filename.hex

Ok- thanks. I'll give that a try.

is 57600 the default download baud rate for an Arduino?

Can I use any available com port, or does Avrdude need to use the same com port that the Arduino IDE would use, if it were running? Do I need to install the Arduino IDE on the systems that will be using my Arduino project, so that the Arduino USB driver gets installed, then just use avrdude for the actual download?

is 57600 the default download baud rate for an Arduino?

yes 56k is normally the default to upload to a arduino bootloaded chip (if this has been changed I am sure someone will chime in)

Can I use any available com port, or does Avrdude need to use the same com port that the Arduino IDE would use, if it were running?

it would have to match whatever the arduino is plugged into, so yes it would have to match the IDE, communication ports are specific, as they are physical hardware things dependant on what comes before them. for example on my craptop I have a physical serial port that is addressed to com1, then there is a modem (yea its old enough to have a modem) which is com2, if I plug a usb arduino into it, it shows up as com3.. then if I disable 1 or 2 it shuffles around etc

a more complex way would be to use the windows API to look for a specific ID (if its a USB connection)

one cheap way to find out where your arduino is on a random system is to include a little talkback routine, have the computer software ask each com port a question and the one that responds is where your arduino is ... lets not get into multiplatform for now as they all are addressed differently

Do I need to install the Arduino IDE on the systems that will be using my Arduino project, so that the Arduino USB driver gets installed, then just use avrdude for the actual download?

the entire IDE system would not be needed, AVRdude will act alone as along as you pass it the correct syntax and a valid hex file produced by the IDE in a temp folder

Osgeld: the entire IDE system would not be needed, AVRdude will act alone as along as you pass it the correct syntax and a valid hex file produced by the IDE in a temp folder

This is good. I forgot the Uno and newer Arduinos will work with Windows USB drivers, as opposed to the FTDI driver.

Thanks!