• Stars
    star
    993
  • Rank 44,261 (Top 0.9 %)
  • Language
    C
  • License
    Other
  • Created over 4 years ago
  • Updated 25 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Firmware for the Original Prusa MINI, Original Prusa MK4 and the Original Prusa XL 3D printers by Prusa Research.

Buddy

GitHub release Build Status

This repository includes source code and firmware releases for the Original Prusa 3D printers based on the 32-bit ARM microcontrollers.

The currently supported models are:

  • Original Prusa MINI
  • Original Prusa MK4
  • Original Prusa XL

Getting Started

Requirements

  • Python 3.6 or newer (with pip)

Cloning this repository

Run git clone https://github.com/prusa3d/Prusa-Firmware-Buddy.git.

Building (on all platforms, without an IDE)

Run python utils/build.py. The binaries are then going to be stored under ./build/products.

  • Without any arguments, it will build a release version of the firmware for all supported printers and bootloader settings.
  • To generate .bbf versions of the firmware, use: ./utils/build.py --generate-bbf.
  • Use --build-type to select build configurations to be built (debug, release).
  • Use --preset to select for which printers the firmware should be built.
  • By default, it will build the firmware in "prerelease mode" set to beta. You can change the prerelease using --prerelease alpha, or use --final to build a final version of the firmware.
  • Use --host-tools to include host tools in the build (bin2cc, png2font, ...)
  • Find more options using the --help flag!

Examples:

Build the firmware for MINI and XL in debug mode:

python utils/build.py --preset mini,xl --build-type debug

Build the firmware for MINI using a custom version of gcc-arm-none-eabi (available in $PATH) and use Make instead of Ninja (not recommended):

python utils/build.py --preset mini --toolchain cmake/AnyGccArmNoneEabi.cmake --generator 'Unix Makefiles'

Windows 10 troubleshooting

If you have python installed and in your PATH but still getting cmake error Python3 not found. Try running python and python3 from cmd. If one of it opens Microsoft Store instead of either opening python interpreter or complaining 'python3' is not recognized as an internal or external command, operable program or batch file. Open manage app execution aliases and disable App Installer association with python.exe and python3.exe.

Python environment

The build.py script will install some Python packages. If you prefer not to have your system modified, we recommend to use virtualenv or a similar tool.

virtualenv venv
. venv/bin/activate

Development

The build process of this project is driven by CMake and build.py is just a high-level wrapper around it. As most modern IDEs support some kind of CMake integration, it should be possible to use almost any editor for development. Below are some documents describing how to setup some popular text editors.

Formatting

All the source code in this repository is automatically formatted:

If you want to contribute, make sure to install pre-commit and then run pre-commit install within the repository. This makes sure that all your future commits will be formatted appropriately. Our build server automatically rejects improperly formatted pull requests.

XL and Puppies

With the XL, the situation gets a bit more complex. The firmware of XLBuddy contains firmwares for the puppies (Dwarf and Modularbed) to flash them when necessary. We support several ways of dealing with those firmwares when developing:

  1. Build Dwarf/Modularbed firmware automatically and flash it on startup by XLBuddy (the default)

    • The Dwarf & ModularBed firmware will be built from this repo.
    • The puppies are going to be flashed on startup by the XLBuddy. The puppies have to be running the Puppy Bootloader.
  2. Build Dwarf/Modularbed from a given source directory and flash it on startup by XLBuddy.

    • Specify DWARF_SOURCE_DIR/MODULARBED_SOURCE_DIR CMake cache variable with the local repo you want to use.
    • Example below would build modularbed's firmware from /Projects/Prusa-Firmware-Buddy-ModularBed and include it in the xlBuddy firmware.
    cmake .. --preset xl_release_boot -DMODULARBED_SOURCE_DIR=/Projects/Prusa-Firmware-Buddy-ModularBed
    
    • You can also specify the build directory you want to use:
    cmake .. --preset xl_release_boot \
        -DMODULARBED_SOURCE_DIR=/Projects/Prusa-Firmware-Buddy-ModularBed  \
        -DMODULARBED_BINARY_DIR=/Projects/Prusa-Firmware-Buddy-ModularBed/build
    
  3. Use pre-built Dwarf/Modularbed firmware and flash it on startup by xlBuddy

    • Specify the location of the .bin file with DWARF_BINARY_PATH/MODULARBED_BINARY_PATH.
    • For example
    cmake .. --preset xl_release_boot -DDWARF_BINARY_PATH=/Downloads/dwarf-4.4.0-boot.bin
    
  4. Do not include any puppy firmware, and do not flash the puppies by XLBuddy.

    -DENABLE_PUPPY_BOOTLOAD=NO
    
    • With the ENABLE_PUPPY_BOOTLOAD set to false, the project will disable Puppy flashing & interaction with Puppy bootloaders.
    • It is up to you to flash the correct firmware to the puppies (noboot variant).

