<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[SoliForum - 3D Printing Community — Sync Error Uploading firmware with Arduino 1.0.5/avrdude 5.11]]></title>
	<link rel="self" href="https://www.soliforum.com/feed/atom/topic/5344/" />
	<updated>2014-01-28T21:24:15Z</updated>
	<generator>PunBB</generator>
	<id>https://www.soliforum.com/topic/5344/sync-error-uploading-firmware-with-arduino-105avrdude-511/</id>
		<entry>
			<title type="html"><![CDATA[Sync Error Uploading firmware with Arduino 1.0.5/avrdude 5.11]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/48035/#p48035" />
			<content type="html"><![CDATA[<p>I wanted to share my experiences in hopes in will help someone else.</p><p> - UPLOAD ERRORS<br />I recently purchased a LCD/SD board off ebay, along with a new ATMEGA1284p chip (with bootloader), but have been banging my head against the wall trying to install the new SolidoodleMarlin firmware on the new chip.&nbsp; Using the Arduino 1.0.5 package, it compiles okay, but I was always getting this dreaded error when trying to upload it, no matter what I tried to reset the board, re-plugging in cables, or changing ports:</p><p>&nbsp; &nbsp; &nbsp;avrdude: stk500_getsync(): not in sync: resp=0x00</p><p> - RUNNING AVRDUDE 5.11 MANUALLY<br />To bypass the Arduino IDE, I tried running avrdude (5.11) manually from within its installation folder (hardware\tools\avr\bin) with various commands, but I could never get the chip to respond at any baud rate, protocol, or combination of settings:</p><p>&nbsp; &nbsp; &nbsp;&gt; avrdude -C ..\etc\avrdude.conf -c stk500 -p m1284p -P com4 -b38400</p><p>&nbsp; &nbsp; &nbsp;avrdude: stk500v2_ReceiveMessage(): timeout</p><p>At first I thought that the new chip didn&#039;t have a bootloader, but I got similar results when I put the older 644 chip back in.&nbsp; I thought that was odd since I updated my firmware about 8 months ago with no problem.&nbsp; </p><p>RUNNING AVRDUDE 5.4 MANUALLY<br />Finally, I realized that I had used an older version of arduino (Arduino-0022) and I found that it came with a different version of avrdude (5.4).&nbsp; Sure enough, with the older avrdude, and the same command above (at 38400 baud and stk500 protocol), I could now get both chips to respond:</p><p>&nbsp; &nbsp; &nbsp;&gt; avrdude -C ..\etc\avrdude.conf -c stk500 -p m1284p -P com4 -b38400</p><p>&nbsp; &nbsp; &nbsp;avrdude: AVR device initialized and ready to accept instructions<br />&nbsp; &nbsp; &nbsp;....</p><p>I did have to copy a few lines from the 5.11 version of the avrdude.conf file so that the older version knew about the newer chip and didn&#039;t complain about a mismatched signature, but that&#039;s it.</p><p>However I couldn&#039;t open the newer SolidoodleMarlin project with the older version of Arduino, nor did I have any success overwriting the newer version of avrdude and its config file with the older ones (the Arduino IDE now returned different errors on upload).</p><p>FINDING COMPILED HEX FILE<br />However, I could still install the binary manually using avrdude.&nbsp; I found the compiled hex file on my older PC running XP in the folder:&nbsp; c:\documents and settings\&lt;username&gt;\local settings\Temp\build&lt;nnnnnnnnnnn&gt;.tmp</p><p>INSTALLING MANUALLY<br />To install the file, I used the following line:</p><p>avrdude -C ..\etc\avrdude.conf -c stk500 -p m1284p -P com4 -b38400 -U flash:w:SolidoodleMarlin.cpp.hex</p><p>and it uploaded successfully!</p><p>I welcome somebody can help explain what went wrong or how to fix it more elegantly.&nbsp; I had to find my way with a lot of digging and trial an error.&nbsp; If that&#039;s not possible, hopefully this info will be helpful.</p>]]></content>
			<author>
				<name><![CDATA[tealvince]]></name>
				<uri>https://www.soliforum.com/user/676/</uri>
			</author>
			<updated>2014-01-28T21:24:15Z</updated>
			<id>https://www.soliforum.com/post/48035/#p48035</id>
		</entry>
</feed>
