Skip to main content

Recompile the firmware to enable HOST_ACTION_COMMANDS for Creality Ender 3 V2, or Ender 3 V1 upgraded to a 32-bit mainboard

What you need

Thanks to the new mainboard on the Ender 3 V2, you won’t need much to update its firmware:

  • A Micro SD card.
  • A laptop or a desktop computer. Either Mac or Windows will work.

Step 1: Install required software

First, lets install all of the necessary programs. All of these programs have Mac and Windows versions available.

  1. Install Python.

  2. Install Microsoft Visual Studio Code and open it.

  3. In VSCode, install the Auto Build Marlin extension.

  4. Click the extensions button on the left side of VSCode and type ‘Auto Build Marlin’ and click to install it. Platform.io will also be installed at this time.

  5. Close and reopen VSCode to ensure the extensions you just installed are active.

Open Platform.io

Step 2: Download the latest Marlin source code and configure it

  1. Download Marlin. Most likely, you will want the latest version, which is 2.0.9.3 at this time. Make sure you download the both “Marlin-2.0.x.zip” and “Configurations-release-2.0.x.x.zip”.

  2. After downloading, extract the zip file.

  3. Find the configuration.h and configuration.adv files for your the Creality Ender 3V2.

:::Note

If you don't have a Creality Ender 3V2, go to our general guide for 32 bit boards

:::

  1. In the examples folder, select Creality. then select Creality Ender 3V2. You will see

  2. Copy and paste the files into the .\Marlin folder that is in the Marlin 2.xx folder that you unzipped in the previous step.

  3. When prompted, choose to overwrite the two files that are already there.

Step 3: Set the correct Environment

  1. Click the home symbol on the bottom left of the screen to open Platform.io.

Open Project Platform.io

  1. Click the Open Project button.

  2. Find the unzipped Marlin folder and click Open

  3. Click the Explorer button on the left side, and click the platform.ini menu

  4. Navigate to the Marlin Folder on the left side of the screen.

Find pins.h

  1. Select the Marlin folder. Select pins. Select pins.h

  2. Type control-f and then search for your mainboard manufacturer. The Ender 3 V2 comes stock with a Creality 4.2.2 32-bit mainboard.

Find the environment for your mainboard

  1. Copy the environment corresponding to your board as shown.

Enter the correct environment

  1. Replace the default_envs with the environment you found in the previous step. For the Creality Ender 3 V2 with the 4.2.2 32-bit mainboard, it the value is: default_envs = STM32F103RET6_creality

Step 4: Enable HOST_ACTION_COMMANDS and M600

  1. Click the Explorer button on the left side and edit the configuration_adv file in the Marlin folder.

  2. To enable the M600 command, type control-f on your keyboard, and search for M600 to find where it is listed in the file.

  3. Delete the two / symbols in front of #define ADVANCED_PAUSE_FEATURE

Enable M600

  1. To enable Host Action Commands Type control-f again and search for host action command. Scroll down until you see Host Action Commands

  2. Delete the / symbol in front of #define HOST_ACTION_COMMANDS and any other necessary symbols so yours looks identical to the image shown below.

Host Action Commands

  1. Save the file

Step 5: Compile the firmware

  1. Click the Marlin icon on the left side of the screen and hover over the build section on the top left side of the screen and you will see a hammer icon. Click this icon and click Build on the right to start building the firmware.
note

Be patient, compiling the firmware can take as long as ten minutes.

  1. At the end of the terminal, you should see a list of boards, with most of them saying Ignored, and your board listed as "Success".

Step 6: Flash the new firmware

  1. Go to your “Marlin-2.0.x” folder,

  2. Go to the folder where you extracted Marlin, find and open the “.pio” folder.

  3. Open the build folder and then open the folder with a name beginning with “STM32” (names might vary depending on the mainboard).

  4. Find the most recent (by time) BIN file. You must change the name to a unique name other than "firmware.bin." For example, a suitable name would be "mfirmware.bin" Once you have changed the name, copy the .bin file.

  5. Plug in your mainboard’s Micro SD card into your device.

  6. Clear (delete or move) everything on it.

  7. Save the BIN firmware file to the Micro SD card.