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 - assigning a specific use to each pin.
Several files in the Marlin source code provide hardware support, but the core files supporting 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.hfiles contain the pin definitions for each board.
If you’re making a custom Arduino-based board, try to use standard RAMPS 1.4 pinouts as much as possible, or choose a pin-mapping similar to some other board that Marlin supports. The more that a new board resembles an existing board, the easier it will be to integrate.
When bulding Marlin, specify the main driver board by changing the line
#define MOTHERBOARD BOARD_RAMPS_EFB in
Configuration.h to one of the board IDs from the table below: