Skip to content

Instantly share code, notes, and snippets.

@surfsoft
Last active June 29, 2023 15:45
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save surfsoft/317439ceea5568f93fc3900a92c88d64 to your computer and use it in GitHub Desktop.
Save surfsoft/317439ceea5568f93fc3900a92c88d64 to your computer and use it in GitHub Desktop.
How to update the Creality Ender 5 Plus firmware

How to update the Creality Ender 5 Plus firmware

The downloads from Creality only include instructions and software for flashing the firmware from Windows. If you don't have access to a Windows machine there is another way: avrdude. However, there are a few steps you need to take to work out how to flash your printer.

These instructions refer specifically to the Ender 5 Plus but I've tried to make them a bit more open-ended so that you'll be able to work out how to do this for other printers in their range. They are fairly generic and therefore should work for both OSX/macOS and Linux users.

Before you start

1. Download and unpack the firmware upgrade

You can get this from https://www.creality3dofficial.com/pages/firmware-download. In the 'mainboard' directory there will be a '.hex' file. This is the firmware image.

2. You'll need a copy of avrdude, which can be installed via homebrew if you don't already have it:

brew install avrdude

3. It is also helpful to have a terminal program that can connect to serial ports over USB.

This allows you to interrogate the printer before you start flashing. I used CoolTerm.

Preparation

4. Find out which USB to serial chip is on the controller board.

You'll be using the MicroUSB port on the controller board (exposed through the casing), which connects the to the controller chip using a serial port. If your computer doesn't recognise the USB to serial port hardware (this is a single chip on the mainboard) you'll need to know which driver to install. Step 5 explains how to open up the printer control box and inspect the mainboard.

5. Find out which controller your printer uses.

You need to specify the controller when you run avrdude. I put my Ender 5 Plus carefully on its side and removed six screws securing the bottom cover of the control box. Don't let the cover drop as there's a cooling fan attached to it which is wired to the mainboard.

The mainboard is mounted to the top of the control box and is easily inspected. Take two or three clear photos and then put the cover back on. My Creality mainboard has an FT232RL chip for USB to serial and an ATmega2560 controller.

Knowing the USB to serial chip will allow you to find the correct driver for your operating system. Knowing the controller allows you to work out what part number to specify when running avrdude.

To translate the name of the controller into an avrdude part number there's a convenient list available from avrdude itself. If you specify an invalid part number then it prints the full list of supported parts:

avrdude -c arduino -p dummy

Find your controller in the list. For me, the ATmega2560 has part number m2560.

6. Work out which programmer you need to use.

This is dependent on which programmer is flashed into the bootloader. There's no easy way to find this out. If Creality have released the source code for your printer then the answer should be there. Failing that, contact Creality, or Google is your friend. I eventually found out that the Atmel AVR ISP mkII had been used.

To translate the name of the programmer into an avrdude programmer name there's a convenient list available from avrdude itself. If you specify an invalid programmer then it prints the full list of supported programmers:

avrdude -c dummy

Near the top of the list I found 'avrispmkII = Atmel AVR ISP mkII', so my programmer name is 'avrispmkII'.

7. Now you're in a position to connect to your printer.

Disconnect the printer from the mains, then connect the printer to one of your USB ports. The display should now power up and a new entry should appear in /dev with a 'tty' prefix.

If you can't see a new tty then now is the time to install the USB to serial port driver. On my MacBook Pro the serial port appeared as /dev/tty.usbserial-AM00NE7A and no USB to serial driver was required.

8. Interrogate your printer.

Using a program such as CoolTerm you can now open a connection to the controller. I set the baud rate to 115200 and got the following output when I connected:

echo: External Reset
Marlin Ver 1.70.0 BL

echo: Last Updated: 2019-07-02 | Author: Ender-5 Plus
echo:Compiled: Jul  2 2019
echo: Free Memory: 1460  PlannerBufferBytes: 1232
echo:SD init fail
echo:enqueueing "M420 S1"
echo:SD init fail
***Initing card fails***
===Initing RTS has finished===
echo:SD init fail
echo:Bed Leveling On 
echo:Fade Height Off

So now I know that communication through to the controller is working and I know I have the right baud rate.

Shut down the terminal program.

9. Flash the software

The command you need is:

avrdude -c <programmer-name> -p <part-number> -b <baud-rate> -P <tty> -U <firmware-file>

For me:

  • programmer-name = avrispmkII
  • part-number = m2560
  • baud-rate = 115200
  • tty = /dev/tty.usbserial-AM00NE7A
  • firmware-file = Ender-5PlusBLTouch_0904_V1.70.1-BL.hex

This makes my flashing command:

avrdude -c avrispmkII -p m2560 -b 115200 -P /dev/tty.usbserial-AM00NE7A -U Ender-5PlusBLTouch_0904_V1.70.1-BL.hex 

