Please help with programming Arduino Duemilanove directly with avrdude (command line). I have Windows XP.
I can upload and run programs OK with the Arduino IDE. But when using command line avrdude (the variant that came with Arduino package), I can't get it to work. It detects the virtual serial port, tries to write to the board, but than the program hangs, and has to be stopped.
avrdude -F -pm328p -C<the_config_file>
-cstk500 -PCOM6 -b19200 -Uflash:w:fis.hex:i -v -v -v -v
avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
System wide configuration file is "config.conf"
Using Port : COM6
Using Programmer : stk500
Overriding Baud Rate : 19200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
^CTerminate batch job (Y/N)? y
I have to supply the config file directly (it is not on the path).
Any ideas?
Have you tried this:
Click on the upload button while pressing shift.
This will show you verbose output from the upload process, including the avrdude commandline.
Someone else had the same problem:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1262216887/2
I tried in Linux too (Slax with avrdude again from the Arduino package), but didn't work either (got the same, a timeout error message, just like in the URL above), then tried the solution that worked for him, that is
setting the DTR line with:
stty -F /dev/ttyUSB2 hupcl
ran the command succesfully but avrdude still didn't work, same error!!!
What can I do? If I compile a program with WinAVR I cannot upload it, so I'm stuck with Arduino IDE !!! It's a gread IDE, grant that, but I have to compile some pure C code. Please help!
Any idea is wellcome.
I'll try the shift thing now....
I held while pressing the upload button, but didn't show me anything more thant usual. Maybe I have to modify Arduino IDE's config file?
I guess the problem is not with the parameters i'm passing to avrdude, but rather to some other things that IDE's Java code is doing with the virtual serial port.
Things I have no control over just with avrdude command line.
Under XP, i'm getting this:
avrdude -F -pm328p -Cconfig.conf -cstk500 -PCOM6 -b19200 -Uflash:w:fis.hex:i -v -v -v -v
avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
System wide configuration file is "config.conf"
Using Port : COM6
Using Programmer : stk500
Overriding Baud Rate : 19200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: ser_open(): setting dtr
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
^CTerminate batch job (Y/N)? y
More ideas?
Solved !!!!
The problem was actually with avrdude parameters.
To see how Arduino IDE calls avrdude, in Arduino config file:
C:\Documents and Settings<user_name>\Application Data\Arduino\preferences.txt
one should put the line:
upload.verbose=true
then, calling avrdude like:
avrdude -C -v -v -v -v -pm328p -cstk500v1 -P\.\COM6 -b57600 -D -Uflash:w::i
just works!!
I guess the issue was the bitrate.
Thanks!!