Welcome! Log In Create A New Profile

Advanced

avrdude error

Posted by dnaman 
avrdude error
August 30, 2011 05:54PM
I have my Prusa basically working now with Gen6 electronics but need to update the configuration for the X and Y directions and Z-axis scale.

I wanted to back up the existing firmware first. The Gen6 wiki says:



You can back up the factory installed firmware using avrdude just in case. If you are on Windows substitute the
right COM port for the -P option:

avrdude -c avrisp -b 38400 -i 10 -p m644p -P /dev/ttyUSB0 -F -U flash:r:factory_gen6.hex:i



I'm using Windows with the Prusa on COM4 so my line looks like

avrdude -c avrisp -b 38400 -i 10 -p m644p -P COM4 -F -U flash:r:factory_gen6.hex:i



I'm running this from a batch file in the same directory as the avrdude executable.

However, when run, there is a delay then I get the following error message:


avrdude: stk500_getsync(): not in sync: resp=0x00

I have no idea what this means or where to start looking. Repsnapper happily runs it on COM4 so that is correct. I tried using 19200 baud (which Repsnapper is using) but it didn't help.

I don't want to proceed to reprogram without resolving this issue (I suspect I'd get a similar error anyway). Can anyone point me in the right direction. I'm not particularly adept at programming but I can follow instructions.
Re: avrdude error
August 30, 2011 10:23PM
This thread on mendel-parts should help...
[www.mendel-parts.com]
Re: avrdude error
September 01, 2011 01:27PM
That thread appears to be directed to helping a user run avrdude on a Mac to backup the firmware but doesn't deal with the situation if it produces an error.

As far as that method is generically applicable to the PC, its what I did - except mine was run from a command prompt which I assume is the Mac's "terminal mode" and the port used was COM4. Avrdude appears to run, but gives the error that I mentioned
Re: avrdude error
September 01, 2011 02:01PM
Sorry, not sure about what port to set it to, look at the Port part of this page may help: [www.ladyada.net]
But the baud rate can only be 19200, if that's what you connect at with repsnapper, not 38400.
Make sure you don't have any other program already connected to the board eg repsnapper or Arduino software. Also, try resetting the board before running the command.
Re: avrdude error
September 01, 2011 04:37PM
Hi,

I had the same problem, however I am using the arduino interface rather than command line. Also I'm not trying to backup my settings ( which I never bothered with btw ).

The error means the timing of the upload is out of sync with the board expect timing, or something to that effect.

The problem is to do with the auto sync not so much the fact I was doing something wrong or setting were incorrect. The solution that works for me 'everytime' is to keep the reset button depressed until I see the upload sequence start on the application and simply release it. Since you are using the command line I don't see how you would notice this que to start the board? Can you use the Arduino programe to upload, if so try the method above.

hth

Regards

J90
Re: avrdude error
September 01, 2011 08:19PM
Joe90 Wrote:
-------------------------------------------------------

> Can you
> use the Arduino programe to upload, if so try the
> method above.


Well, I wasn't trying to upload at that point of course - simply to backup the existing firmware and following the method recommended in the wiki. Possibly you can do this through the Arduino program but I wouldn't know how. And since the Arduino installation includes avrdude I suspect that it would just shell out to that anyway.

However .... I tried again today: went through the same turn-on procedure with the same batch file and this time it worked OK. This was using a baud rate of 38400 (as recommended in the wiki). Yet RepSnapper connects by default at 19,200 and I believe that's what the host_baud is set to in the firmware.
Re: avrdude error
September 04, 2011 08:01PM
Following backing up the existing firmware, I modified the configuration file and uploaded it, by the book, absolutely without incident. Everything now homes in the right direction and travels the correct distance.

I note the configuration has provision for a second set of limit switches at the opposite end of travel from the home position. How would these be wired to the gen6 electronics?
Re: avrdude error
September 05, 2011 06:41AM
I don't think they can be, as there are no header connections on the gen6 for max limit switches (true at least for the version from mendel-parts). The gen6 firmware is a version of the 5D firmware I think, and still has code from the generic firmware; there's probably code in there for heated beds, which gen6 also doesn't support.
Re: avrdude error
September 08, 2011 08:42PM
I guess so. I had thought - at least for microswitches which I'm using - it might be possible to simply connect them in series or parallel which would probably be OK if it were being used as a simple two pole switch. I wasn't sure if something similar was possible when using all three contacts as in the Gen6.
Sorry, only registered users may post in this forum.

Click here to login