#define THIS_IS_DISABLED // this switch is disabled #define OPTION_VALUE 22 // this setting is '22' #define THIS_IS_ENABLED // this switch is enabled Settings can be enabled, disabled, and assigned values using C preprocessor syntax like so:
A build of Marlin can range from 50K to over 230K in size. This results in the smallest possible binary. This allows Marlin to leverage the C++ preprocessor and include only the code and data needed for the enabled options. Marlin is configured using C++ compiler directives. Hundreds of user-donated configurations are posted at the Configurations repository to get you started. Simply edit or replace these files, then build and upload Marlin to the board. h files contain all of Marlin’s build-time configuration options. See the Configuration with INI page for more information. config.ini may be included to modify the configuration at the start of a build.Configuration_adv.h serves up more detailed customization options, add-ons, experimental features, and other esoterica.Configuration.h contains the core settings for the hardware, language and controller selection, and settings for the most common features and components.Marlin is a huge C++ program composed of many files, but here we’ll only be talking about the two files that contain all of Marlin’s compile-time configuration options: M306: Model predictive temperature control.