This is a consolidated tutorial about how to configure, compile and install Marlin 1.1.9 at your Creality Ender-5. I thought that this tutorial might be interessting for others not speaking the german language, so I decided to switch language for this topic.
I absolutely will take no responsibility for any damage that will arrise as a direct or indirect result by following the instructions in this tutorial! Everything you do, will be done at your own risk and under your own responsibility!
If you would like to follow all steps to install Marlin 1.1.9 at your Creality Ender-5, you need to follow this procedure:
- Get an ISP USB interface for your Creality Ender-5
- Download and install a proper bootloader (this is optional)
- Download the latest Marlin 1.1.x source code from github
- Configure, Compile and Upload Marlin 1.1.x to your Ender-5
- Reset EEPROM configuration and do a manual bed leveling
Download and install a proper bootloader
This step is completely optional if you decide to install Marlin 1.1.x with its own bootcode. How ever, the common method out there in the webs is to install a proper bootloader at first and then upload Marlin 1.1.x afterwards by using the bootloaders serial interface (e.g. with OctoPrint). This is a very handy feature, because you do not need to always update your 3D printers firmware over it’s ISP interface.
However, an ISP USB interface is initially needed to upload at least the bootloader. You’ll find ISP USB interfaces for Creality 3D printers on AMAZON or ebay, usually bundled with an automatic bed leveling probe.
The bootloader I use is OptiBoot. Absolutely common and widely spread. Make yourself an easy life by choosing a preconfigured and precompiled bootloader image from MCUdude’s git repository. I used this one here.
Please follow the manual for your ISP USB interface on how to upload the bootloader (same as uploading a complete firmware). Please be aware, that the correct values „Fuse&Lock/Config bits“ for your Ender-5 typically are: „D6 DC FD“. If this differs, something went wrong with your board, the ISP or is not in line with your printer modell. Please check the ISP’s manual for details to be sure, that everything will work as expected.
Download the latest Marlin 1.1.x source code from github
Just download the latest Marlin 1.1.x source code from the projects github repository. The branch is called „bugfix-1.1.x“ and will include security bugfixes for at least some time left. Marlin 1 is announced to be discontinued in the future and Marlin 2 will not compile for your standard Ender-5 board.
Download and extract the source code onto your harddrive in an dedicated folder.
Configure, Compile and Upload Marlin 1.1.x to your Ender-5
Also make yourself an easy ride here and choose on of the best configurations I found in the webs for Marlin 1.1.x for your Creality Ender-5 and use firestrife23’s configuration files at github. You can just download the files
and replace the existing ones from the Marlin source code you just downloaded with them.
However, I did my own additions to his configuration, which can be found here as a fork at my github account. I basically added the following features:
- Manual bed leveling (without a probe)
- Nozzle park and printing pause feature (to replace fillament while printing)
I also changed the Z-JERK value to get smoother outlines for my 3D prints.
If you want to follow my configuration, than you could spare yourself some time and download my precompiled firmware here:
- Marlin.ino.sanguino.hex (date: 23rd of January 2020)
- Marlin.ino.with_bootloader.sanguino.hex (date: 23rd of January 2020)
If you choose to update your Creality Ender-5 without a bootloader, you need to use the Marlin.ino.with_bootloader.sanguino.hex file to flash your printer.
To compile the source code, simply install a new board to your Arduino IDE by adding this link to the board configuration settings:
After that, you can update your board list and choose this board settings for your Creality Ender-5:
Open up Marlin.ino with your Arduino IDE. To compile and export the hex-files, simply choose „Sketch/Export compiled binary“. You will find the compiled binaries inside your source codes directory.
You you happen to use my configuration, you might get an error message which simply means, that you are running out of the build targets (Sanguino) flash memory. The build needs to be optimized.
To get the build done, create a file called „platform.local.txt“ into you corresponding Arduino IDE hardware folder. Mine is „%APPDATA%\Local\Arduino15\packages\Sanguino\hardware\avr\1.0.3“. Copy/Past these line into the newly created file:
compiler.c.extra_flags=-fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues
compiler.cpp.extra_flags=-fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues
This will optimize your binary output to fit into your boards flash memory.
This is important: if you want to update your firmware with a bootloader from above (MCUdude) installed, you need to use Marlin.ino.sanguino.hex for your printer. As mentioned above, I used OctoPrint with OctoPi and it’s plugin „Firmware updater“. After installing avrdude with
sudo apt-get update
sudo apt-get install avrdude
on my OctoPi’s ssh console and setting the plugin parameters to the following, everything works as expected:
Upload the file without bootcode: Marlin.ino.sanguino.hex
After flashing, the printer should boot into the new firmware and OctoPrint will state with:
Congratulations! You just flashed your Creality Ender-5 with your own firmware.
Reset EEPROM configuration and do a manual bed leveling
You might have noticed, that I put the commands M502 and M500 into the „Post flash gcode“ section of the plugins configuration page. These commands will reset the EEPROM configuration to factory defaults and save the new configuration into EEPROM.
Now, at your printers LCD menue, you will be able to do a manual bed leveling (which was missing since Creality put out 188.8.131.52-184.108.40.206):
Prepare\Bed leveling\Level bed
Please don’t forget to store your settings, after the manual bed leveling is finished.
So hopefully this was a little bit helpful for you guys. I know, this is not the best detailed tutorial and more or less just a consolidation of other very good post I found myself useful while striving through the webs. But it might hopefully give you a hint into the right direction.
Please leave a comment if I missed something critical or if you want me to add some useful information. Thank you! 🙂
-Stefan aka. swarkn