RepRapFirmware (often shortened to RRF) is an open-source, 32-bit motion control firmware that runs directly on a printer controller board and turns G-code into coordinated stepper motion, heater control and sensor handling. Within 3D printer hardware, it is the native firmware of the Duet family of controller boards and an alternative to Marlin and Klipper for machines ranging from small Cartesian printers to large delta, CoreXY and tool-changing systems.
Its defining traits are configuration through plain G-code files instead of recompilation, a built-in web interface, and a scripting layer that lets builders write conditional macros. These features make RRF popular with builders of custom and industrial-style machines who want deep control without maintaining a source code fork.
How RepRapFirmware controls a printer
RepRapFirmware works as a real-time controller running on the mainboard itself: it parses G-code, plans motion, generates step pulses and runs closed-loop heater control on one 32-bit ARM microcontroller. Since version 3, it uses a real-time operating system (FreeRTOS) to separate time-critical tasks such as step generation from communication and file handling.
The motion system uses a look-ahead planner that joins consecutive moves, limits speed changes at corners with jerk (instantaneous speed change) settings, and calculates acceleration for each axis according to the active kinematics model. Step timing is computed on the board, so the firmware does not depend on a host computer for motion, which is the key architectural difference from Klipper.
At startup the firmware reads config.g from the SD card and executes it line by line. This file defines axes, steps per millimeter, motor currents, heaters, thermistors, fans, endstops and probes. Separate system macros such as homeall.g, bed.g, pause.g and tfree0.g run automatically when the matching event occurs.
The table below lists the main building blocks of a typical RRF installation and what each one does.
| Component | Location | Role |
|---|---|---|
| Firmware binary | Controller flash memory | Motion planning, step generation, heater control |
| config.g | SD card, sys folder | Defines machine hardware at every boot |
| System macros | SD card, sys folder | Homing, bed leveling, pause, tool changes |
| Duet Web Control | Served by the board or a single-board computer | Browser interface for control and file upload |
| Object model | Firmware memory | Live machine state readable by macros and clients |
Supported boards and operating modes
RepRapFirmware is developed primarily for Duet3D controller boards, and official releases target those boards first. Community ports extend it to selected LPC1768 and STM32 boards, although feature coverage and support on those ports depend on volunteer maintainers rather than the main project.
Duet 3 boards can run in standalone mode, where the board serves the web interface itself, or in SBC mode, where an attached Raspberry Pi runs the Duet Software Framework and handles files and networking while the board still performs all real-time motion. Duet 3 also uses a CAN-FD bus to connect expansion boards and toolboards, which lets a machine distribute motors, heaters and sensors across several boards.
The following table compares the main hardware generations that run RRF.
| Platform | Microcontroller class | Typical use |
|---|---|---|
| Duet 2 WiFi and Ethernet | SAM4E, 32-bit ARM Cortex-M4 | Hobby and prosumer printers, legacy machines |
| Duet 3 Mini 5+ | SAME5x, ARM Cortex-M4F | Compact single-board printers |
| Duet 3 Mainboard 6HC | SAME70, ARM Cortex-M7 | Large printers, tool changers, CAN expansion |
| Duet 3 Mainboard 6XD | SAME70, ARM Cortex-M7 | External drivers and closed-loop servo motors |
| Community ports | LPC1768 or STM32 | Low-cost boards with partial feature support |
Key features of RRF
The feature set of RepRapFirmware targets precise motion and flexible automation. Kinematics are selected at run time with the M669 command, so a single binary supports Cartesian, CoreXY, CoreXZ, delta, SCARA, polar and Hangprinter geometries without recompiling.
- Conditional G-code and meta commands such as
if,while,varandglobalallow macros that react to sensor values and machine state. - Input shaping with
M593reduces ringing by filtering commanded motion at the resonant frequency of the frame. - Pressure advance with
M572compensates for melt pressure lag in the extruder. - Mesh bed compensation with
G29andM557corrects an uneven bed using a bed probe. - Heater fault detection and model-based tuning with
M303provide thermal runaway protection. - Stall detection with Trinamic stepper drivers enables sensorless homing on supported boards.
These capabilities overlap with other firmware, but RRF exposes them through documented G-code commands that can be changed live from the console. A builder can test a new motor current or acceleration limit immediately and then copy the working line into config.g.
RepRapFirmware compared with Marlin and Klipper
RepRapFirmware, Marlin and Klipper solve the same problem with different architectures. Marlin is compiled with machine settings baked into the binary, Klipper offloads planning to a host computer, and RRF keeps all real-time work on the board while reading its configuration from files.
The comparison below summarizes the practical differences that matter when choosing a firmware for a build.
| Aspect | RepRapFirmware | Marlin | Klipper |
|---|---|---|---|
| Configuration | G-code files on SD card | Compile-time headers | Text file on host |
| Motion planning | On the controller board | On the controller board | On a host computer |
| Host requirement | None, optional SBC | None | Required, often a Raspberry Pi |
| Web interface | Built in on networked boards | Requires OctoPrint or similar | Mainsail or Fluidd on host |
| Hardware range | Mainly Duet boards | Very wide, including 8-bit | Very wide, many MCUs |
| Scripting | Conditional G-code, object model | Limited macros | Jinja2 templates in macros |
The main trade-off is hardware choice versus integration. RRF offers a tightly integrated and well-documented experience, but it effectively ties a builder to Duet-class hardware, which costs more than generic boards supported by Marlin or Klipper.
Configuring and updating RepRapFirmware
A new RRF machine is usually configured with the online configuration tool published for Duet boards, which generates a starting config.g and homing macros from a form. The builder then refines values such as steps per millimeter, motor current and thermistor coefficients by editing the files in Duet Web Control.
Firmware updates are performed by uploading the release archive through the web interface, which flashes the main board and, on Duet 3, any connected CAN expansion boards. Because major versions change command syntax, builders should read the upgrade notes before moving between major releases, for example from RRF 2 to RRF 3.
The decision table below shows when RRF is a strong choice and when another firmware may suit a project better.
| Situation | Recommendation | Reason |
|---|---|---|
| Custom large-format or tool-changing printer | Choose RRF on Duet 3 | CAN expansion and conditional macros scale well |
| Budget printer with a stock 8-bit board | Use Marlin | RRF does not run on 8-bit controllers |
| Existing cheap 32-bit board, maximum speed | Consider Klipper | Host-based planning on inexpensive hardware |
| Machine without a host computer | RRF or Marlin | Both run fully on the board |
| Closed-loop servo or external drivers | RRF on a 6XD board | Designed for step and direction outputs |
Limitations and common mistakes
RepRapFirmware is robust, but most problems come from configuration errors rather than firmware bugs. The firmware executes config.g exactly as written, so a wrong drive mapping or missing axis definition produces confusing behavior later in the file.
- Copying configuration from another major version often fails silently because commands such as
M569andM950changed meaning in RRF 3. - Wrong thermistor parameters cause inaccurate temperatures and can trigger heater faults or poor extrusion.
- Skipping heater tuning leaves temperature oscillation that shows up as surface banding.
- Using community ports for production work can mean missing features and slower fixes.
- Ignoring the console output after boot hides warnings that point directly to the faulty line.
A practical habit is to run M98 P"config.g" after every edit and read every reported error before printing. This single step catches most mistakes before they affect hardware.
The idea in brief
RepRapFirmware is the software brain inside the printer’s control board. It reads printing instructions, moves the motors in step, keeps the nozzle and bed at the right temperature, and watches the sensors.
Its special strength is that settings live in simple text files, much like a recipe card that can be edited at any time. There is no need to rebuild the software to change a value. Owners also get a web page for controlling the printer from any browser on the network.
A practical scenario
A small engineering workshop builds a CoreXY printer with a 400 by 400 mm bed and four swappable tool heads for multi-material parts. The team chooses a Duet 3 Mainboard 6HC running RepRapFirmware, plus one CAN-connected toolboard on each tool head, so every head carries its own heater, fan and extruder motor with only a power and data cable to the frame.
Tool changes are written as conditional macros that check whether a tool is docked before moving, and input shaping set at about 45 Hz removes visible ringing at 8,000 mm/s² acceleration. When a heater cartridge later fails, the firmware detects the fault, stops the print safely and reports the affected tool. The outcome is a reliable machine that the team adjusts through the browser without recompiling anything.