Mirror of official Prusa firmware with custom changes.

Yuri D'Elia 2d26465db9 README: Document the new build system 2 years ago
.github 9bfe480320 CI: Ignore lang-check errors in lang stage 2 years ago
.vscode 73fbcfa47d build: Switch vscode to AvrGcc 2 years ago
Firmware 4c32e8b403 PFW-1457 make CHECK_FSENSOR into a function 2 years ago
cmake 036a04938d cmake: Introduce AvrGcc/AnyAvrGcc toolchains, replacing LocalAvrGcc 2 years ago
lang 9428064a9e Remove unused community translations 2 years ago
lib ae17cef676 Update Catch2 v3.1.1 2 years ago
tests f4918622f0 build: Update tests for Catch2 v3 2 years ago
tools e68ded37fe tools: Do not use os.EX_DATAERR due to unavailability on windows 2 years ago
utils 66c3519b3b Update cmake Arduino_boards to 1.0.6 2 years ago
.cmake-format.py 75377f3081 cmake: Use/include Buddy formatting rules for consistency 2 years ago
.editorconfig 0d7680dbf7 New PO-based language translation support (#3471) 2 years ago
.gitattributes 2a0f0bcd19 lang: Add git diff filter instructions for po files 2 years ago
.gitignore 9288462b59 cmake: Tighten ignores 2 years ago
.travis.yml 83d3732481 CI: Also cache PF-build dependencies 2 years ago
CMakeLists.txt 5160e214ae Merge branch 'MK3' into build_drop_unused_option 2 years ago
Community_made.md 60aa996ba7 Fix typo (#3356) 3 years ago
LICENSE a4a80b3eb7 MK2 Firmware release. 8 years ago
MK404-build.sh 3a77ef3ce7 Sync PF-build.sh and MK404-build.sh with MK3_3.11.1 branch 2 years ago
PF-build.sh b26c6af8e3 PF-build: cleanup whitespace 2 years ago
README.md 2d26465db9 README: Document the new build system 2 years ago
README_cz.md ecb2a6e02c Update README.md. 6 years ago
build.sh 74e15ac233 Rename EN_ONLY to EN_FARM 2 years ago
prepare_winbuild.ps1 d0e3e9d2e2 Build firmware under Windows 10 64-bit ... 6 years ago

README.md

Prusa Firmware MK3

This repository contains the source code and the development versions of the firmware running on the Original Prusa i3 MK3S/MK3/MK2.5S/MK2.5 line of printers.

The latest official builds can be downloaded from Prusa Drivers. Pre-built development releases are also available here.

The firmware for the Original Prusa i3 printers is proudly based on Marlin 1.0.x by Scott Lahteine (@thinkyhead) et al. and is distributed under the terms of the GNU GPL 3 license.

This repository contains development material only!

Build

Linux

There are two ways to build Prusa-Firmware on Linux: using CMake (recommended for developers) or with PF-build which is more user-friendly for casual users.

CMake

Quick-start

The workflow should be pretty straightforward for anyone with development experience. After installing git and a recent version of python 3 all you have to do is:

# clone the repository
git clone https://github.com/prusa3d/Prusa-Firmware
cd Prusa-Firmware

# automatically setup dependencies
./utils/bootstrap.py

# configure and build
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/AvrGcc.cmake
ninja

Detailed CMake guide

Building with cmake requires:

  • cmake >= 3.22.5
  • ninja >= 1.10.2 (optional, but recommended)

Python >= 3.6 is also required with the following modules:

  • pyelftools (package python3-pyelftools)
  • polib (package python3-polib)
  • regex (package python3-regex)

Additionally gettext is required for translators.

Assuming a recent Debian/Ubuntu distribution, install the dependencies globally with:

sudo apt-get install cmake ninja python3-pyelftools python3-polib python3-regex gettext

Prusa-Firmware depends on a pinned version of avr-gcc and the external prusa3dboards package. These can be setup using ./utils/bootstrap.py:

# automatically setup dependencies
./utils/bootstrap.py

which will download and unpack them inside the .dependencies directory. ./utils/bootstrap.py will also install cmake, ninja and the required python packages if missing, although installing those through is system's package manager is usually preferred.

You can then proceed by creating a build directory, configure for AVR and build:

# configure
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/AvrGcc.cmake

# build
ninja

By default all variants are built. There are several ways to restrict the build for development. During configuration you can set:

  • cmake -DFW_VARIANTS=variant: comma-separated list of variants to build. This is the file name as present in Firmware/variants without the final .h.
  • cmake -DMAIN_LANGUAGES=languages: comma-separated list of ISO language codes to include as main translations.
  • cmake -DCOMMUNITY_LANGUAGES=languages: comma-separated list of ISO language codes to include as community translations.

When building the following targets are available:

  • ninja ALL_MULTILANG: build all multi-language targets (default)
  • ninja ALL_ENGLISH: build all single-language targets
  • ninja VARIANT_EN-only: build the single-language version of VARIANT
  • ninja VARIANT_Multilang: build the multi-language version of VARIANT
  • ninja check_lang: build and check all language translations
  • ninja check_lang_ISO: build and check all variants with language ISO
  • ninja check_lang_VARIANT: build and check all languages for VARIANT
  • ninja check_lang_VARIANT_ISO: build and check language ISO for VARIANT

Automated tests

Automated tests are built with cmake by configuring for the current host:

# clone the repository
git clone https://github.com/prusa3d/Prusa-Firmware
cd Prusa-Firmware

# automatically setup dependencies
./utils/bootstrap.py

# configure and build
mkdir build
cd build
cmake .. -G Ninja
ninja

# run the tests
ctest

PF-build

PF-build is recommended for users without development experience. Download or clone the repository, then run PF-build and simply follow the instructions:

cd Prusa-Firmware
./PF-build.sh

PF-build currently assumes a Debian/Ubuntu (or derivative) distribution.

Windows

VSCode

TODO

Arduino (Legacy)

TODO

PF-build with WSL

TODO