Open-source project
knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S avatar
knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S

Marlin for Anycubic i3 MEGA: a maintained firmware fork with tests

Marlin 2.x Version for Anycubic i3 MEGA M/S/P/X/CHIRON and 4MAX with Anycubic TFT or the "new" DGUS Clone TFT - Now also with BLTouch!

848 stars207 forksC++GPL-3.0

At a glance

What is it?
This repository is a Marlin 2.1.x firmware fork for the Anycubic i3 MEGA family, covering the M, S, P, X, Chiron and 4MAX with either the Anycubic TFT or the newer DGUS clone screen, and with BLTouch support. It ships a Makefile driven PlatformIO build, a Docker image for reproducible builds and a test suite you can run locally.
Who is it for?
This fork is the right choice if you own one of the listed Anycubic boards and want Marlin with the touchscreen, BLTouch, bed levelling and the ESP3D style features that the stock firmware does not give you, because the configurations, board definitions and pin work for those machines are already done.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 56 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What the fork covers

The repository is a fork of the Marlin firmware, based on Marlin 2.1.x, aimed at a specific set of printers: the Anycubic i3 MEGA M, S, P and X, the Chiron, and the 4MAX, plus the 4MAX Pro according to the topic list.

The scope also covers the displays. The description says it works with the Anycubic TFT or the newer DGUS clone TFT, and the topic list names touchscreen support and ESP3D, the ESP based web interface that lets you control and monitor a printer from a browser. Other topics point at the feature set the fork cares about: auto bed levelling, bilinear bed levelling, BLTouch probing, a filament runout sensor, and WiFi through an ESP8266 module.

The MEGA family is built around an Arduino Mega 2560, and the topic list includes both mega2560 and mega-pro variants, so the fork covers the original board and the Pro revisions.

For a reader deciding whether to try it, the important framing is that this is not a general Marlin distribution. It is the upstream project with the work done for one printer family, and the value of a fork like this is precisely that you do not have to do that work yourself: the pin definitions, the screen integration and the board configuration exist already.

The licence is GPL 3.0, which is what Marlin itself uses, so the fork inherits the copyleft terms and the requirement to publish modifications under the same terms.

Building with PlatformIO

The README is direct about the toolchain: Marlin is optimised to build with the PlatformIO IDE extension for Visual Studio Code. You can still build with the Arduino IDE, and the author hopes to improve that experience, but at the moment PlatformIO is the better choice.

The repository is laid out like a Marlin checkout with the tooling for repeatable builds on top: a platformio.ini, a Marlin directory holding the firmware sources, a buildroot directory with the helper scripts, a config directory for the machine configurations, an ini directory, a docker directory, a Makefile, and a deploy_firmware_files.sh script for pushing the built artefacts out.

There are also the usual developer conveniences: a .clang-format file for consistent formatting, an .editorconfig, a .devcontainer directory for a reproducible development environment, and directories for VS Code and Zed editor configuration.

The Makefile is the entry point for the local workflow, and its help output is the most useful summary of the tasks available.

make
	@echo "make marlin                    : Build marlin for the configured board"
	@echo "make format-pins               : Reformat all pins files"
	@echo "make tests-single-ci           : Run a single test from inside the CI"
	@echo "make tests-single-local        : Run a single test locally"
	@echo "make tests-single-local-docker : Run a single test locally, using docker"
	@echo "make tests-all-local           : Run all tests locally"
	@echo "make tests-all-local-docker    : Run all tests locally, using docker"
	@echo "make setup-local-docker        : Build the local docker image"

The actual build is one line, and it calls the Marlin test and build script rather than PlatformIO directly.

make
marlin:
	./buildroot/bin/mftest -a

The Docker path for reproducible builds

The Makefile variables at the top of the file describe the container setup, and they are short enough to be worth reading in full.

make
SCRIPTS_DIR := buildroot/share/scripts
CONTAINER_RT_BIN := docker
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
CONTAINER_IMAGE := marlin-dev

The working directory is mounted into the container at /code, and the PlatformIO cache is kept in a named volume called platformio-cache. That second detail is the important one for build times: without it every container run would re-download the toolchain and the library dependencies, and with it the downloads survive between runs.

The image name is marlin-dev, and the setup task builds it locally before the docker based test targets are used.

The result is a build environment that does not depend on what is installed on your machine, which matters more than usual here because the firmware build pulls in a specific set of library versions, and a mismatch between the PlatformIO version on your desktop and the one in the container produces errors that look like configuration problems rather than environment problems.

The Makefile also has a format-pins task that reformats the pins files, which is a maintenance task for anyone editing a board definition.

Running the tests, including the ones that are broken

The test targets are the most carefully documented part of the Makefile, and there is a warning worth reading before you run anything.

