<h1>Step 0: extracting old settings &amp; setting up</h1>

<p>The first step is to get yourself a printing software that has a <a href="https://3dprinting.stackexchange.com/questions/10573/what-is-a-printer-console-terminal">Console or Terminal</a> like present in <a href="https://www.repetier.com/" rel="noreferrer">Repetier Host</a>, <a href="https://www.pronterface.com/" rel="noreferrer">Pronterface</a> (as part of the Printrun software suite), <a href="https://octoprint.org/" rel="noreferrer">OctoPrint</a> or any other tool (e.g. serial connection with PuTTY also works) that allows to communicate with the printer to extract the settings we already have. Once we have the software installed and the printer connected, send <a href="http://marlinfw.org/docs/gcode/M503.html" rel="noreferrer"><code>M503</code></a> and copy the old settings into a file for later use.</p>

<p>Next, we need our development surroundings. Usually, you want to use <a href="https://3dprinting.stackexchange.com/questions/6399/recalibrating-home-position/6660#6660">Arduino IDE</a> (but the <a href="https://platformio.org/" rel="noreferrer">PlatformIO</a> plugin as part of Visual Studio Code can be used for both Arduino based microprocessors as 32-bit processors), but you need to know what kind of board the control board of your printer is derived from because some boards have native IDEs that work better for them. </p>

<h1>Step 1: Choice of Firmware</h1>

<p>By some metrics of early 2020, about 80&nbsp;% of all shipped machines run Marlin in some fashion<sup>need citation</sup>. The most prolific versions of Marlin at that point are often cited to be 1.1.9 and 2.x. Since anything before 1.1.9 is very much obsolete and needs an update anyway, we will look into 1.1.9 and 2.x only. Version 2.x was developed to include 32-bit microprocessors, but is compatible with 8-bit microprocessor printer boards. As the version jump indicates though, 2.x is pretty much an entire rewrite, so do your choice and jump to the correct next step.</p>

<h2>Marlin 1.1.x</h2>

<p>Typically, you start by grabbing <a href="https://marlinfw.org/meta/download/" rel="noreferrer">a blank Marlin 1.1.9</a>. The next step is to alter the static settings of the printer to match yours in <code>Configuration.h</code> - best use the settings from what we pulled earlier via <code>M503</code> as a start. Alternatively, you can search for a configuration of your printer between known <a href="https://github.com/MarlinFirmware/Marlin/tree/1.1.x/Marlin/example_configurations" rel="noreferrer">configuration files</a>. You should at least need to adjust these:</p>

<p>For communications and filament diameter:</p>

<pre><code>#define BAUDRATE 250000

// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
</code></pre>

<p>Choose your correct temperature tables, and make sure to turn on the one for the bed if you have one!</p>

<pre><code>#define TEMP_SENSOR_0 1
[...]
#define TEMP_SENSOR_BED 0
</code></pre>

<p>Next come two blocks that set the 'this is ok' temperature area, for the hotends and bed respectively (only hotend shown here).</p>

<pre><code>// Extruder temperature must be close to target for this long before M109 returns success
#define TEMP_RESIDENCY_TIME 10  // (seconds)
#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.
</code></pre>

<p>The next slot is an important safety feature: Mintemp and Maxtemp. Unless you seriously, positively know your hotend can do more than 275 °C (which means you have an all-metal hotend), <strong>DON'T</strong> touch the Maxtemp, but you might set Mintemp to 0 °C if you like.</p>

<p>Next come PID-Tuning settings, you only need to work with those if you know what you are doing.</p>

<p>The next step is important also: make positively sure that these two lines are exactly as follows, no stray <code>//</code> in front to comment them out. This is <strong><a href="https://3dprinting.stackexchange.com/questions/8466/what-is-thermal-runaway-protection">TRP</a></strong>.</p>

<pre><code>#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
</code></pre>

