Pages: [1]   Go Down
Author Topic: Eclipse/AVR: stk500 programmer is not responding  (Read 5311 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello

I'm having the fairly common problem with Eclipse and the AVR plug-in where uploading to the board is only sometimes successful. It often fails with

stk500_recv(): programmer is not responding

I've Googled extensively and found no consistent solution. It's not my board or cable as I have no problem uploading with the Arduino IDE.

Sometimes it'll work if I press the reset button just after the first few packets are sent. Not ideal obviously!

The most pertinent post I found referred to the Duemilanove documentation

"Automatic (Software) Reset - This setup has other implications. When the Duemilanove is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Duemilanove. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data."

I am indeed using OSX an a Duemilanove.

It continues by saying

"The Duemilanove contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for deta"

I don't have a 110 ohm resistor to hand but a 100 ohm failed to help. Also I don't quite understand the implications of cutting the trace. Will it solve my problem or does it just mean I have to press reset to upload at all and does it mean it'll effect using the Arduino IDE?

Any thoughts anybody? Such a shame to have sorted Eclipse to program my Arduino (which was painful as it is) and not be able to upload any code!

Please help!

Thanks
Jim
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok

This is indeed an operating system issue.

I installed Windows XP under Parallels on my MacBook and set up Eclipse/AVR plugin/WinAVR and ...

... works like a charm! No need to fiddle around with the reset button or other voodoo.

Presumably this relates to this warning

"Automatic (Software) Reset - This setup has other implications. When the Duemilanove is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Duemilanove. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened."

I guess this is what is killing the communication between OSX Eclipse/AVR and the Arduino

Using Parallels/XP is Ok but I'd still rather the convenience of running under OSX. Anybody know how to stop this issue of automatic reset under OSX/Linux as above?

(Cutting the reset trace didn't help under OSX and *did* make the Arduino inaccessible from the normal IDE)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the same issue under Linux.  One thing I have found with a Chinese knock off board I have, it doesn't always require hitting the reset button to get the Eclipse AVR download to work.  The Arduino Duemilanove always needs it, and more times than not it requires a couple of attempts on the download.

Any Eclipse gurus out there have an idea on how this could be resolved?  
« Last Edit: November 29, 2010, 01:38:53 pm by afisboy » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6744
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't get it.  Eclipse and the Arduino IDE should both be using AVRdude in the same way, and it should work equally reliably from either one.

Set upload.verbose in your arduino to see exactly what it does and make sure that Eclipse is set up to provide similar switches to avrdude...
Logged

on the long way north
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably the same as Im seeing: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1290807759

Code:
$ cat /etc/avrdude.conf|grep arduino
#                  dragon_hvsp | dragon_pdi | arduino; # programmer type
  id    = "arduino";
  type  = arduino;
cat arduino-0021/hardware/tools/avrdude.conf|grep arduino returns nothing.

What I think happens for me:
/usr/bin/avrdude and /etc/avrdude.conf is used for uploading,
while the settings is read from arduino-0021/hardware/arduino/boards.txt

my boards.txt:
Code:
atmega328.name=Arduino Duemilanove or Nano w/ ATmega328

atmega328.upload.protocol=stk500

Code:
$ avrdude -v

avrdude: Version 5.10, compiled on Jun 27 2010 at 00:21:42
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/noctrl/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

Code:
$ arduino-0018/hardware/tools/avrdude -v

avrdude: Version 5.4-arduino, compiled on Oct 22 2007 at 13:15:12
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "/usr/local/etc/avrdude.conf"
avrdude: can't open config file "/usr/local/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "/usr/local/etc/avrdude.conf"

I have not investigated more than that, but avrdude (system installed vs arduino provided) versions are not the same AND more configuration files is pulled in from several locations

Edit: arduino-0021 and arduino-0018 have exactly the same avrdude version, even have the same compile time ..
« Last Edit: November 30, 2010, 01:46:10 pm by noctrl » Logged

on the long way north
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Issue, and explanation: http://code.google.com/p/arduino/issues/detail?id=106
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The above comments clued me into checking the Avrdude command line default for Eclipse.  Wouldn't you know it, the default one isn't "Arduino".  So I tried it, and blamo, the downloads are working without a hitch.   Thanks for the input.
Logged

Pages: [1]   Go Up
Jump to: