jung6717 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Better avrdude managment #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Connect any usbasp/avrdoper based AVR ISP hardware
2.Upload (Please see below).

What is the expected output? What do you see instead?
Depending on the hardware (usbasp or avrdoper).Please see below.

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?
0017 / Windows Vista Home Premium 32 bits / Multiplo.Brain.M644. Please see
below.

Please provide any additional information below:

Hi, we are developing new AVR based boards to control our robots
(http://robotgroup.com.ar/noticias/20091101/adelantos-de-multiplo-v20) and
have the following issues regarding  the Arduino IDE when programming:

1. We have a generic programmable AVRbased USB module based on the usbasp
project (http://www.fischl.de/usbasp/). When we compile with the Arduino
IDE, and call the avrdude from the command line it works fine. But when we
use the "upload" button, it does not work. The error is about
verfification, but we know it's uploading bad (and tha's why verification
fails). We know the avrdude supplied with the Arduino IDe does not work
properly with the USBasp, so we replaced it with the v5.6 from the
WinAVR-20090313, and then modified the \etc\avrdude.conf file, to include
our processor (ATMega1284p). We think the environment is passing some
erroneous parammeter to the avrdude. More: We set the verbose=true in
boards.txt, but can't see much output (the dude is much more verbose than
is showed in the IDE even with verbose=true).

2. Another option we tested was to program our small USB hardware with the
AVRDoper firmware (http://www.obdev.at/products/vusb/avrdoper.html) in CDC
mode. We use it with avrdude and with the AVRStudio and it works great. But
with the IDE, it only runs the first time we plug the USB, then it fails
systematically, telling us the following error:

avrdude: stk500_2_ReceiveMessage(): timeout

3. Other point: If we use a laptop without serial ports, and without
virtual serial ports, nothing works when pressing the upload button. This
is not good, takint in account that some open source avr programmers, like
the USBasp do not use a serial port. You just call them from avrdude with a
line like this:

avrdude -c usbasp -p atmega644p -u -U flash:w:MyFile.hex

The same for the avrdoper, which uses an special "-P param":
avrdude -c stk500v2 -P avrdoper -p atmega644p -u -U flash:w:MyFile.hex

SUGGESTIONS:

0. Let the user configure some advanced mode to call avrdude (may be in
boards.txt). Something like:
MyBoard.avrdudeparams=-c usbasp -p $DEVICE -u -U flash:w:$FILE

where $DEVICE and $FILE are new IDE vars which let the user not to "wire"
those params. Another usefull variable will be $COMPORT, so if the hardware
use a commport, the user can configure it in the boards.txt, but if not, he
simply does not mention this var (like in the avrdude calling command line
above).

1. Inprove the verbose data. We really would like to see which is exactly
the command line the IDE is using to call avrdude. We think logging this to
a file, or showing with an advances verbose flag will help people working
with other hardware to use it with the excellent Arduino IDE.

2. Do not impose the need of open a serial port to the IDE, just let the
user free to do not use any serial port. This will really help to work with
laptops, netbooks, etc. with the mentioned open source hardware.

3. It would be wonderfull if you put an option to disable autodetect serial
ports at start-up. In some machines, the IDE really goes slow and unusable.
More: If you have hi port numbers for BT or virtual USBs ti may fail too.
Just let the advanced user to disable this. It may be very helpul too, to
include in the case the autodetect is disabled, a small new menu entry to
trigger the Autodetection. It coud be "Find serial ports" or the like.

Many thanks!
Regards,
Julián

Original issue reported on code.google.com by julian.d...@gmail.com on 2 Nov 2009 at 6:31

GoogleCodeExporter commented 9 years ago
Concerning #1 above: I am having the verification issue using a avr109 
programmer. I
think the issue is a -D parameter that is inserted:

line 68 in AvrdudeUploader.java:
commandDownloader.add("-D"); // don't erase

Is this necessary? Could a parameter be added to the boards.txt file so this is 
an
option?

If the problem is the avr109 programmer, I understand...

Original comment by potos...@gmail.com on 18 Apr 2010 at 1:48

GoogleCodeExporter commented 9 years ago
what about switching parameter upload.verbose from boolean to integer? so users 
can tell avrdude how verbose the output should be?

with 'upload.verbose=true' leading to 4times '-v' in AvrdudeUploader.java its 
really hard to verify errors....

less could be more 

regards  
Manfred

Original comment by manfred....@gmail.com on 6 Feb 2011 at 5:16

GoogleCodeExporter commented 9 years ago
There are too many things shoved together in this issue to be useful.  You 
should be able to define non-serial programmers in programmers.txt.  You can 
also use upload.disable_flushing to prevent flushing of the serial port from 
Java before the upload (if uploading using the bootloader - when using a 
programmer, this flushing is never done).

Original comment by dmel...@gmail.com on 21 Feb 2011 at 4:16