<p>If your printer is a CoreXY or similarily uses 2 belts for moving along 2 axis, you look at the Mechanical Settings tab and alter it there, otherwise we skip further to the Endstop Settings. Enable (remove the leading <code>//</code>) the max-endstops if you have them, the rest is usually not necessary on most consumer-grade machines, then go further to the Movement Settings. From our <code>M503</code> we grab the settings to fill out the following:</p>

<pre><code>#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
#define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
</code></pre>

<p>If you have a probe, you look into Z-Probe Options and follow <a href="https://3dprinting.stackexchange.com/questions/8153/how-to-set-z-probe-boundary-limits-in-firmware-when-using-automatic-bed-leveling/8154#8154">0scar's guide here</a>, skip it otherwise until you find the next snippet. Fix that one up to fit your bed and movement area. You might need to set values for the endstop to bed origin distance. These offsets, <code>X_MIN_POS</code> and <code>Y_MIN_POS</code>, need to contain the correct values to center the bed; see <a href="/q/6375/">"How to center my prints on the build platform? (Re-calibrate homing offset)
"</a>.</p>

<pre><code>// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0 // Value of zero means that the origin of the bed is at the endstop
#define Y_MIN_POS 0 // Value of zero means that the origin of the bed is at the endstop
#define Z_MIN_POS 0 
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200
</code></pre>

<p>Next, uncomment (remove the leading <code>//</code>) the following line:</p>

<pre><code>//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
</code></pre>

<p>If you want to have a special pause position, uncomment and define it in </p>

<pre><code>//#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE)
  // Specify a park position as { X, Y, Z }
  #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
  #define NOZZLE_PARK_XY_FEEDRATE 100   // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
  #define NOZZLE_PARK_Z_FEEDRATE 5      // Z axis feedrate in mm/s (not used for delta printers)
#endif
</code></pre>

<p>We are on the finishing stretch, just a few things in this file remaining! Select your language with the line: </p>

<pre><code>#define LCD_LANGUAGE en
</code></pre>

<p>Turn on the SD-Card slot by uncommenting </p>

<pre><code>//#define SDSUPPORT
</code></pre>

<p>The last step we need to alter in the <code>Configuration.h</code> is choosing the correct LCD controller. Uncomment the line corresponding to your printer - you might need to use a generic option.</p>

<h2>Marlin 2.x</h2>

<p>Again, grab the 2.x marlin, either the <a href="https://github.com/MarlinFirmware/Configurations/tree/release-2.0.4" rel="noreferrer">blank base</a> or a preconfigured version. For some printer styles (like Delta), you have to take a specialized set. Then we look at our <code>M503</code>output and set our communications Baudrate and our motherboard (or the board it is derived from), then the number of extruders and the filament diameter:</p>

<pre><code>#define BAUDRATE 250000

#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif

#define EXTRUDERS 1

#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
</code></pre>

<p>Next we go to thermal settings! We need the correct temperature sensor table for hotend and bed, possibly we could lower MINTEMP to 0. <strong>Don't</strong> touch MAXTEMP unless you know what you're doing and have a full-metal setup and you know your machine can take more.</p>

<pre><code>#define TEMP_SENSOR_0 1
[...]
#define TEMP_SENSOR_BED 0
</code></pre>

<p>Our next step is <strong>making positively sure that TRP is on</strong>. Make sure these lines have no leading <code>//</code></p>

<pre><code>#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
</code></pre>

<p>If the printer is a CoreXY or similar, enable the style in the mechanical settings area.</p>

<p>Enable (remove the leading //) the max-endstops if you have them, the rest is usually not necessary on most consumer-grade machines, then go further to the Movement Settings. From our M503 we grab the settings to fill out the following: </p>

<pre><code>#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
#define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
</code></pre>

<p>If you have a probe, you need to set it up - <a href="https://3dprinting.stackexchange.com/questions/8153/how-to-set-z-probe-boundary-limits-in-firmware-when-using-automatic-bed-leveling/8154#8154">0scar has a partial guide</a> - and it is all in the Z Probe Options area! Otherwise, go on. We need to go down, and in the middle of the Probe setup, we find the bed settings. Set them up to fit your printer and possibly the offset from the home-switches to the build volume corner.</p>

<pre><code>// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200
</code></pre>

<p>Down to Additional Features we go! Let's turn on the EEPROM by uncommenting (removing the <code>//</code>)...</p>

<pre><code>//#define EEPROM_SETTINGS     // Persistent storage with M500 and M501
</code></pre>

<p>...and think about how you want to set up your preheats or where to have your special park position. But then comes the last part, which we really need to do: Set up the interface. Start by changing the language and turn on the SD-Slot by uncommenting the lower of these lines:</p>

<pre><code>#define LCD_LANGUAGE en

//#define SDSUPPORT
</code></pre>

<p>Our last stop on setting up the basics is LCD / Controller Selection. We need to uncomment the right one here. If you don't find yours, use a generic one.</p>

<h1>Step 2: Preparing the Board</h1>

<p>There are 2 variants here: either you use a bootloader, or you prepare a .hex file for overwriting the whole firmware. In either case, we need to know what board we have, so we can compile with the correct encoding and setup. You might need to install a proper extension!</p>

<h2>2.1 - Bootloader</h2>

<p>A lot of boards come with a pre-flashed bootloader, which makes installing and revising software very fast. But not all boards have one flashed.</p>

<p>Flashing a bootloader needs you to have an Arduino and some cables or a different ISP or AVR programming tool. Complete instructions can be found <a href="https://3dprinting.stackexchange.com/questions/6685/how-to-install-new-atmega-firmware-via-the-isp-pins/6686#6686">here by Greenonline</a> and <a href="https://3dprinting.stackexchange.com/questions/11338/flashing-a-bootloader-on-ender-3-without-arduino">here</a> by <a href="https://3dprinting.stackexchange.com/a/11339/8884">Robert Lo Giacco</a> and <a href="https://3dprinting.stackexchange.com/a/11347/8884">jpa</a>. </p>

<p>Or you take your control board to your local maker space and ask someone there to help you flash the bootloader - most maker spaces have at least someone that has an Arduino and can help you!</p>

<h2>2.2 - .hex file</h2>

<p>In this case, we don't need to do anything in <em>this</em> step. We'll have a different installation process though.</p>

<h1>Step 3: Compiling &amp; Installing Firmware</h1>

<p>Depending on your choice in the previous Step, you have to follow the corresponding branch here:</p>

<h2>3.1 - Bootloader</h2>

<p>If you have set your bootloader, now installing firmware is as simple as connecting your computer with the printer using a direct connection and doing a compile &amp; Upload command. </p>

<h2>3.2 - .hex file</h2>

<p>After preparing your .hex file, you can upload it with one of the variants shown <a href="https://3dprinting.stackexchange.com/questions/6654/how-to-install-a-hex-firmware">here</a> by <a href="https://3dprinting.stackexchange.com/a/6656/8884">Greenonline</a>, <a href="https://3dprinting.stackexchange.com/a/6655/8884">Trish</a> or <a href="https://3dprinting.stackexchange.com/a/7559/8884">Thomas Weller</a></p>

<h1>Step 4: Finishing touches</h1>

<h3>Seeding</h3>

<p>Directly after installing up our new firmware on the printer, we <strong>need</strong> to seed our settings. Connect to the printer via any Console or Terminal (see Step 0) and use these commands</p>

<pre><code>M502
M500
</code></pre>

<h3><a href="https://3daddict.com/pid-tune-3d-printer/" rel="noreferrer">PID Tune</a></h3>

<p>Then we run a PID-Tune. For the first extruder we send:</p>

<pre><code>M303 E0 S200 C3
</code></pre>

<p>It will run the machine some and return values named Kp, Ki &amp; Kd. These directly correspond with P I &amp; D. Store them into the EEPROM and save with the following: </p>

<pre><code>M301 P##.## I#.## D##.##
M500
</code></pre>

CC BY-SA 4.0
2021-04-26T08:54:33.090Z
This should be updated, since 1.1.9 is also very much obsolete.
towe
CC BY-SA 4.0
2021-04-26T09:04:24.213Z
@towe that's why this is a community wiki. Do your part!
Trish
CC BY-SA 4.0
2020-03-10T09:20:02.260Z
2020-03-17T12:56:16.847Z
2020-03-17T12:56:16.847Z
Trish
<p><strong><em>Note</strong>: This question is meant as a wiki to include all steps that are needed to update your printer with a self configured Marlin firmware version. The answer is a wiki that is currently in development and can be seen (and edited) by all users.</em></p>

<hr>

<p>I have a printer and need to update my Marlin firmware to get some stuff done to my liking, especially to make sure I have <a href="https://3dprinting.stackexchange.com/questions/8466/what-is-thermal-runaway-protection">TRP</a>, have <a href="https://3dprinting.stackexchange.com/questions/10571/how-to-activate-power-loss-recovery-in-marlin">power loss recovery</a> and then do a PID-tune. I am also not sure if a bootloader is flashed. So what I need is a step-by-step guide to:</p>

<ul>
<li>prepare my printer for flashing</li>
<li>configure my Marlin firmware</li>
<li>get my new Marlin firmware onto my printer</li>
</ul>

<marlin><firmware><knowledgebase>
Updating Marlin Firmware - Step by Step Guide
Trish
# Updating Marlin Firmware - Step by Step Guide

(Asked by: username_0 on 2020-03-10)

***Note***: This question is meant as a wiki to include all steps that are needed to update your printer with a self configured Marlin firmware version. The answer is a wiki that is currently in development and can be seen (and edited) by all users.

---

I have a printer and need to update my Marlin firmware to get some stuff done to my liking, especially to make sure I have [TRP](https://3dprinting.stackexchange.com/questions/8466/what-is-thermal-runaway-protection), have [power loss recovery](https://3dprinting.stackexchange.com/questions/10571/how-to-activate-power-loss-recovery-in-marlin) and then do a PID-tune. I am also not sure if a bootloader is flashed. So what I need is a step-by-step guide to:

* prepare my printer for flashing
* configure my Marlin firmware
* get my new Marlin firmware onto my printer

**Tags:** marlin, firmware, knowledgebase


---

## 1 answers

### Answer by username_0 on 2020-03-10. Score: 6 | Accepted answer

# Step 0: extracting old settings & setting up

The first step is to get yourself a printing software that has a [Console or Terminal](https://3dprinting.stackexchange.com/questions/10573/what-is-a-printer-console-terminal) like present in [Repetier Host](https://www.repetier.com/), [Pronterface](https://www.pronterface.com/) (as part of the Printrun software suite), [OctoPrint](https://octoprint.org/) or any other tool (e.g. serial connection with PuTTY also works) that allows to communicate with the printer to extract the settings we already have. Once we have the software installed and the printer connected, send [`M503`](http://marlinfw.org/docs/gcode/M503.html) and copy the old settings into a file for later use.

Next, we need our development surroundings. Usually, you want to use [Arduino IDE](https://3dprinting.stackexchange.com/questions/6399/recalibrating-home-position/6660#6660) (but the [PlatformIO](https://platformio.org/) plugin as part of Visual Studio Code can be used for both Arduino based microprocessors as 32-bit processors), but you need to know what kind of board the control board of your printer is derived from because some boards have native IDEs that work better for them.

# Step 1: Choice of Firmware

By some metrics of early 2020, about 80 % of all shipped machines run Marlin in some fashionneed citation. The most prolific versions of Marlin at that point are often cited to be 1.1.9 and 2.x. Since anything before 1.1.9 is very much obsolete and needs an update anyway, we will look into 1.1.9 and 2.x only. Version 2.x was developed to include 32-bit microprocessors, but is compatible with 8-bit microprocessor printer boards. As the version jump indicates though, 2.x is pretty much an entire rewrite, so do your choice and jump to the correct next step.

## Marlin 1.1.x

Typically, you start by grabbing [a blank Marlin 1.1.9](https://marlinfw.org/meta/download/). The next step is to alter the static settings of the printer to match yours in `Configuration.h` - best use the settings from what we pulled earlier via `M503` as a start. Alternatively, you can search for a configuration of your printer between known [configuration files](https://github.com/MarlinFirmware/Marlin/tree/1.1.x/Marlin/example_configurations). You should at least need to adjust these:

For communications and filament diameter:

```
#define BAUDRATE 250000

// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0

```

Choose your correct temperature tables, and make sure to turn on the one for the bed if you have one!

```
#define TEMP_SENSOR_0 1
[...]
#define TEMP_SENSOR_BED 0

```

Next come two blocks that set the 'this is ok' temperature area, for the hotends and bed respectively (only hotend shown here).

```
// Extruder temperature must be close to target for this long before M109 returns success
#define TEMP_RESIDENCY_TIME 10  // (seconds)
#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_WINDOW     1       // (degC) Window around target to start the residency timer x degC early.

```

The next slot is an important safety feature: Mintemp and Maxtemp. Unless you seriously, positively know your hotend can do more than 275 °C (which means you have an all-metal hotend), **DON'T** touch the Maxtemp, but you might set Mintemp to 0 °C if you like.

Next come PID-Tuning settings, you only need to work with those if you know what you are doing.

The next step is important also: make positively sure that these two lines are exactly as follows, no stray `//` in front to comment them out. This is **[TRP](https://3dprinting.stackexchange.com/questions/8466/what-is-thermal-runaway-protection)**.

```
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed

```

If your printer is a CoreXY or similarily uses 2 belts for moving along 2 axis, you look at the Mechanical Settings tab and alter it there, otherwise we skip further to the Endstop Settings. Enable (remove the leading `//`) the max-endstops if you have them, the rest is usually not necessary on most consumer-grade machines, then go further to the Movement Settings. From our `M503` we grab the settings to fill out the following:

```
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
#define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }

```

If you have a probe, you look into Z-Probe Options and follow [0scar's guide here](https://3dprinting.stackexchange.com/questions/8153/how-to-set-z-probe-boundary-limits-in-firmware-when-using-automatic-bed-leveling/8154#8154), skip it otherwise until you find the next snippet. Fix that one up to fit your bed and movement area. You might need to set values for the endstop to bed origin distance. These offsets, `X_MIN_POS` and `Y_MIN_POS`, need to contain the correct values to center the bed; see ["How to center my prints on the build platform? (Re-calibrate homing offset)
"](/q/6375/).

```
// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0 // Value of zero means that the origin of the bed is at the endstop
#define Y_MIN_POS 0 // Value of zero means that the origin of the bed is at the endstop
#define Z_MIN_POS 0 
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200

```

Next, uncomment (remove the leading `//`) the following line:

```
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands

```

If you want to have a special pause position, uncomment and define it in

```
//#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE)
  // Specify a park position as { X, Y, Z }
  #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
  #define NOZZLE_PARK_XY_FEEDRATE 100   // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
  #define NOZZLE_PARK_Z_FEEDRATE 5      // Z axis feedrate in mm/s (not used for delta printers)
#endif

```

We are on the finishing stretch, just a few things in this file remaining! Select your language with the line:

```
#define LCD_LANGUAGE en

```

Turn on the SD-Card slot by uncommenting

```
//#define SDSUPPORT

```

The last step we need to alter in the `Configuration.h` is choosing the correct LCD controller. Uncomment the line corresponding to your printer - you might need to use a generic option.

## Marlin 2.x

Again, grab the 2.x marlin, either the [blank base](https://github.com/MarlinFirmware/Configurations/tree/release-2.0.4) or a preconfigured version. For some printer styles (like Delta), you have to take a specialized set. Then we look at our `M503`output and set our communications Baudrate and our motherboard (or the board it is derived from), then the number of extruders and the filament diameter:

```
#define BAUDRATE 250000

#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif

#define EXTRUDERS 1

#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0

```

Next we go to thermal settings! We need the correct temperature sensor table for hotend and bed, possibly we could lower MINTEMP to 0. **Don't** touch MAXTEMP unless you know what you're doing and have a full-metal setup and you know your machine can take more.

```
#define TEMP_SENSOR_0 1
[...]
#define TEMP_SENSOR_BED 0

```

Our next step is **making positively sure that TRP is on**. Make sure these lines have no leading `//`

```
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber

```

If the printer is a CoreXY or similar, enable the style in the mechanical settings area.

Enable (remove the leading //) the max-endstops if you have them, the rest is usually not necessary on most consumer-grade machines, then go further to the Movement Settings. From our M503 we grab the settings to fill out the following:

```
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
#define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }

```

If you have a probe, you need to set it up - [0scar has a partial guide](https://3dprinting.stackexchange.com/questions/8153/how-to-set-z-probe-boundary-limits-in-firmware-when-using-automatic-bed-leveling/8154#8154) - and it is all in the Z Probe Options area! Otherwise, go on. We need to go down, and in the middle of the Probe setup, we find the bed settings. Set them up to fit your printer and possibly the offset from the home-switches to the build volume corner.

```
// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200

```

Down to Additional Features we go! Let's turn on the EEPROM by uncommenting (removing the `//`)...

```
//#define EEPROM_SETTINGS     // Persistent storage with M500 and M501

```

...and think about how you want to set up your preheats or where to have your special park position. But then comes the last part, which we really need to do: Set up the interface. Start by changing the language and turn on the SD-Slot by uncommenting the lower of these lines:

```
#define LCD_LANGUAGE en

//#define SDSUPPORT

```

Our last stop on setting up the basics is LCD / Controller Selection. We need to uncomment the right one here. If you don't find yours, use a generic one.

# Step 2: Preparing the Board

There are 2 variants here: either you use a bootloader, or you prepare a .hex file for overwriting the whole firmware. In either case, we need to know what board we have, so we can compile with the correct encoding and setup. You might need to install a proper extension!

## 2.1 - Bootloader

A lot of boards come with a pre-flashed bootloader, which makes installing and revising software very fast. But not all boards have one flashed.

Flashing a bootloader needs you to have an Arduino and some cables or a different ISP or AVR programming tool. Complete instructions can be found [here by Greenonline](https://3dprinting.stackexchange.com/questions/6685/how-to-install-new-atmega-firmware-via-the-isp-pins/6686#6686) and [here](https://3dprinting.stackexchange.com/questions/11338/flashing-a-bootloader-on-ender-3-without-arduino) by [Robert Lo Giacco](https://3dprinting.stackexchange.com/a/11339/8884) and [jpa](https://3dprinting.stackexchange.com/a/11347/8884).

Or you take your control board to your local maker space and ask someone there to help you flash the bootloader - most maker spaces have at least someone that has an Arduino and can help you!

## 2.2 - .hex file

In this case, we don't need to do anything in *this* step. We'll have a different installation process though.

# Step 3: Compiling & Installing Firmware

Depending on your choice in the previous Step, you have to follow the corresponding branch here:

## 3.1 - Bootloader

If you have set your bootloader, now installing firmware is as simple as connecting your computer with the printer using a direct connection and doing a compile & Upload command.

## 3.2 - .hex file

After preparing your .hex file, you can upload it with one of the variants shown [here](https://3dprinting.stackexchange.com/questions/6654/how-to-install-a-hex-firmware) by [Greenonline](https://3dprinting.stackexchange.com/a/6656/8884), [username_0](https://3dprinting.stackexchange.com/a/6655/8884) or [Thomas Weller](https://3dprinting.stackexchange.com/a/7559/8884)

# Step 4: Finishing touches

### Seeding

Directly after installing up our new firmware on the printer, we **need** to seed our settings. Connect to the printer via any Console or Terminal (see Step 0) and use these commands

```
M502
M500

```

### [PID Tune](https://3daddict.com/pid-tune-3d-printer/)

Then we run a PID-Tune. For the first extruder we send:

```
M303 E0 S200 C3

```

It will run the machine some and return values named Kp, Ki & Kd. These directly correspond with P I & D. Store them into the EEPROM and save with the following:

```
M301 P##.## I#.## D##.##
M500

```

> **Comments:**
> **username_1**: This should be updated, since 1.1.9 is also very much obsolete.  
> **username_0**: @username_1 that's why this is a community wiki. Do your part!  

---

