-
Notifications
You must be signed in to change notification settings - Fork 11
How to: Build Prusa Firmware
-
Please read the Windows section https://github.com/3d-gussner/Prusa-Firmware/tree/MK3-winbuild .
You gonna need to copy following file to your source code path from that branch:
-
Please also read the release notes https://github.com/3d-gussner/PF-build-env/releases
So please follow these instructions below for Arduino IDE 1.8.5 to have these exclusive for Prusa-Firmware and MMU2 delevlopment.
-
Downloaded Arduino-IDE-1.8.5-windows.zip file from https://www.arduino.cc/download_handler.php?f=/arduino-1.8.5-windows.zip .
-
extract the zip in your
<path>
-
create a folder portable under
<path>\arduino-1.8.5-windows\arduino-1.8.5\
Making it portable you can separate the Prusa Firmware IDE 1.8.5 from other Arduino projects, libraries, boards and sketches. It is exclusively for Prusa Firmware.- Now you have
<path>\arduino-1.8.5-windows\arduino-1.8.5\portable
- Now you have
-
created a folder output under
<path>\arduino-1.8.5-windows\arduino-1.8.5\portable
.- Now you have
<path>\arduino-1.8.5-windows\arduino-1.8.5\portable\output
- Now you have
-
Prepare the Arduino toolchain
- Open the portable IDE
- Choose File -> Preferences and set "Additional Boards Manager URLs" to the RAMBo repository: https:// raw.githubusercontent.com/ultimachine/ArduinoAddons/master/package_ultimachine_index.json
- Select Tools -> Boards -> Boards Manager and install the RAMBo board:
"RepRap Arduino-compatible Mother Board (RAMBo) by UltiMachine" - Close the IDE.
- Open the IDE and select RAMBo as target board from the Tools -> Boards submenu
-
Modify in
<path\arduino-1.8.5-windows\arduino-1.8.5\portable\packages\rambo\hardware\avr\1.0.1\platform.txt
the line
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections
to
compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,-u,vfprintf -lprintf_flt -lm -Wl,--gc-sections
- add or find and modify in
<path>\arduino-1.8.5-windows\arduino-1.8.5\portable\preferences.txt
the lines
board=rambo
boardsmanager.additional.urls=https://raw.githubusercontent.com/ultimachine/ArduinoAddons/master/package_ultimachine_index.json
build.path=<path>\arduino-1.8.5-windows\arduino-1.8.5\portable\output
build.verbose=true
....
compiler.cache_core=false
...
serial.stopbits=1
sketchbook.path=<path>\arduino-1.8.5-windows\arduino-1.8.5\portable\sketchbook\libraries
software=ARDUINO
- made some changes to the language sh scripts
- /lang/config.sh
# Arduino main folder:
export ARDUINO=<path>/arduino-1.8.5-windows/arduino-1.8.5
...
# Output folder:
export OUTDIR="<path>/arduino-1.8.5-windows/arduino-1.8.5/portable/output"
This matches the exclusive Prusa IDE 1.8.5 paths with the language sh scripts.
- Notepad++ https://notepad-plus-plus.org/ Great tool to edit and compare single files (Compare Plugin)
- Winmerge http://winmerge.org/?lang=en I use it all the time to compare different versions of development folders and files
- Git-scm https://git-scm.com/downloads
- You can either clone the prusa3d/Prusa-Firmware repository to a local directory or download the ZIP file from https://github.com/prusa3d/Prusa-Firmware
- Specific released versions of source code in either .zip or .tar.gz packages can be found here: https://github.com/prusa3d/Prusa-Firmware/releases
- In the subdirectory
"Firmware/variants/"
select the configuration file (.h
) corresponding to your printer model, make copy named"Configuration_prusa.h"
(or make simple renaming) and copy it into"Firmware/"
directory. - If you gonna compile the firmware just in english set
LANG_MODE to 0
in file"Firmware/config.h"
(this is now default). - After testing your own firmware and it works fine, change in
"Configuration.h"
following things to get rid of LCD warnings and user interactions when connecting via USB/Octoprint:- Change
#define FW_DEV_VERSION FW_VERSION_UNKNOWN
to at least#define FW_DEV_VERSION FW_VERSION_RC
or if you 100% sure to#define FW_DEV_VERSION FW_VERSION_GOLD
- Change
#define FW_REPOSITORY "Unknown"
to#define FW_REPOSITORY "Prusa3d"
- Change
- Open exclusive Prusa-Firmware Arduino 1.8.5
- Load the firmware project with File -> Open... Navigate to and open:
Prusa-Firmware/Firmware/Firmware.ino
- Make sure that you selected the
"RAMBo"
board under Tools -> Board -> RAMBo - Compile the firmware with Sketch -> Verify/Compile (CTRL-R) --or--
- Export the compiled binary with Sketch -> Export compiled Binary (CTRL-ALT-S).
You will find the exported binary inPrusa-Firmware/Firmware/Firmware.ino.rambo.hex
- If you have your printer connected to your computer and compiled your Prusa-Firmware successfully you can upload the "single language" Firmware directly from Arduino IDE 1.8.5. Don't try this if you have multiple languages activeated
- Check under Tools -> Board: that you have chosen the
RAMBo
- Choose the correct
COM port
under Tools -> Port: - Upload your Prusa-Firmware via Sketch -> Upload (CTRL-U)
- Check under Tools -> Board: that you have chosen the
- You also can upload your exported
.hex
files via Slic3rPE or Prusa Flash tool if it is "single language" version. - If you have a multiple language version you need to use Slic3rPE to upload the compiled firmware