-
Notifications
You must be signed in to change notification settings - Fork 1
Building Marlin
Steps to build Marlin from source.
- Install a copy of git.
- Clone a copy of the Marlin repo using git.
- Note that you want to choose a suitable matching (or later) branch compared to the last build.
- When Marlin boots, the display lists the current version installed.
- Install Docker-Desktop 2.3 or later.
- If on Linux, also install Docker Compose (1.21 or later). Do not use the Ubuntu snap package.
- If on Windows 10/11 Home, install the WSL2 Back-end (comes with 10/11 Pro/Enterprise - but may automatically update).
- On Windows; Docker Toolbox is not supported. Windows container images are not supported.
- Install VSCode.
- Within VSCode, first install the C/C++ helper extension and then install the PlatformIO extension. You will need to reload/restart VSCode.
- Within VSCode, open the folder of the Marlin repo you cloned in.
- Modify the following files in the Marlin repo as required:
Marlin/Configuration.h
Marlin/Configuration_adv.h
platformio.ini
- Note: This may already be done if you've cloned an appropriate fork of the main Marlin repo.
- Hit the build button in VSCode to compile.
Resulting firmware will be built into the file .pio/build/[board_name]/firmware.bin
, where [board_name]
is the motherboard name defined in Marlin/Configuration.h
and in platformio.ini
(should be the same and match the hardware you are building).
Git for Windows: https://gitforwindows.org/
Main Marlin repo: https://github.com/MarlinFirmware/Marlin/
Docker Desktop: https://docs.docker.com/get-started/get-docker/#supported-platforms
Docker Compose (Linux only): https://docs.docker.com/compose/install/
Microsoft WSL2 Back end: https://aka.ms/vscode-remote/containers/docker-wsl2
VSCode: https://code.visualstudio.com/docs/setup/setup-overview
Marlin docs on using PlatformIO dev container in VSCode: https://marlinfw.org/docs/basics/install_devcontainer_vscode.html