Request for helping users to solve the stk500v2 timeout issue

Hello,

I started a thread last week about problems with uploading to Mega 2560: https://forum.arduino.cc/index.php?topic=441297.0

I know that many people have this issue and stk500v2 is too generic to have a solution. During loading, several things are going on. Can the developers please make an option to allow the IDE to print out various checks at each stage of uploading to help us to eliminate possible causes? Thank you.

The Arduino IDE uses a separate program ("avrdude") to do sketch uploading, and this program is neither written nor maintained by the Arduino team, so it's difficult to get this level of change into the program (the "owner" doesn't seem too interested in such things. And there are MANY programmers supported that ought to get similar debugging, if it were added for Arduino.)

You do get somewhat more information if you turn on "verbose" mode for uploading.

And I've been thinking of writing a separate utility for debugging upload problems, but ... it IS complicated.

westfw: The Arduino IDE uses a separate program ("avrdude") to do sketch uploading, and this program is neither written nor maintained by the Arduino team, so it's difficult to get this level of change into the program (the "owner" doesn't seem too interested in such things. And there are MANY programmers supported that ought to get similar debugging, if it were added for Arduino.)

You do get somewhat more information if you turn on "verbose" mode for uploading.

And I've been thinking of writing a separate utility for debugging upload problems, but ... it IS complicated.

Thanks westfw. In the near future, is it possible to use other program besides the avrdude? Can the Arduino team develop a program to replace the avrdude? That way, there will be more control on what can be done.

So far, the only solution I have is to press the reset button on the board almost at the end of the uploading. Most of the time it did not work but occasionally, it worked. From the net, it looks like it depends on the timing. We have to press the reset not too soon but not too late. What causes this method to work? If a software reset could be activated at the right time in the uploading process, that might solve the issue many people are having for so long. Any tips on how to increase the chance of success?

After turning on "verbose" mode for uploading, I got:

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf" User configuration file is "/Users/bbqq/.avrduderc" User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/cu.usbmodemFA141 Using Programmer : wiring Overriding Baud Rate : 115200

I cannot find .avrduderc in the directory /Users/bbqq/ Could be a hidden file? I am using Mac OS Sierra. As for the IDE, I upgraded from 1.6.7 to 1.6.13 and then to 1.6.11 as somebody mentioned that it is more stable.

User configuration file does not exist or is not a regular file, skipping

I cannot find .avrduderc in the directory /Users/bbqq/

You're not supposed to, and that's not an error message. Just "a check at that stage of the program to show what is going on." (This is a good illustration of the downside of having more verbosity in the upload program. Unless you know what is going on, you wind up with a bunch of mysterious messages that aren't much better than "it didn't work" (and perhaps confusing, even if it did work.))

is it possible to use other program besides the avrdude? Can the Arduino team develop a program to replace the avrdude?

Possible, perhaps. It probably wouldn't be a good idea. avrdude is one of the best programs there is, at what it does, and it's fantastically flexible. (for example, using avrdude allows "upload using programmer" to work without having to write additional programs to talk to each type of programmer, and it allowed the MEGA to use a different (required) protocol than had been used on the older arduinos.) (oh - also it would have to work on at least three different operating systems.) It would be "cutting off your nose to spite your face"... for all of the people who have had difficult-to-diagnose problems, there are also a much larger number of people who have had it work fine.