Marlin supports a wide variety of 3D printers, including all RAMPS variants, and is adaptable to virtually any Arduino/Genuino-based electronics through pin-mapping - associating pins with their functions. With the addition of a hardware abstraction layer, Marlin 1.2 will address an even wider variety of boards.
Several files in the Marlin source code provide hardware support, but the files supporting the core electronics are:
boards.hContains the full list of boards supported by Marlin. Set
MOTHERBOARDto one of the boards listed here.
pins.hManages pin definitions, including the appropriate
pins_BOARD.hfile for the specified
pins_BOARDNAME.hEach of these files contains the pin definitions for a single board. Some pins files form the basis for other pins files, most notably
If you’re developing a custom Arduino-based board, try to use standard RAMPS 1.4 pinouts as much as possible, or choose a pin-mapping similar to another board Marlin supports. The more a new board resembles an existing board, the easier it will be to integrate.
To build Marlin for a specific board, set the
MOTHERBOARD option in
Configuration.h. See below for a complete list of boards supported in the latest version of Marlin. This example selects a RAMPS 1.4 board with the 12V power MOSFET connectors arranged in Extruder, Fan, Bed (EFB) order:
#define MOTHERBOARD BOARD_RAMPS_EFB