The help text explains the options for testing. TEST_TARGET selects which test to run when using the tests-single targets, and setting it to ALL runs all of them, but the text says some of them are broken and tells you to use the tests-all targets instead, which run only the ones that run on GitHub continuous integration. ONLY_TEST limits the run to tests whose name contains a given string, or to the index of a test counted from one. VERBOSE_PLATFORMIO gives you the full PlatformIO output. GIT_RESET_HARD is used by CI to reset local changes, and the help carries an explicit warning that this undoes any changes you have made.

That last flag deserves attention. A CI-oriented target that resets your working tree can cost you an afternoon if you run it locally with a pending change, and the Makefile says so in capitals.

The practical workflow is therefore: use the docker variants if you do not want to install PlatformIO locally, use the tests-all variants rather than the single test with ALL, and treat the reset flag as something the CI sets rather than something you set by hand.

Documentation, community and where the fork sits

The README is short and the documentation lives in the wiki, with pages for a beginner's guide, a features list, a frequently asked questions page and a tutorials section. There is an official Facebook group, described as German speaking, and a downloads link pointing at the releases page of the repository.

The structure of that wiki is worth noting because it tells you what kind of reader the fork expects. A beginner's guide and a tutorial section mean the author expects people arriving with a printer they just bought and a board they do not know. A features page is where the fork lists what it adds beyond stock Marlin, and that is the page to read before deciding whether to flash.

The alternative to this fork is upstream Marlin itself, configured by hand for your board. The difference in approach is that upstream gives you the general framework and expects you to do the board specific work, including the display integration for a DGUS clone, the probe configuration and the ESP3D settings. A fork does that work once for a family of machines and ships the result, at the cost of tracking a release line that is not upstream Marlin and of losing the larger community that works on Marlin proper.

There is a third path worth naming: keeping the stock Anycubic firmware. That is the least work and the least gain, since the fork exists because the stock firmware does not offer the features the topic list names.

Maintenance and the version line

The release tags are 1.6.0 from 2026-06-08, 1.5.5 from 2026-01-24 and 1.5.4 from 2024-06-05, and the last push to the repository was on 2026-08-28. So the fork is active, with releases roughly every few months when there is something to release, and a changelog file at the root of the repository.

The version numbers here are the fork's own, and they sit on top of the Marlin 2.1.x base. That matters when you read the documentation, because a fork release number tells you nothing about which upstream features you have; the changelog and the base version do.

Before you flash anything, three checks are worth doing. Confirm that your exact printer model and screen combination is covered, since the fork spans several boards and two display families, and the configuration files are per machine. Read the features page in the wiki so you know what changes behaviour on your printer. And build the firmware yourself first, which is what the Makefile is for, so that you have a binary you built and a way back if the flash goes wrong.

One housekeeping note: the README asks for donations to keep the work going, and it says plainly that a few cents are enough to show who is interested in further development.

Editorial conclusion

This fork is the right choice if you own one of the listed Anycubic boards and want Marlin with the touchscreen, BLTouch, bed levelling and the ESP3D style features that the stock firmware does not give you, because the configurations, board definitions and pin work for those machines are already done. It is the wrong choice for a printer outside that list, since the effort goes into those specific boards, and the wrong choice if you want upstream Marlin support and a large community, because a fork tracks its own release line. Verify first that your exact model and screen combination appears in the config directory, read the wiki features page for what the fork adds over stock firmware, and build the firmware yourself before flashing so you can fall back to the original firmware binary if something goes wrong.

Frequently asked questions

Which printers does this Marlin fork support?

The Anycubic i3 MEGA M, S, P and X, the Chiron and the 4MAX, including the 4MAX Pro according to the topic list, with either the Anycubic TFT or the newer DGUS clone TFT, and with BLTouch support.

How do I build the firmware?

The README recommends the PlatformIO IDE extension for Visual Studio Code over the Arduino IDE. The repository also provides a Makefile whose marlin task runs the buildroot test and build script, and docker based tasks that build in a marlin-dev container with a persistent PlatformIO cache.

What is the GIT_RESET_HARD option in the Makefile?

It is used by CI to reset local changes, and the Makefile help text warns in capitals that running it undoes any changes you have made.

Which Marlin version is this fork based on?

The repository describes itself as based on Marlin 2.1.x, with its own release line at 1.6.0 from 2026-06-08 and a changelog at the root of the repository.

Official sources

  1. Issues
  2. knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S on GitHub
  3. License: GPL-3.0
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/knutwurst-marlin-2-0-x-anycubic-i3-mega-s.svg)](https://hysenlabs.com/projects/knutwurst-marlin-2-0-x-anycubic-i3-mega-s)

Was this useful?