-
Notifications
You must be signed in to change notification settings - Fork 541
Building RepRapFirmware
Important!
RepRapFirmware is built from several Github projects. You need to use compatible branches of these projects. Since RepRapFirmware v3.1.0, stable releases are tagged in github.
To build RepRapFirmware v3.1.1, use the following tags:
project | tag | notes |
---|---|---|
RepRapFirmware | 3.1.1 | |
CANlib | 3.1.0 | only needed for Duet 3 |
CoreNG | 3.1.0 | |
FreeRTOS | 3.1.0 | |
RRFLibraries | 3.1.0 | |
DuetWiFiSocketServer | not tagged, use master branch |
Note: CoreNG, FreeRTOS, RRFLibraries do not have v3.1.1 tags because the 3.1.0 tagged releases are the base for v3.1.1 (no changes in the dependencies, only in RepRapFirmware)
To build RepRapFirmware 3.2 from the latest development sources, use the following branches:
project | branch | notes |
---|---|---|
RepRapFirmware | v3.02-dev | |
CANlib | master | only needed for Duet 3 |
CoreNG | dev | not needed for Duet 3 Mini5+ |
CoreN2G | master | only needed for Duet 3 Mini5+ |
FreeRTOS | dev | |
RRFLibraries | dev | |
DuetWiFiSocketServer | dev |
To build RepRapFirmware 3.3 from the latest development sources, use the following branches:
project | branch | notes |
---|---|---|
RepRapFirmware | 3.3-dev | |
CANlib | 3.3-dev | only needed for Duet 3 |
CoreN2G | 3.3-dev | |
FreeRTOS | 3.3-dev | |
RRFLibraries | 3.3-dev | |
DuetWiFiSocketServer | dev |
To build RepRapFirmware 3.4beta from the latest development sources, use the following branches:
project | branch | notes |
---|---|---|
RepRapFirmware | 3.4-dev | |
CANlib | 3.4-dev | only needed for Duet 3 |
CoreN2G | 3.4-dev | |
FreeRTOS | 3.3-dev | |
RRFLibraries | 3.4-dev | |
DuetWiFiSocketServer | dev |
Building RepRapFirmware lately requires a tool called crc32appender
to be in
the user's PATH
as it will be called at the end of the compilating process. It
can be found as Golang source code in Tools/crc32appender
together with
pre-compiled binaries for Windows, Linux and MacOS x86-64.
-
Download and install the gcc cross-compiler from the ARM developer site:
- To build firmware version 3.3 use version 2020-q4-major
- To build firmware version 3.2 use version 2020-q2-update
- To build firmware version 2.03beta3 use version 2018-q4-major
- To build firmware version 2.01beta2 use version 2018-q2-update
- To build firmware version 1.20alpha3 use version 2017-q2-update
- To build firmware version 1.20alpha2 and earlier use version arm-none-eabi-4.8.3-2014q1
-
Download and install Eclipse IDE for C/C++ Developers version 2018-09. You do not need the Arduino add-on.
-
Download and install GNU Arm Eclipse. This provides versions of make.exe, rm.exe and other tools without the 8192-character command line limitation of some other versions.
-
Modify your PATH environment variable to include the
bin
folder of the GNU ARM Eclipse installation. -
Run
which rm
andwhich make
to make sure that rm and make will be fetched from that folder. -
In Eclipse create new workspace
C:/Eclipse/Firmware
. Then exit Eclipse. -
Download this github project as a zip file and unzip it into
C:/Eclipse/Firmware
. Then rename folderReprapFirmware-dev
in that folder toRepRapFirmware
. Alternately, change into the directoryC:/Eclipse/Firmware
in a Terminal and rungit clone https://github.com/Duet3D/ReprapFirmware.git -branch dev
-
Repeat the previous step for github project CoreNG. The folder name should be left as CoreNG (or renamed from CoreNG-dev to CoreNG if you downloaded a dev build).
-
If you want to build version 1.19 or later of the Duet WiFi build of RepRapFirmware then you also need to download and add project DuetWiFiSocketServer. Alternatively, just download file
src/include/MessageFormats.h
from that project and put it somewhere on the include path for RepRapFirmware. -
If you want to build a RTOS-enabled configuration of the v2-dev branch, also download project FreeRTOS from my github repo and add that project to the workspace.
-
If you want to build firmware versions later than 2.02RC1, also download and project RRFLibraries from my github repo and add that project to the workspace.
-
Load Eclipse and tell it to import the CoreNG or CoreN2G (as appropriate) and RepRapFirmware projects, also CANlib, FreeRTOS, DuetWiFiSocketServer and RRFLibraries if you have included them.
-
The build depends on the Eclipse workspace variable ArmGccPath being set to the directory where your arm-none-eabi-g++ compiler resides. For example
C:\Program Files (x86)\GNU Tools ARM Embedded\7 2018-q2-update\bin
on Windows. To set it, go to Windows -> Preferences -> C/C++ -> Build -> Build Variables and click "Add..." -
Build dependencies:
- Duet3 Mini builds depend on CoreN2G, FreeRTOS, and RRFLibraries. They also require DuetWifiSocketServer, as outlined above.
- Duet3 builds depend on CANlib, CoreNG, FreeRTOS, and RRFLibraries.
- Duet2 builds depend on CoreNG, FreeRTOS, and RRFLibraries. They also require DuetWifiSocketServer, as outlined above.
- Duet Maestro builds depend on CoreNG, FreeRTOS, and RRFLibraries.
- Duet085 builds (also running on Duet06) depend on CoreNG and RRFLibraries. Note: Duet085 does not run RepRapFirmware 2 or later, the last official build is v1.26.
-
Build configurations
Board Project Build Configuation Duet3 Mini (Wifi and Ethernet) CoreN2G SAME5X_RTOS FreeRTOS SAME51 RRFLibraries SAME51_RTOS RepRapFirmware Duet_5LC Duet3 CANlib SAME70_RTOS CoreNG or CoreN2G SAME70 FreeRTOS SAME70 RRFLibraries SAME70_RTOS RepRapFirmware Duet3_V06 Duet2 (DuetWifi and Duet Ethernet) CoreNG or CoreN2G SAM4E8E FreeRTOS SAM4E RRFLibraries SAM4E_RTOS RepRapFirmware Duet2_RTOS (or just Duet2 in version 3.2 and later) Duet Maestro CoreNG or CoreN2G SAM4S FreeRTOS SAM4S RRFLibraries SAM4S_RTOS RepRapFirmware DuetMaestro Duet085 (Duet0.85 and Duet0.6) Note: Needs v1.20 tags CoreNG SAM3X8E RRFLibraries SAM3X RepRapFirmware Duet085 -
Build order:
- CoreNG or CoreN2G (as appropriate)
- FreeRTOS
- RRFLibraries
- CANlib (if needed)
- Build RepRapFirmware
Note: you do not need to build the DuetWiFiSocketServer project, but it does need to be in the workspace because the RepRapFirmware project uses one of its include fies.
Using Homebrew-Cask makes it very easy to install new software on macOS: https://caskroom.github.io/
- Download and install the gcc-arm-embedded: brew cask install gcc-arm-embedded
- Download and install Eclipse for C++ : brew cask install eclipse-cpp
- Download or clone the RepRapFirmware, CoreNG or CoreN2G (as appropriate), FreeRTOS, RRFLibraries and DuetWiFiSocketServer projects into your workspace. Keep the folder names as is.
- Open Eclipse and import RepRapFirmware, FreeRTOS, RRFLibraries and CoreNG or CoreN2G projects using File -> Open Projects from File System.
- The build depends on the Eclipse workspace variable ArmGccPath being set
to the directory where your
arm-none-eabi-g++
compiler resides. To set it, go to Windows -> Preferences -> C/C++ -> Build -> Build Variables and click "Add..." - Build CoreNG or CoreN2G, FreeRTOS and RRFLibraries first, then RepRapFirmware. See the instructions for Windows (above), step 14ff, for the dependencies and configurations needed.
See this forum post.