Big intake of breath and I ran the command. The output was:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "Ender-5PlusBLTouch_0904_V1.70.1 BL.hex"
avrdude: input file Ender-5PlusBLTouch_0904_V1.70.1 BL.hex auto detected as Intel Hex
avrdude: writing flash (127344 bytes):

Writing | ################################################## | 100% 31.83s

avrdude: 127344 bytes of flash written
avrdude: verifying flash memory against Ender-5PlusBLTouch_0904_V1.70.1 BL.hex:
avrdude: load data flash data from input file Ender-5PlusBLTouch_0904_V1.70.1 BL.hex:
avrdude: input file Ender-5PlusBLTouch_0904_V1.70.1 BL.hex auto detected as Intel Hex
avrdude: input file Ender-5PlusBLTouch_0904_V1.70.1 BL.hex contains 127344 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 27.36s

avrdude: verifying ...
avrdude: 127344 bytes of flash verified

avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)

avrdude done.  Thank you.

I disconnected and then reconnected the printer to put it through a power cycle. Reconnecting using CoolTerm the output I got was:

echo: External Reset
Marlin Ver 1.70.1 BL

echo: Last Updated: 2019-09-04 | Author: Ender-5 Plus
echo:Compiled: Sep  4 2019
echo: Free Memory: 1460  PlannerBufferBytes: 1232
echo:V41 stored settings retrieved (526 bytes; crc 37003)
echo:  G21    ; Units in mm
echo:  M149 C ; Units in Celsius

echo:Filament settings: Disabled
echo:  M200 D1.75
echo:  M200 D0
echo:Steps per unit:
echo:  M92 X80.00 Y80.00 Z800.00 E93.00
echo:Maximum feedrates (units/s):
echo:  M203 X500.00 Y500.00 Z10.00 E50.00
echo:Maximum Acceleration (units/s2):
echo:  M201 X500 Y500 Z100 E5000
echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
echo:  M204 P500.00 R1000.00 T500.00
echo:Advanced: S<min_feedrate> T<min_travel_feedrate> B<min_segment_time_ms> X<max_xy_jerk> Z<max_z_jerk> E<max_e_jerk>
echo:  M205 S0.00 T0.00 B20000 X8.00 Y8.00 Z0.40 E5.00
echo:Home offset:
echo:  M206 X0.00 Y0.00 Z0.00
echo:Auto Bed Leveling:
echo:  M420 S0 Z0.00
echo:PID settings:
echo:  M301 P14.72 I0.89 D61.22
echo:Z-Probe Offset (mm):
echo:  M851 Z-19.90
echo:SD init fail
echo:V41 stored settings retrieved (526 bytes; crc 37003)
echo:  G21    ; Units in mm
echo:  M149 C ; Units in Celsius

echo:Filament settings: Disabled
echo:  M200 D1.75
echo:  M200 D0
echo:Steps per unit:
echo:  M92 X80.00 Y80.00 Z800.00 E93.00
echo:Maximum feedrates (units/s):
echo:  M203 X500.00 Y500.00 Z10.00 E50.00
echo:Maximum Acceleration (units/s2):
echo:  M201 X500 Y500 Z100 E5000
echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
echo:  M204 P500.00 R1000.00 T500.00
echo:Advanced: S<min_feedrate> T<min_travel_feedrate> B<min_segment_time_ms> X<max_xy_jerk> Z<max_z_jerk> E<max_e_jerk>
echo:  M205 S0.00 T0.00 B20000 X8.00 Y8.00 Z0.40 E5.00
echo:Home offset:
echo:  M206 X0.00 Y0.00 Z0.00
echo:Auto Bed Leveling:
echo:  M420 S0 Z0.00
echo:PID settings:
echo:  M301 P14.72 I0.89 D61.22
echo:Z-Probe Offset (mm):
echo:  M851 Z-19.90
echo:enqueueing "M420 S1"
echo:SD init fail
***Initing card fails***
===Initing RTS has finished===
echo:SD init fail
echo:Bed Leveling On 
echo:Fade Height Off

Right at the top we can see that the firmware version has changed.

It took me an afternoon to work through all of this from first principles. I've posted this extensive gist so that others don't go through the same pain.

@RWBRITT
Copy link

RWBRITT commented May 31, 2021

I used Arduino ide and command line and still get a time out error. Any ideas on how to fix it

@RWBRITT
Copy link

RWBRITT commented May 31, 2021

image
Here is the error

@surfsoft
Copy link
Author

surfsoft commented Jun 1, 2021

What output do you get at step 8 in the instructions above? If you don't get any output from the printer at this point you may have the wrong baud rate or tty.

@RWBRITT
Copy link

RWBRITT commented Jun 1, 2021

I set the baud rate to the same as what I had it in the printer. It confuses me that I can send prints to the printer with that computer and it won’t take a flash.

@surfsoft
Copy link
Author

surfsoft commented Jun 1, 2021

I'm happy to discuss shortcomings/omissions/improvements to these instructions. If you're not working on a Creality printer or you're not willing to share more detail of the output of the printer in earlier steps then I'm unable to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment