<p>Okay thanks to @towe for helping me I figured it out.  my Baud Rate was set to 115200 but my board is using the old bootloader so it needed to be 57600.  I Changed my boards.txt file to that but the verbose console printed:
<code>Overriding Baud Rate          : 115200</code> turns out you need to change it in the serial monitor as well (the little magnifying glass in the top corner of the IDE)
after that everything worked great thanks for all the help!</p>

CC BY-SA 4.0
2020-07-16T02:33:16.190Z
2020-07-16T02:33:16.190Z
Bodhi Teraguchi
<p>I need to set the <code>HOME_POS</code> manually since it isn't printing in the center of the bed. But whenever I try to upload it to the Melzi 2.0 board I get an <code>out of sync</code> error.</p>
<p>I am using Arduino IDE on Manjaro Linux, I was able to upload Marlin to the board on Windows 10 but I have since removed that OS.
I have the correct settings for the board: Sanguino Atmega 1280 or 1280P (16mhz)</p>
<p>Here is what I have tried to get me this far:</p>
<ul>
<li>Running Arduino IDE as root (administrator) which fixed the
<code>permission denied</code> error</li>
<li>Changing the Board and the processor settings</li>
<li>Uploading a fresh Marlin firmware with no changes</li>
<li><strong>Uploading a simple program to my Arduino UNO which worked</strong></li>
<li>Changing USB Ports (USB 3.0, USB 2.0)</li>
<li>Changing the Baud Rate from 115200 to 57600</li>
</ul>
<p>Here is the (verbose) error message</p>
<pre><code>Arduino: 1.8.12 (Linux), Board: &quot;Sanguino, ATmega1284 or ATmega1284P (16 MHz)&quot;

Sketch uses 107854 bytes (82%) of program storage space. Maximum is 130048 bytes.
Global variables use 4054 bytes (24%) of dynamic memory, leaving 12330 bytes for local variables. Maximum is 16384 bytes.
/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega1284p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/arduino_build_963029/Marlin.ino.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is &quot;/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf&quot;
         User configuration file is &quot;/root/.avrduderc&quot;
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x73
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x61
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x72
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x65
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x63
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x68
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6f

avrdude done.  Thank you.

An error occurred while uploading the sketch
</code></pre>

CC BY-SA 4.0
2020-07-14T06:14:33.950Z
have you tried installing via ISP pins?
Trish
CC BY-SA 4.0
2020-07-14T06:29:47.193Z
So it was already running Marlin (uploaded from Win10)? You could have used [`M206`](https://reprap.org/wiki/G-code#M206:_Offset_axes) to change the offsets instead of uploading a completely new firmware. On topic, this is a very common and generic error message, a troubleshooting answer can be found [here](https://arduino.stackexchange.com/a/18/52058).
0scar
CC BY-SA 4.0
2020-07-14T06:47:34.773Z
Your board might be using the old bootloader which needs a 57600 baud rate for uploading instead of the default 115200. You'd need to modify that in the respective boards.txt
towe
CC BY-SA 4.0
2020-07-15T03:02:10.507Z
@towe I tried that it did not work ( I added it to the question now to help narrow it down)
Bodhi Teraguchi
CC BY-SA 4.0
2020-07-15T06:09:34.367Z
That's odd. Enable "Show verbose output during: ... upload" in your IDEs settings please. That should give you the avrdude line the IDE uses to try to upload to the board.
towe
CC BY-SA 4.0
2020-07-15T14:45:59.400Z
I found a suggestion on the Arduino stackexchange that you remove any shields or anything connecting digital pins 0 and 1. The error you're getting is a connection error and could mean any of a thousand things. Can you do as @towe suggested and enable verbose output?
Nach0z
CC BY-SA 4.0
2020-07-16T01:00:21.353Z
@towe there you go :)
Bodhi Teraguchi
CC BY-SA 4.0
2020-07-16T02:34:41.967Z
@towe i needed to change it in the serial monitor as well thanks!
Bodhi Teraguchi
<marlin><firmware><arduino><linux><melzi>
Unable to upload Marlin 2.0 to Melzi 2.0 board
Bodhi Teraguchi
# Unable to upload Marlin 2.0 to Melzi 2.0 board

(Asked by: username_0 on 2020-07-14)

I need to set the HOME_POS manually since it isn't printing in the center of the bed. But whenever I try to upload it to the Melzi 2.0 board I get an out of sync error.
I am using Arduino IDE on Manjaro Linux, I was able to upload Marlin to the board on Windows 10 but I have since removed that OS.
I have the correct settings for the board: Sanguino Atmega 1280 or 1280P (16mhz)
Here is what I have tried to get me this far:

Running Arduino IDE as root (administrator) which fixed the
permission denied error
Changing the Board and the processor settings
Uploading a fresh Marlin firmware with no changes
Uploading a simple program to my Arduino UNO which worked
Changing USB Ports (USB 3.0, USB 2.0)
Changing the Baud Rate from 115200 to 57600

Here is the (verbose) error message
Arduino: 1.8.12 (Linux), Board: "Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

Sketch uses 107854 bytes (82%) of program storage space. Maximum is 130048 bytes.
Global variables use 4054 bytes (24%) of dynamic memory, leaving 12330 bytes for local variables. Maximum is 16384 bytes.
/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega1284p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/arduino_build_963029/Marlin.ino.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/root/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x73
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x61
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x72
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x65
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x63
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x68
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6f

avrdude done.  Thank you.

An error occurred while uploading the sketch

**Tags:** marlin, firmware, arduino, linux, melzi
> **Comments:**
> **username_1**: have you tried installing via ISP pins?  
> **username_2**: So it was already running Marlin (uploaded from Win10)? You could have used [`M206`](https://reprap.org/wiki/G-code#M206:_Offset_axes) to change the offsets instead of uploading a completely new firmware. On topic, this is a very common and generic error message, a troubleshooting answer can be found [here](https://arduino.stackexchange.com/a/18/52058).  
> **username_3**: Your board might be using the old bootloader which needs a 57600 baud rate for uploading instead of the default 115200. You'd need to modify that in the respective boards.txt  
> **username_0**: @towe I tried that it did not work ( I added it to the question now to help narrow it down)  
> **username_3**: That's odd. Enable "Show verbose output during: ... upload" in your IDEs settings please. That should give you the avrdude line the IDE uses to try to upload to the board.  
> **username_4**: I found a suggestion on the Arduino stackexchange that you remove any shields or anything connecting digital pins 0 and 1. The error you're getting is a connection error and could mean any of a thousand things. Can you do as @towe suggested and enable verbose output?  
> **username_0**: @towe there you go :)  
> **username_0**: @towe i needed to change it in the serial monitor as well thanks!  

---

## 1 answers

### Answer by username_0 on 2020-07-16. Score: 2 | Accepted answer

Okay thanks to @towe for helping me I figured it out. my Baud Rate was set to 115200 but my board is using the old bootloader so it needed to be 57600. I Changed my boards.txt file to that but the verbose console printed:
`Overriding Baud Rate : 115200` turns out you need to change it in the serial monitor as well (the little magnifying glass in the top corner of the IDE)
after that everything worked great thanks for all the help!


---

