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!
EDIT: 21.03.2020 – This tutorial has been verified to work with Creality 1.1.2 and 1.1.5 mainboards. This includes also the firmwares which are provided for download down here.
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:
- Read the complete tutorial at least 1 time upfront
- 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 – as far as I know – Marlin 2 will not compile for your standard 1.1.2 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 one 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)
EDIT: 21.03.2020 – Expressed myself a bit more clear here:
If your Creality Ender-5 does have a separate bootloader installed, use Marlin.ino.sanguino.hex. If your Ender-5 does NOT have a separate bootloader installed, you need to use the Marlin.ino.with_bootloader.sanguino.hex file to flash your printer.
Usually Creality 1.1.5 mainbords do have a separate bootloader installed, so you should most probably choose the Marlin.ino.sanguino.hex firmware file. If you are completely unsure, I would suggest to install a bootloader first as described up here in my tutorial and install Marlin.ino.sanguino.hex afterwards.
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.
If 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 22.214.171.124-126.96.36.199):
Prepare\Bed leveling\Level bed
Please don’t forget to store your settings, after the manual bed leveling is finished.
EDIT: 25.03.2020 – So you know… If you open up a terminal to your Ender-5 and send the g-code „G29 S0“, you should get a output like this if you did a manual bed leveling:
Recv: State: Off Recv: Num X,Y: 5,5 Recv: Z offset: 0.00000 Recv: Measured points: Recv: 0 1 2 3 4 Recv: 0 -0.27500 -0.27500 -0.27500 -0.25000 -0.20000 Recv: 1 -0.35000 -0.32500 -0.27500 -0.22500 -0.12500 Recv: 2 -0.27500 -0.25000 -0.22500 -0.20000 -0.10000 Recv: 3 -0.22500 -0.25000 -0.22500 -0.17500 -0.07500 Recv: 4 -0.12500 -0.15000 -0.17500 -0.17500 -0.12500
Please note, that you will need to turn on leveling with the g-code
everytime you power up your printer. I recommend to put M420 into your Startup G-Code of your prefered slicer just before G28 (Homing) to make sure, your mesh is loaded and leveling will be turned on evertime you print.
With this firmware used, leveling is G28 resistant (RESTORE_LEVELING_AFTER_G28 is set).
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