See /ProjectOptions.cmake for more information about those cache variables.

Running tests

mkdir build-tests
cd build-tests
cmake ..
make tests
ctest .

Flashing Custom Firmware

To install custom firmware, you have to break the appendix on the board. Learn how to in the following article https://help.prusa3d.com/article/zoiw36imrs-flashing-custom-firmware.

Feedback

License

The firmware source code is licensed under the GNU General Public License v3.0 and the graphics and design are licensed under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). Fonts are licensed under different license (see LICENSE).

More Repositories

1

PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
C++
7,280
star
2

Prusa-Firmware

Firmware for Original Prusa i3 3D printer by PrusaResearch
C++
1,966
star
3

Original-Prusa-i3

Original Prusa i3 MK2 3D printer printed parts
OpenSCAD
1,553
star
4

Original-Prusa-MINI

Original Prusa MINI 3D printer hardware
382
star
5

PrusaSlicer-settings

Prusa3D specific settings for the Slic3r Prusa Edition
347
star
6

Prusa-Link

Python
129
star
7

PrusaControl

PrusaControl is an alternative user interface for Slic3r Prusa Edition
Python
127
star
8

Prusa-Link-Web

Prusa Web interface resources
JavaScript
109
star
9

MM-control-01

MMU 3-axis stepper control
C++
91
star
10

Heatbed_MK52_magnetic

44
star
11

Original-Prusa-SL1

Original Prusa SL1 printer parts
43
star
12

libbgcode

Prusa Block & Binary G-code reader / writer / converter
G-code
40
star
13

MM-control-2.0

Multi Material 2.0 PCB board
HTML
35
star
14

Buddy-board-MINI-PCB

HTML
35
star
15

Prusa-Firmware-SL1

Original Prusa SL1 3D printer firmware
BitBake
33
star
16

PRUSA_Laser_filament_sensor

31
star
17

Prusa3D-Sample-Objects

30
star
18

MK3_Power_Panic

30
star
19

Prusa3D-Test-Objects

Testing and calibration objects/gcodes.
29
star
20

Prusa-Connect-SDK-Printer

Python printer library for Prusa Connect
Python
22
star
21

Prusa-Firmware-MMU

C
20
star
22

Prusa-Firmware-ESP32-Cam

Firmware for ESP32 Cam modules to be used in Prusa Connect
C++
20
star
23

Heatbed-Mini-PCB

HTML
16
star
24

MK2mm_Stepper_switch

rev 0.4
15
star
25

Prusa-ESP-Nic-FW

ESP8266 as generic network interface over UART
C
14
star
26

Prusa-CW-Firmware

Original Prusa Curing and Washing machine firmware
C++
13
star
27

Arduino_Boards

Board definitions for Arduino compatible boards manufactured by Prusa Research
C
13
star
28

PrusaControl-settings

11
star
29

Prusa-Error-Codes

Python
9
star
30

stk500v2-prusa

Prusa edition of STK500v2 bootloader
C
7
star
31

hackaton2019

Prusa Hackaton 2019 repository
C
5
star
32

Original-Prusa-CW1

Original Prusa CW1 parts
5
star
33

Prusa3D-Drivers

Prusa Drivers package
5
star
34

SL-CONTROLLER-PCB

HTML
4
star
35

SL-PS-PCB

HTML
3
star
36

CW-01-LED-PCB

HTML
3
star
37

CW-CONTROLLER-PCB

HTML
3
star
38

gcode-metadata

Python G-CODE metadata parsing library
G-code
3
star
39

avrdude

HTML
2
star
40

IR-MH-sensor-PCB

HTML
2
star
41

SL-USB-PCB

HTML
2
star
42

SL-LED-PCB

HTML
2
star
43

PF-build-env

C
1
star