Prusa MINI Firmware overview
|
Go to the documentation of this file.
33 #if __cplusplus < 201103L
34 #error "Marlin requires C++11 support (gcc >= 4.7, Arduino IDE >= 1.6.8). Please upgrade your toolchain."
43 #define HEXIFY(H) _CAT(0x,H)
44 #if !defined(CONFIGURATION_H_VERSION) || HEXIFY(CONFIGURATION_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_H_VERSION)
45 #error "You are using an old Configuration.h file, update it before building Marlin."
48 #if !defined(CONFIGURATION_ADV_H_VERSION) || HEXIFY(CONFIGURATION_ADV_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_ADV_H_VERSION)
49 #error "You are using an old Configuration_adv.h file, update it before building Marlin."
57 #error "MOTHERBOARD is required. Please update your configuration."
58 #elif !defined(X_BED_SIZE) || !defined(Y_BED_SIZE)
59 #error "X_BED_SIZE and Y_BED_SIZE are now required! Please update your configuration."
60 #elif WATCH_TEMP_PERIOD > 500
61 #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds."
62 #elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD))
63 #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS."
64 #elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD)
65 #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED."
66 #elif (CORE_IS_XZ || CORE_IS_YZ) && ENABLED(Z_LATE_ENABLE)
67 #error "Z_LATE_ENABLE can't be used with COREXZ, COREZX, COREYZ, or COREZY."
68 #elif defined(X_HOME_RETRACT_MM)
69 #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
70 #elif defined(SDCARDDETECTINVERTED)
71 #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
72 #elif defined(BTENABLED)
73 #error "BTENABLED is now BLUETOOTH. Please update your configuration."
74 #elif defined(CUSTOM_MENDEL_NAME)
75 #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration."
76 #elif defined(HAS_AUTOMATIC_VERSIONING)
77 #error "HAS_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE. Please update your configuration."
78 #elif defined(USE_AUTOMATIC_VERSIONING)
79 #error "USE_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE. Please update your configuration."
81 #error "SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead."
82 #elif defined(SDEXTRASLOW)
83 #error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead."
84 #elif defined(FILAMENT_SENSOR)
85 #error "FILAMENT_SENSOR is now FILAMENT_WIDTH_SENSOR. Please update your configuration."
86 #elif defined(ENDSTOPPULLUP_FIL_RUNOUT)
87 #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP. Please update your configuration."
88 #elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
89 #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
90 #elif defined(LANGUAGE_INCLUDE)
91 #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration."
92 #elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y)
93 #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead."
94 #elif defined(PID_PARAMS_PER_EXTRUDER)
95 #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead."
96 #elif defined(EXTRUDER_WATTS) || defined(BED_WATTS)
97 #error "EXTRUDER_WATTS and BED_WATTS are deprecated. Remove them from your configuration."
98 #elif defined(SERVO_ENDSTOP_ANGLES)
99 #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead."
100 #elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR)
101 #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
102 #elif defined(Z_ENDSTOP_SERVO_NR)
103 #error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR. Please update your configuration."
104 #elif defined(DEFAULT_XYJERK)
105 #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead."
106 #elif defined(XY_TRAVEL_SPEED)
107 #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead."
108 #elif defined(PROBE_SERVO_DEACTIVATION_DELAY)
109 #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead."
110 #elif defined(SERVO_DEACTIVATION_DELAY)
111 #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead."
112 #elif ENABLED(FILAMENTCHANGEENABLE)
113 #error "FILAMENTCHANGEENABLE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
114 #elif ENABLED(FILAMENT_CHANGE_FEATURE)
115 #error "FILAMENT_CHANGE_FEATURE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
116 #elif defined(FILAMENT_CHANGE_X_POS) || defined(FILAMENT_CHANGE_Y_POS)
117 #error "FILAMENT_CHANGE_[XY]_POS is now set with NOZZLE_PARK_POINT. Please update your configuration."
118 #elif defined(FILAMENT_CHANGE_Z_ADD)
119 #error "FILAMENT_CHANGE_Z_ADD is now set with NOZZLE_PARK_POINT. Please update your configuration."
120 #elif defined(FILAMENT_CHANGE_XY_FEEDRATE)
121 #error "FILAMENT_CHANGE_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE. Please update your configuration."
122 #elif defined(FILAMENT_CHANGE_Z_FEEDRATE)
123 #error "FILAMENT_CHANGE_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE. Please update your configuration."
124 #elif defined(PAUSE_PARK_X_POS) || defined(PAUSE_PARK_Y_POS)
125 #error "PAUSE_PARK_[XY]_POS is now set with NOZZLE_PARK_POINT. Please update your configuration."
126 #elif defined(PAUSE_PARK_Z_ADD)
127 #error "PAUSE_PARK_Z_ADD is now set with NOZZLE_PARK_POINT. Please update your configuration."
128 #elif defined(PAUSE_PARK_XY_FEEDRATE)
129 #error "PAUSE_PARK_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE. Please update your configuration."
130 #elif defined(PAUSE_PARK_Z_FEEDRATE)
131 #error "PAUSE_PARK_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE. Please update your configuration."
132 #elif defined(FILAMENT_CHANGE_RETRACT_FEEDRATE)
133 #error "FILAMENT_CHANGE_RETRACT_FEEDRATE is now PAUSE_PARK_RETRACT_FEEDRATE. Please update your configuration."
134 #elif defined(FILAMENT_CHANGE_RETRACT_LENGTH)
135 #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
136 #elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
137 #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
138 #elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE)
139 #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
140 #elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
141 #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
142 #elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH)
143 #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
144 #elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
145 #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
146 #elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
147 #error "FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS is now FILAMENT_CHANGE_ALERT_BEEPS. Please update your configuration."
148 #elif defined(FILAMENT_CHANGE_NO_STEPPER_TIMEOUT)
149 #error "FILAMENT_CHANGE_NO_STEPPER_TIMEOUT is now PAUSE_PARK_NO_STEPPER_TIMEOUT. Please update your configuration."
150 #elif defined(PLA_PREHEAT_HOTEND_TEMP)
151 #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration."
152 #elif defined(PLA_PREHEAT_HPB_TEMP)
153 #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED. Please update your configuration."
154 #elif defined(PLA_PREHEAT_FAN_SPEED)
155 #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED. Please update your configuration."
156 #elif defined(ABS_PREHEAT_HOTEND_TEMP)
157 #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND. Please update your configuration."
158 #elif defined(ABS_PREHEAT_HPB_TEMP)
159 #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED. Please update your configuration."
160 #elif defined(ABS_PREHEAT_FAN_SPEED)
161 #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED. Please update your configuration."
162 #elif defined(ENDSTOPS_ONLY_FOR_HOMING)
163 #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead."
164 #elif defined(HOMING_FEEDRATE)
165 #error "HOMING_FEEDRATE is deprecated. Set individual rates with HOMING_FEEDRATE_(XY|Z|E) instead."
166 #elif defined(MANUAL_HOME_POSITIONS)
167 #error "MANUAL_HOME_POSITIONS is deprecated. Set MANUAL_[XYZ]_HOME_POS as-needed instead."
168 #elif defined(PID_ADD_EXTRUSION_RATE)
169 #error "PID_ADD_EXTRUSION_RATE is now PID_EXTRUSION_SCALING and is DISABLED by default. Are you sure you want to use this option? Please update your configuration."
170 #elif defined(Z_RAISE_BEFORE_HOMING)
171 #error "Z_RAISE_BEFORE_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
172 #elif defined(MIN_Z_HEIGHT_FOR_HOMING)
173 #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
174 #elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
175 #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead."
176 #elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS)
177 #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
178 #elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
179 #error "Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
180 #elif defined(MANUAL_BED_LEVELING)
181 #error "MANUAL_BED_LEVELING is now LCD_BED_LEVELING. Please update your configuration."
182 #elif defined(MESH_HOME_SEARCH_Z)
183 #error "MESH_HOME_SEARCH_Z is now LCD_PROBE_Z_RANGE. Please update your configuration."
184 #elif defined(MANUAL_PROBE_Z_RANGE)
185 #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE. Please update your configuration."
186 #elif !defined(MIN_STEPS_PER_SEGMENT)
187 #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h.
188 #elif MIN_STEPS_PER_SEGMENT <= 0
189 #error "MIN_STEPS_PER_SEGMENT must be at least 1. Please update your Configuration_adv.h."
190 #elif defined(PREVENT_DANGEROUS_EXTRUDE)
191 #error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION. Please update your configuration."
193 #error "SCARA is now MORGAN_SCARA. Please update your configuration."
194 #elif defined(ENABLE_AUTO_BED_LEVELING)
195 #error "ENABLE_AUTO_BED_LEVELING is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
196 #elif defined(AUTO_BED_LEVELING_FEATURE)
197 #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
198 #elif defined(ABL_GRID_POINTS)
199 #error "ABL_GRID_POINTS is now GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y. Please update your configuration."
200 #elif defined(ABL_GRID_POINTS_X) || defined(ABL_GRID_POINTS_Y)
201 #error "ABL_GRID_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
202 #elif defined(ABL_GRID_MAX_POINTS_X) || defined(ABL_GRID_MAX_POINTS_Y)
203 #error "ABL_GRID_MAX_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
204 #elif defined(MESH_NUM_X_POINTS) || defined(MESH_NUM_Y_POINTS)
205 #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
206 #elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS)
207 #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
208 #elif defined(UBL_G26_MESH_VALIDATION)
209 #error "UBL_G26_MESH_VALIDATION is now G26_MESH_VALIDATION. Please update your configuration."
210 #elif defined(UBL_MESH_EDIT_ENABLED)
211 #error "UBL_MESH_EDIT_ENABLED is now G26_MESH_VALIDATION. Please update your configuration."
212 #elif defined(UBL_MESH_EDITING)
213 #error "UBL_MESH_EDITING is now G26_MESH_VALIDATION. Please update your configuration."
214 #elif defined(BLTOUCH_HEATERS_OFF)
215 #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF. Please update your configuration."
216 #elif defined(BLTOUCH_V3)
217 #error "BLTOUCH_V3 is obsolete. Please update your configuration."
218 #elif defined(BLTOUCH_FORCE_OPEN_DRAIN_MODE)
219 #error "BLTOUCH_FORCE_OPEN_DRAIN_MODE is obsolete. Please update your configuration."
220 #elif defined(BEEPER)
221 #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
222 #elif defined(SDCARDDETECT)
223 #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions."
224 #elif defined(STAT_LED_RED) || defined(STAT_LED_BLUE)
225 #error "STAT_LED_RED/STAT_LED_BLUE are now STAT_LED_RED_PIN/STAT_LED_BLUE_PIN. Please update your pins definitions."
226 #elif defined(LCD_PIN_BL)
227 #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions."
228 #elif defined(LCD_PIN_RESET)
229 #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
230 #elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
231 #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
232 #elif defined(min_software_endstops) || defined(max_software_endstops)
233 #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
234 #elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)
235 #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
236 #elif defined(CONTROLLERFAN_PIN)
237 #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
238 #elif defined(MIN_RETRACT)
239 #error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
240 #elif defined(ADVANCE)
241 #error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE."
242 #elif defined(LIN_ADVANCE_E_D_RATIO)
243 #error "LIN_ADVANCE (1.5) no longer uses LIN_ADVANCE_E_D_RATIO. Check your configuration."
244 #elif defined(NEOPIXEL_RGBW_LED)
245 #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration."
246 #elif ENABLED(DELTA) && defined(DELTA_PROBEABLE_RADIUS)
247 #error "Remove DELTA_PROBEABLE_RADIUS and use MIN_PROBE_EDGE to inset the probe area instead."
248 #elif defined(UBL_MESH_INSET)
249 #error "UBL_MESH_INSET is now just MESH_INSET. Please update your configuration."
250 #elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X) || defined(UBL_MESH_MAX_Y)
251 #error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]. Please update your configuration."
252 #elif defined(ABL_PROBE_PT_1_X) || defined(ABL_PROBE_PT_1_Y) || defined(ABL_PROBE_PT_2_X) || defined(ABL_PROBE_PT_2_Y) || defined(ABL_PROBE_PT_3_X) || defined(ABL_PROBE_PT_3_Y)
253 #error "ABL_PROBE_PT_[123]_[XY] is no longer required. Please remove it from Configuration.h."
254 #elif defined(UBL_PROBE_PT_1_X) || defined(UBL_PROBE_PT_1_Y) || defined(UBL_PROBE_PT_2_X) || defined(UBL_PROBE_PT_2_Y) || defined(UBL_PROBE_PT_3_X) || defined(UBL_PROBE_PT_3_Y)
255 #error "UBL_PROBE_PT_[123]_[XY] is no longer required. Please remove it from Configuration.h."
256 #elif defined(LEFT_PROBE_BED_POSITION)
257 #error "LEFT_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_LEFT. Please update your configuration."
258 #elif defined(RIGHT_PROBE_BED_POSITION)
259 #error "RIGHT_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_RIGHT. Please update your configuration."
260 #elif defined(FRONT_PROBE_BED_POSITION)
261 #error "FRONT_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_FRONT. Please update your configuration."
262 #elif defined(BACK_PROBE_BED_POSITION)
263 #error "BACK_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_BACK. Please update your configuration."
264 #elif defined(ENABLE_MESH_EDIT_GFX_OVERLAY)
265 #error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY. Please update your configuration."
266 #elif defined(BABYSTEP_ZPROBE_GFX_REVERSE)
267 #error "BABYSTEP_ZPROBE_GFX_REVERSE is now set by OVERLAY_GFX_REVERSE. Please update your configurations."
268 #elif defined(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)
269 #error "UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN is now SEGMENT_LEVELED_MOVES. Please update your configuration."
270 #elif HAS_PID_HEATING && (defined(K1) || !defined(PID_K1))
271 #error "K1 is now PID_K1. Please update your configuration."
272 #elif defined(PROBE_DOUBLE_TOUCH)
273 #error "PROBE_DOUBLE_TOUCH is now MULTIPLE_PROBING. Please update your configuration."
274 #elif defined(ANET_KEYPAD_LCD)
275 #error "ANET_KEYPAD_LCD is now ZONESTAR_LCD. Please update your configuration."
276 #elif defined(LCD_I2C_SAINSMART_YWROBOT)
277 #error "LCD_I2C_SAINSMART_YWROBOT is now LCD_SAINSMART_I2C_(1602|2004). Please update your configuration."
278 #elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT)
279 #error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN. Please update your configuration."
280 #elif defined(HAVE_TMCDRIVER)
281 #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
282 #elif defined(STEALTHCHOP)
283 #error "STEALTHCHOP is now STEALTHCHOP_(XY|Z|E). Please update your Configuration_adv.h."
284 #elif defined(HAVE_TMC26X)
285 #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
286 #elif defined(HAVE_TMC2130)
287 #error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h."
288 #elif defined(HAVE_TMC2208)
289 #error "HAVE_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208. Please update your Configuration.h."
290 #elif defined(HAVE_L6470DRIVER)
291 #error "HAVE_L6470DRIVER is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h."
292 #elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) || defined(Z3_IS_TMC) \
293 || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) || defined(E5_IS_TMC)
294 #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
295 #elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) || defined(Z3_IS_TMC26X) \
296 || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X) || defined(E5_IS_TMC26X)
297 #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
298 #elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) || defined(Z3_IS_TMC2130) \
299 || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130) || defined(E5_IS_TMC2130)
300 #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h."
301 #elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) || defined(Z3_IS_TMC2208) \
302 || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208) || defined(E5_IS_TMC2208)
303 #error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208. Please update your Configuration.h."
304 #elif defined(X_IS_L6470) || defined(X2_IS_L6470) || defined(Y_IS_L6470) || defined(Y2_IS_L6470) || defined(Z_IS_L6470) || defined(Z2_IS_L6470) || defined(Z3_IS_L6470) \
305 || defined(E0_IS_L6470) || defined(E1_IS_L6470) || defined(E2_IS_L6470) || defined(E3_IS_L6470) || defined(E4_IS_L6470) || defined(E5_IS_L6470)
306 #error "[AXIS]_IS_L6470 is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h."
307 #elif defined(AUTOMATIC_CURRENT_CONTROL)
308 #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
309 #elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
310 #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH. Please update your configuration."
311 #elif ENABLED(LEVEL_BED_CORNERS) && !defined(LEVEL_CORNERS_INSET)
312 #error "LEVEL_BED_CORNERS requires a LEVEL_CORNERS_INSET value. Please update your Configuration.h."
313 #elif defined(BEZIER_JERK_CONTROL)
314 #error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION. Please update your configuration."
315 #elif DISABLED(CLASSIC_JERK) && defined(JUNCTION_DEVIATION_FACTOR)
316 #error "JUNCTION_DEVIATION_FACTOR is now JUNCTION_DEVIATION_MM. Please update your configuration."
317 #elif defined(JUNCTION_ACCELERATION_FACTOR)
318 #error "JUNCTION_ACCELERATION_FACTOR is obsolete. Delete it from Configuration_adv.h."
319 #elif defined(JUNCTION_ACCELERATION)
320 #error "JUNCTION_ACCELERATION is obsolete. Delete it from Configuration_adv.h."
321 #elif defined(MAX7219_DEBUG_STEPPER_HEAD)
322 #error "MAX7219_DEBUG_STEPPER_HEAD is now MAX7219_DEBUG_PLANNER_HEAD. Please update your configuration."
323 #elif defined(MAX7219_DEBUG_STEPPER_TAIL)
324 #error "MAX7219_DEBUG_STEPPER_TAIL is now MAX7219_DEBUG_PLANNER_TAIL. Please update your configuration."
325 #elif defined(MAX7219_DEBUG_STEPPER_QUEUE)
326 #error "MAX7219_DEBUG_STEPPER_QUEUE is now MAX7219_DEBUG_PLANNER_QUEUE. Please update your configuration."
327 #elif defined(ENDSTOP_NOISE_FILTER)
328 #error "ENDSTOP_NOISE_FILTER is now ENDSTOP_NOISE_THRESHOLD [2-7]. Please update your configuration."
329 #elif defined(RETRACT_ZLIFT)
330 #error "RETRACT_ZLIFT is now RETRACT_ZRAISE. Please update your Configuration_adv.h."
331 #elif defined(TOOLCHANGE_PARK_ZLIFT) || defined(TOOLCHANGE_UNPARK_ZLIFT)
332 #error "TOOLCHANGE_PARK_ZLIFT and TOOLCHANGE_UNPARK_ZLIFT are now TOOLCHANGE_ZRAISE. Please update your configuration."
333 #elif defined(SINGLENOZZLE_TOOLCHANGE_ZRAISE)
334 #error "SINGLENOZZLE_TOOLCHANGE_ZRAISE is now TOOLCHANGE_ZRAISE. Please update your configuration."
335 #elif defined(SINGLENOZZLE_SWAP_LENGTH)
336 #error "SINGLENOZZLE_SWAP_LENGTH is now TOOLCHANGE_FIL_SWAP_LENGTH. Please update your configuration."
337 #elif defined(SINGLENOZZLE_SWAP_RETRACT_SPEED)
338 #error "SINGLENOZZLE_SWAP_RETRACT_SPEED is now TOOLCHANGE_FIL_SWAP_RETRACT_SPEED. Please update your configuration."
339 #elif defined(SINGLENOZZLE_SWAP_PRIME_SPEED)
340 #error "SINGLENOZZLE_SWAP_PRIME_SPEED is now TOOLCHANGE_FIL_SWAP_PRIME_SPEED. Please update your configuration."
341 #elif defined(SINGLENOZZLE_SWAP_PARK)
342 #error "SINGLENOZZLE_SWAP_PARK is now TOOLCHANGE_PARK. Please update your configuration."
343 #elif defined(SINGLENOZZLE_TOOLCHANGE_XY)
344 #error "SINGLENOZZLE_TOOLCHANGE_XY is now TOOLCHANGE_PARK_XY. Please update your configuration."
345 #elif defined(SINGLENOZZLE_PARK_XY_FEEDRATE)
346 #error "SINGLENOZZLE_PARK_XY_FEEDRATE is now TOOLCHANGE_PARK_XY_FEEDRATE. Please update your configuration."
347 #elif defined(PARKING_EXTRUDER_SECURITY_RAISE)
348 #error "PARKING_EXTRUDER_SECURITY_RAISE is now TOOLCHANGE_ZRAISE. Please update your configuration."
349 #elif defined(SWITCHING_TOOLHEAD_SECURITY_RAISE)
350 #error "SWITCHING_TOOLHEAD_SECURITY_RAISE is now TOOLCHANGE_ZRAISE. Please update your configuration."
351 #elif defined(G0_FEEDRATE) && G0_FEEDRATE == 0
352 #error "G0_FEEDRATE is now used to set the G0 feedrate. Please update your configuration."
353 #elif defined(MBL_Z_STEP)
354 #error "MBL_Z_STEP is now MESH_EDIT_Z_STEP. Please update your configuration."
356 #error "CHDK is now CHDK_PIN. Please update your Configuration_adv.h."
357 #elif defined(MAX6675_SS)
358 #error "MAX6675_SS is now MAX6675_SS_PIN. Please update your configuration and/or pins."
359 #elif defined(MAX6675_SS2)
360 #error "MAX6675_SS2 is now MAX6675_SS2_PIN. Please update your configuration and/or pins."
361 #elif defined(SPINDLE_LASER_ENABLE)
362 #error "SPINDLE_LASER_ENABLE is now SPINDLE_FEATURE or LASER_FEATURE. Please update your Configuration_adv.h."
363 #elif defined(SPINDLE_LASER_ENABLE_PIN)
364 #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN. Please update your Configuration_adv.h and/or pins."
365 #elif defined(SPINDLE_DIR_CHANGE)
366 #error "SPINDLE_DIR_CHANGE is now SPINDLE_CHANGE_DIR. Please update your Configuration_adv.h."
367 #elif defined(SPINDLE_STOP_ON_DIR_CHANGE)
368 #error "SPINDLE_STOP_ON_DIR_CHANGE is now SPINDLE_CHANGE_DIR_STOP. Please update your Configuration_adv.h."
369 #elif defined(SPINDLE_LASER_ENABLE_INVERT)
370 #error "SPINDLE_LASER_ENABLE_INVERT is now SPINDLE_LASER_ACTIVE_HIGH. Please update your Configuration_adv.h."
371 #elif defined(CHAMBER_HEATER_PIN)
372 #error "CHAMBER_HEATER_PIN is now HEATER_CHAMBER_PIN. Please update your configuration and/or pins."
373 #elif defined(TMC_Z_CALIBRATION)
374 #error "TMC_Z_CALIBRATION has been deprecated in favor of Z_STEPPER_AUTO_ALIGN. Please update your configuration."
375 #elif defined(Z_MIN_PROBE_ENDSTOP)
376 #error "Z_MIN_PROBE_ENDSTOP is no longer required. Please remove it from Configuration.h."
377 #elif defined(DUAL_NOZZLE_DUPLICATION_MODE)
378 #error "DUAL_NOZZLE_DUPLICATION_MODE is now MULTI_NOZZLE_DUPLICATION. Please update your configuration."
379 #elif defined(MENU_ITEM_CASE_LIGHT)
380 #error "MENU_ITEM_CASE_LIGHT is now CASE_LIGHT_MENU. Please update your configuration."
381 #elif defined(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
382 #error "ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED is now SD_ABORT_ON_ENDSTOP_HIT. Please update your Configuration_adv.h."
383 #elif defined(LPC_SD_LCD) || defined(LPC_SD_ONBOARD) || defined(LPC_SD_CUSTOM_CABLE)
384 #error "LPC_SD_(LCD|ONBOARD|CUSTOM_CABLE) are now SDCARD_CONNECTION. Please update your Configuration_adv.h."
385 #elif defined(USB_SD_DISABLED)
386 #error "USB_SD_DISABLED is now NO_SD_HOST_DRIVE. Please update your Configuration_adv.h."
387 #elif defined(USB_SD_ONBOARD)
388 #error "USB_SD_ONBOARD is obsolete. Disable NO_SD_HOST_DRIVE instead."
389 #elif POWER_SUPPLY == 1
390 #error "Replace POWER_SUPPLY 1 by enabling PSU_CONTROL and setting PSU_ACTIVE_HIGH to 'false'."
391 #elif POWER_SUPPLY == 2
392 #error "Replace POWER_SUPPLY 2 by enabling PSU_CONTROL and setting PSU_ACTIVE_HIGH to 'true'."
393 #elif defined(POWER_SUPPLY)
394 #error "POWER_SUPPLY is now obsolete. Please remove it from Configuration.h."
395 #elif defined(MKS_ROBIN_TFT)
396 #error "MKS_ROBIN_TFT is now FSMC_GRAPHICAL_TFT. Please update your configuration."
397 #elif defined(SDPOWER)
398 #error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
399 #elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
400 #error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them from Configuration.h."
401 #elif defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_X)
402 #error "Z_PROBE_ALLEN_KEY_(DEPLOY|STOW) coordinates are now a single setting. Please update your configuration."
403 #elif defined(X_PROBE_OFFSET_FROM_EXTRUDER) || defined(Y_PROBE_OFFSET_FROM_EXTRUDER) || defined(Z_PROBE_OFFSET_FROM_EXTRUDER)
404 #error "[XYZ]_PROBE_OFFSET_FROM_EXTRUDER is now NOZZLE_TO_PROBE_OFFSET. Please update your configuration."
405 #elif defined(MIN_PROBE_X) || defined(MIN_PROBE_Y) || defined(MAX_PROBE_X) || defined(MAX_PROBE_Y)
406 #error "(MIN|MAX)_PROBE_[XY] are now calculated at runtime. Please remove them from Configuration.h."
407 #elif defined(Z_STEPPER_ALIGN_X) || defined(Z_STEPPER_ALIGN_X)
408 #error "Z_STEPPER_ALIGN_X and Z_STEPPER_ALIGN_Y are now combined as Z_STEPPER_ALIGN_XY. Please update your Configuration_adv.h."
409 #elif defined(JUNCTION_DEVIATION)
410 #error "JUNCTION_DEVIATION is no longer required. (See CLASSIC_JERK). Please remove it from Configuration.h."
413 #define BOARD_MKS_13 -1000
414 #define BOARD_TRIGORILLA -1001
415 #define BOARD_RURAMPS4D -1002
416 #define BOARD_FORMBOT_TREX2 -1003
417 #define BOARD_BIQU_SKR_V1_1 -1004
418 #define BOARD_STM32F1R -1005
419 #define BOARD_STM32F103R -1006
420 #define BOARD_ESP32 -1007
422 #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
424 #error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration."
426 #error "BOARD_RURAMPS4D has been renamed BOARD_RURAMPS4D_11. Please update your configuration."
427 #elif MB(FORMBOT_TREX2)
428 #error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration."
429 #elif MB(BIQU_SKR_V1_1)
430 #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BIGTREE_SKR_V1_1. Please update your configuration."
432 #error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
434 #error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
435 #elif MOTHERBOARD == BOARD_ESP32
436 #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
439 #undef BOARD_TRIGORILLA
440 #undef BOARD_RURAMPS4D
441 #undef BOARD_FORMBOT_TREX2
442 #undef BOARD_BIQU_SKR_V1_1
443 #undef BOARD_STM32F1R
444 #undef BOARD_STM32F103R
450 #ifndef SHORT_BUILD_VERSION
451 #error "SHORT_BUILD_VERSION must be specified."
452 #elif !defined(DETAILED_BUILD_VERSION)
453 #error "BUILD_VERSION must be specified."
454 #elif !defined(STRING_DISTRIBUTION_DATE)
455 #error "STRING_DISTRIBUTION_DATE must be specified."
456 #elif !defined(PROTOCOL_VERSION)
457 #error "PROTOCOL_VERSION must be specified."
458 #elif !defined(MACHINE_NAME)
459 #error "MACHINE_NAME must be specified."
460 #elif !defined(SOURCE_CODE_URL)
461 #error "SOURCE_CODE_URL must be specified."
462 #elif !defined(DEFAULT_MACHINE_UUID)
463 #error "DEFAULT_MACHINE_UUID must be specified."
464 #elif !defined(WEBSITE_URL)
465 #error "WEBSITE_URL must be specified."
471 #if !(defined(__AVR__) && defined(USBCON))
472 #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
473 #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
474 #elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
475 #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
476 #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
477 #error "TX_BUFFER_SIZE must be 0 or a power of 2 between 1 and 256."
479 #elif ANY(SERIAL_XON_XOFF, SERIAL_STATS_MAX_RX_QUEUED, SERIAL_STATS_DROPPED_RX)
480 #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
484 #error "Set SERIAL_PORT to the port on your board. Usually this is 0."
487 #if defined(SERIAL_PORT_2) && NUM_SERIAL < 2
488 #error "SERIAL_PORT_2 is not supported for your MOTHERBOARD. Disable it to continue."
494 #if BOTH(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE)
495 #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
496 #elif ENABLED(X_DUAL_STEPPER_DRIVERS) && !(HAS_X2_ENABLE && HAS_X2_STEP && HAS_X2_DIR)
497 #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)."
498 #elif ENABLED(Y_DUAL_STEPPER_DRIVERS) && !(HAS_Y2_ENABLE && HAS_Y2_STEP && HAS_Y2_DIR)
499 #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins (and an extra E plug)."
500 #elif ENABLED(Z_DUAL_STEPPER_DRIVERS)
501 #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
502 #error "Please select either Z_TRIPLE_STEPPER_DRIVERS or Z_DUAL_STEPPER_DRIVERS, not both."
503 #elif !(HAS_Z2_ENABLE && HAS_Z2_STEP && HAS_Z2_DIR)
504 #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."
506 #elif ENABLED(Z_TRIPLE_STEPPER_DRIVERS) && !(HAS_Z2_ENABLE && HAS_Z2_STEP && HAS_Z2_DIR && HAS_Z3_ENABLE && HAS_Z3_STEP && HAS_Z3_DIR)
507 #error "Z_TRIPLE_STEPPER_DRIVERS requires Z3 pins (and two extra E plugs)."
513 static_assert(
X_MAX_LENGTH >=
X_BED_SIZE,
"Movement bounds (X_MIN_POS, X_MAX_POS) are too narrow to contain X_BED_SIZE.");
514 static_assert(
Y_MAX_LENGTH >=
Y_BED_SIZE,
"Movement bounds (Y_MIN_POS, Y_MAX_POS) are too narrow to contain Y_BED_SIZE.");
519 #if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z)
521 #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
522 #elif NONE(MIN_SOFTWARE_ENDSTOP_X, MIN_SOFTWARE_ENDSTOP_Y)
523 #error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options."
527 #if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z)
529 #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
530 #elif NONE(MAX_SOFTWARE_ENDSTOP_X, MAX_SOFTWARE_ENDSTOP_Y)
531 #error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options."
535 #if !defined(TARGET_LPC1768) && ANY( \
537 ENDSTOPPULLDOWN_XMAX, ENDSTOPPULLDOWN_YMAX, \
538 ENDSTOPPULLDOWN_ZMAX, ENDSTOPPULLDOWN_XMIN, \
539 ENDSTOPPULLDOWN_YMIN, ENDSTOPPULLDOWN_ZMIN \
541 #error "PULLDOWN pin mode is not available on the selected board."
544 #if BOTH(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS)
545 #error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS."
546 #elif BOTH(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN)
547 #error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN."
548 #elif BOTH(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX)
549 #error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX."
550 #elif BOTH(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX)
551 #error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX."
552 #elif BOTH(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX)
553 #error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX."
554 #elif BOTH(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN)
555 #error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN."
556 #elif BOTH(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN)
557 #error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN."
558 #elif BOTH(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN)
559 #error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN."
565 #if LCD_INFO_SCREEN_STYLE > 0
566 #if HAS_GRAPHICAL_LCD || LCD_WIDTH < 20 || LCD_HEIGHT < 4
567 #error "Alternative LCD_INFO_SCREEN_STYLE requires 20x4 Character LCD."
568 #elif LCD_INFO_SCREEN_STYLE > 1
569 #error "LCD_INFO_SCREEN_STYLE only has options 0 and 1 at this time."
576 #if ENABLED(LCD_PROGRESS_BAR)
577 #if NONE(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
578 #error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY."
579 #elif !HAS_CHARACTER_LCD
580 #error "LCD_PROGRESS_BAR requires a character LCD."
581 #elif HAS_GRAPHICAL_LCD
582 #error "LCD_PROGRESS_BAR does not apply to graphical displays."
583 #elif ENABLED(FILAMENT_LCD_DISPLAY)
584 #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
585 #elif PROGRESS_MSG_EXPIRE < 0
586 #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0."
588 #elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && !HAS_GRAPHICAL_LCD && DISABLED(EXTENSIBLE_UI)
589 #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Graphical LCD, or EXTENSIBLE_UI."
592 #if !HAS_LCD_MENU && ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
593 #error "SD_REPRINT_LAST_SELECTED_FILE currently requires a Marlin-native LCD menu."
599 #if EITHER(SHOW_CUSTOM_BOOTSCREEN, CUSTOM_STATUS_SCREEN_IMAGE) && !HAS_GRAPHICAL_LCD
600 #error "Graphical LCD is required for SHOW_CUSTOM_BOOTSCREEN and CUSTOM_STATUS_SCREEN_IMAGE."
606 #if ENABLED(LIGHTWEIGHT_UI) && DISABLED(U8GLIB_ST7920)
607 #error "LIGHTWEIGHT_UI requires a U8GLIB_ST7920-based display."
613 #if ENABLED(SDCARD_SORT_ALPHA)
614 #if SDSORT_LIMIT > 256
615 #error "SDSORT_LIMIT must be 256 or smaller."
616 #elif SDSORT_LIMIT < 10
617 #error "SDSORT_LIMIT should be greater than 9 to be useful."
618 #elif DISABLED(SDSORT_USES_RAM)
619 #if ENABLED(SDSORT_DYNAMIC_RAM)
620 #error "SDSORT_DYNAMIC_RAM requires SDSORT_USES_RAM (which reads the directory into RAM)."
621 #elif ENABLED(SDSORT_CACHE_NAMES)
622 #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)."
626 #if ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
627 #if SDSORT_CACHE_VFATS < 2
628 #error "SDSORT_CACHE_VFATS must be 2 or greater!"
629 #elif SDSORT_CACHE_VFATS > MAX_VFAT_ENTRIES
630 #undef SDSORT_CACHE_VFATS
631 #define SDSORT_CACHE_VFATS MAX_VFAT_ENTRIES
632 #warning "SDSORT_CACHE_VFATS was reduced to MAX_VFAT_ENTRIES!"
637 #if defined(EVENT_GCODE_SD_STOP) && DISABLED(NOZZLE_PARK_FEATURE)
638 static_assert(
nullptr == strstr(EVENT_GCODE_SD_STOP,
"G27"),
"NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_STOP.");
644 #if ENABLED(I2C_POSITION_ENCODERS)
645 #if !BOTH(BABYSTEPPING, BABYSTEP_XY)
646 #error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY."
647 #elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5)
648 #error "I2CPE_ENCODER_CNT must be between 1 and 5."
655 #if ENABLED(BABYSTEPPING)
657 #error "BABYSTEPPING is not implemented for SCARA yet."
658 #elif BOTH(DELTA, BABYSTEP_XY)
659 #error "BABYSTEPPING only implemented for Z axis on deltabots."
660 #elif BOTH(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING)
661 #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination"
662 #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE
663 #error "BABYSTEP_ZPROBE_OFFSET requires a probe."
664 #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !HAS_GRAPHICAL_LCD
665 #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a Graphical LCD."
666 #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && DISABLED(BABYSTEP_ZPROBE_OFFSET)
667 #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
668 #elif ENABLED(BABYSTEP_HOTEND_Z_OFFSET) && !HAS_HOTEND_OFFSET
669 #error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS."
670 #elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
671 #error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible."
678 #if HAS_FILAMENT_SENSOR
679 #if !PIN_EXISTS(FIL_RUNOUT)
680 #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
681 #elif NUM_RUNOUT_SENSORS > E_STEPPERS
682 #error "NUM_RUNOUT_SENSORS cannot exceed the number of E steppers."
683 #elif NUM_RUNOUT_SENSORS > 1 && !PIN_EXISTS(FIL_RUNOUT2)
684 #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 1 requires FIL_RUNOUT2_PIN."
685 #elif NUM_RUNOUT_SENSORS > 2 && !PIN_EXISTS(FIL_RUNOUT3)
686 #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 2 requires FIL_RUNOUT3_PIN."
687 #elif NUM_RUNOUT_SENSORS > 3 && !PIN_EXISTS(FIL_RUNOUT4)
688 #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 3 requires FIL_RUNOUT4_PIN."
689 #elif NUM_RUNOUT_SENSORS > 4 && !PIN_EXISTS(FIL_RUNOUT5)
690 #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 4 requires FIL_RUNOUT5_PIN."
691 #elif NUM_RUNOUT_SENSORS > 5 && !PIN_EXISTS(FIL_RUNOUT6)
692 #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 5 requires FIL_RUNOUT6_PIN."
693 #elif NONE(SDSUPPORT, PRINTJOB_TIMER_AUTOSTART)
694 #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
695 #elif FILAMENT_RUNOUT_DISTANCE_MM < 0
696 #error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero."
697 #elif DISABLED(ADVANCED_PAUSE_FEATURE)
698 static_assert(
nullptr == strstr(FILAMENT_RUNOUT_SCRIPT,
"M600"),
"ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR.");
705 #if ENABLED(ADVANCED_PAUSE_FEATURE)
706 #if !HAS_RESUME_CONTINUE
707 #error "ADVANCED_PAUSE_FEATURE currently requires an LCD controller or EMERGENCY_PARSER."
708 #elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
709 #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
710 #elif ENABLED(PARK_HEAD_ON_PAUSE) && NONE(SDSUPPORT, NEWPANEL, EMERGENCY_PARSER)
711 #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
712 #elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
713 #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT."
714 #elif DISABLED(NOZZLE_PARK_FEATURE)
715 #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
716 #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
717 #error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
718 #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_SLOW_LOAD_LENGTH > EXTRUDE_MAXLENGTH
719 #error "FILAMENT_CHANGE_SLOW_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
720 #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_FAST_LOAD_LENGTH > EXTRUDE_MAXLENGTH
721 #error "FILAMENT_CHANGE_FAST_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
725 #if ENABLED(NOZZLE_PARK_FEATURE)
726 constexpr
float npp[] = NOZZLE_PARK_POINT;
727 static_assert(
COUNT(npp) ==
XYZ,
"NOZZLE_PARK_POINT requires X, Y, and Z values.");
733 #if BOTH(INDIVIDUAL_AXIS_HOMING_MENU, DELTA)
734 #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
743 #error "Marlin supports a maximum of 6 EXTRUDERS."
746 #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
747 #error "EXTRUDERS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT."
750 #if ENABLED(HEATERS_PARALLEL)
751 #error "EXTRUDERS must be 1 with HEATERS_PARALLEL."
754 #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
755 #ifndef TOOLCHANGE_FIL_SWAP_LENGTH
756 #error "TOOLCHANGE_FILAMENT_SWAP requires TOOLCHANGE_FIL_SWAP_LENGTH. Please update your Configuration."
757 #elif !defined(TOOLCHANGE_FIL_SWAP_RETRACT_SPEED)
758 #error "TOOLCHANGE_FILAMENT_SWAP requires TOOLCHANGE_FIL_SWAP_RETRACT_SPEED. Please update your Configuration."
759 #elif !defined(TOOLCHANGE_FIL_SWAP_PRIME_SPEED)
760 #error "TOOLCHANGE_FILAMENT_SWAP requires TOOLCHANGE_FIL_SWAP_PRIME_SPEED. Please update your Configuration."
763 #if ENABLED(TOOLCHANGE_PARK)
764 #ifndef TOOLCHANGE_PARK_XY
765 #error "TOOLCHANGE_PARK requires TOOLCHANGE_PARK_XY. Please update your Configuration."
766 #elif !defined(TOOLCHANGE_PARK_XY_FEEDRATE)
767 #error "TOOLCHANGE_PARK requires TOOLCHANGE_PARK_XY_FEEDRATE. Please update your Configuration."
771 #ifndef TOOLCHANGE_ZRAISE
772 #error "TOOLCHANGE_ZRAISE required for EXTRUDERS > 1. Please update your Configuration_adv.h."
775 #elif ENABLED(MK2_MULTIPLEXER)
776 #error "MK2_MULTIPLEXER requires 2 or more EXTRUDERS."
777 #elif ENABLED(SINGLENOZZLE)
778 #error "SINGLENOZZLE requires 2 or more EXTRUDERS."
785 #error "SNMM is now MK2_MULTIPLEXER. Please update your configuration."
791 #if ENABLED(SWITCHING_NOZZLE)
792 #if ENABLED(DUAL_X_CARRIAGE)
793 #error "SWITCHING_NOZZLE and DUAL_X_CARRIAGE are incompatible."
794 #elif ENABLED(SINGLENOZZLE)
795 #error "SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
797 #error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
799 #error "SWITCHING_NOZZLE requires NUM_SERVOS >= 1."
802 #ifndef SWITCHING_NOZZLE_SERVO_NR
803 #error "SWITCHING_NOZZLE requires SWITCHING_NOZZLE_SERVO_NR."
804 #elif SWITCHING_NOZZLE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
805 #error "SERVO0_PIN must be defined for your SWITCHING_NOZZLE."
806 #elif SWITCHING_NOZZLE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
807 #error "SERVO1_PIN must be defined for your SWITCHING_NOZZLE."
808 #elif SWITCHING_NOZZLE_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
809 #error "SERVO2_PIN must be defined for your SWITCHING_NOZZLE."
810 #elif SWITCHING_NOZZLE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
811 #error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
814 #ifdef SWITCHING_NOZZLE_E1_SERVO_NR
815 #if SWITCHING_NOZZLE_E1_SERVO_NR == SWITCHING_NOZZLE_SERVO_NR
816 #error "SWITCHING_NOZZLE_E1_SERVO_NR must be different from SWITCHING_NOZZLE_SERVO_NR."
817 #elif SWITCHING_NOZZLE_E1_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
818 #error "SERVO0_PIN must be defined for your SWITCHING_NOZZLE."
819 #elif SWITCHING_NOZZLE_E1_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
820 #error "SERVO1_PIN must be defined for your SWITCHING_NOZZLE."
821 #elif SWITCHING_NOZZLE_E1_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
822 #error "SERVO2_PIN must be defined for your SWITCHING_NOZZLE."
823 #elif SWITCHING_NOZZLE_E1_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
824 #error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
832 #if ENABLED(SWITCHING_EXTRUDER)
834 #error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1."
835 #elif SWITCHING_EXTRUDER_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
836 #error "SERVO0_PIN must be defined for your SWITCHING_EXTRUDER."
837 #elif SWITCHING_EXTRUDER_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
838 #error "SERVO1_PIN must be defined for your SWITCHING_EXTRUDER."
839 #elif SWITCHING_EXTRUDER_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
840 #error "SERVO2_PIN must be defined for your SWITCHING_EXTRUDER."
841 #elif SWITCHING_EXTRUDER_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
842 #error "SERVO3_PIN must be defined for your SWITCHING_EXTRUDER."
846 #error "SWITCHING_EXTRUDER with 4 extruders requires NUM_SERVOS >= 2."
847 #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
848 #error "SERVO0_PIN must be defined for your SWITCHING_EXTRUDER."
849 #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
850 #error "SERVO1_PIN must be defined for your SWITCHING_EXTRUDER."
851 #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
852 #error "SERVO2_PIN must be defined for your SWITCHING_EXTRUDER."
853 #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
854 #error "SERVO3_PIN must be defined for your SWITCHING_EXTRUDER."
855 #elif SWITCHING_EXTRUDER_E23_SERVO_NR == SWITCHING_EXTRUDER_SERVO_NR
856 #error "SWITCHING_EXTRUDER_E23_SERVO_NR should be a different extruder from SWITCHING_EXTRUDER_SERVO_NR."
864 #if ENABLED(MIXING_EXTRUDER)
866 #error "For MIXING_EXTRUDER set MIXING_STEPPERS > 1 instead of EXTRUDERS > 1."
867 #elif MIXING_STEPPERS < 2
868 #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
869 #elif ENABLED(FILAMENT_SENSOR)
870 #error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway."
871 #elif ENABLED(SWITCHING_EXTRUDER)
872 #error "Please select either MIXING_EXTRUDER or SWITCHING_EXTRUDER, not both."
873 #elif ENABLED(SINGLENOZZLE)
874 #error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE."
881 #if ENABLED(LIN_ADVANCE)
883 WITHIN(LIN_ADVANCE_K, 0, 10),
884 "LIN_ADVANCE_K must be a value from 0 to 10 (Changed in LIN_ADVANCE v1.5, Marlin 1.1.9)."
892 + ENABLED(SINGLENOZZLE) \
893 + ENABLED(DUAL_X_CARRIAGE) \
894 + ENABLED(PARKING_EXTRUDER) \
895 + ENABLED(MAGNETIC_PARKING_EXTRUDER) \
896 + ENABLED(SWITCHING_TOOLHEAD) \
897 + ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) \
898 + ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
899 #error "Please select only one of SINGLENOZZLE, DUAL_X_CARRIAGE, PARKING_EXTRUDER, SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, or ELECTROMAGNETIC_SWITCHING_TOOLHEAD."
905 #if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
906 #if ENABLED(EXT_SOLENOID)
907 #error "(MAGNETIC_)PARKING_EXTRUDER and EXT_SOLENOID are incompatible. (Pins are used twice.)"
909 #error "(MAGNETIC_)PARKING_EXTRUDER requires exactly 2 EXTRUDERS."
910 #elif !defined(PARKING_EXTRUDER_PARKING_X)
911 #error "(MAGNETIC_)PARKING_EXTRUDER requires PARKING_EXTRUDER_PARKING_X."
912 #elif !defined(TOOLCHANGE_ZRAISE)
913 #error "(MAGNETIC_)PARKING_EXTRUDER requires TOOLCHANGE_ZRAISE."
914 #elif TOOLCHANGE_ZRAISE < 0
915 #error "TOOLCHANGE_ZRAISE must be 0 or higher."
916 #elif ENABLED(PARKING_EXTRUDER)
917 #if !PIN_EXISTS(SOL0, SOL1)
918 #error "PARKING_EXTRUDER requires SOL0_PIN and SOL1_PIN."
919 #elif !defined(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE) || !WITHIN(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE, LOW, HIGH)
920 #error "PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE must be defined as HIGH or LOW."
921 #elif !defined(PARKING_EXTRUDER_SOLENOIDS_DELAY) || !WITHIN(PARKING_EXTRUDER_SOLENOIDS_DELAY, 0, 2000)
922 #error "PARKING_EXTRUDER_SOLENOIDS_DELAY must be between 0 and 2000 (ms)."
930 #if ENABLED(SWITCHING_TOOLHEAD)
931 #ifndef SWITCHING_TOOLHEAD_SERVO_NR
932 #error "SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_SERVO_NR."
934 #error "SWITCHING_TOOLHEAD requires at least 2 EXTRUDERS."
935 #elif NUM_SERVOS < (SWITCHING_TOOLHEAD_SERVO_NR - 1)
936 #if SWITCHING_TOOLHEAD_SERVO_NR == 0
937 #error "A SWITCHING_TOOLHEAD_SERVO_NR of 0 requires NUM_SERVOS >= 1."
938 #elif SWITCHING_TOOLHEAD_SERVO_NR == 1
939 #error "A SWITCHING_TOOLHEAD_SERVO_NR of 1 requires NUM_SERVOS >= 2."
940 #elif SWITCHING_TOOLHEAD_SERVO_NR == 2
941 #error "A SWITCHING_TOOLHEAD_SERVO_NR of 2 requires NUM_SERVOS >= 3."
942 #elif SWITCHING_TOOLHEAD_SERVO_NR == 3
943 #error "A SWITCHING_TOOLHEAD_SERVO_NR of 3 requires NUM_SERVOS >= 4."
945 #elif !defined(TOOLCHANGE_ZRAISE)
946 #error "SWITCHING_TOOLHEAD requires TOOLCHANGE_ZRAISE."
947 #elif TOOLCHANGE_ZRAISE < 0
948 #error "TOOLCHANGE_ZRAISE must be 0 or higher."
955 #if EITHER(MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
956 #ifndef SWITCHING_TOOLHEAD_Y_POS
957 #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_POS"
958 #elif !defined(SWITCHING_TOOLHEAD_X_POS)
959 #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_X_POS"
960 #elif !defined(SWITCHING_TOOLHEAD_Z_HOP)
961 #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Z_HOP."
962 #elif !defined(SWITCHING_TOOLHEAD_Y_CLEAR)
963 #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_CLEAR."
964 #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
965 #if ENABLED(EXT_SOLENOID)
966 #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD and EXT_SOLENOID are incompatible. (Pins are used twice.)"
967 #elif !PIN_EXISTS(SOL0)
968 #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SOL0_PIN."
976 #if PIN_EXISTS(FANMUX1)
978 #error "FANMUX0_PIN must be set before FANMUX1_PIN can be set."
980 #elif PIN_EXISTS(FANMUX2)
981 #error "FANMUX0_PIN and FANMUX1_PIN must be set before FANMUX2_PIN can be set."
987 #if NUM_SERVOS > NUM_SERVO_PLUGS
988 #error "The selected board doesn't support enough servos for your configuration. Reduce NUM_SERVOS."
994 #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_PROBE && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR) && !defined(SWITCHING_TOOLHEAD_SERVO_NR)
995 #error "Z_PROBE_SERVO_NR, switching nozzle, switching toolhead or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE."
1001 #if HAS_CHARACTER_LCD && !defined(DISPLAY_CHARSET_HD44780)
1002 #error "You must set DISPLAY_CHARSET_HD44780 to JAPANESE, WESTERN or CYRILLIC for your LCD controller."
1008 #if BOTH(PIDTEMPBED, BED_LIMIT_SWITCHING)
1009 #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
1021 + ENABLED(MORGAN_SCARA) \
1028 #error "Please enable only one of DELTA, MORGAN_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
1035 #if NONE(USE_XMAX_PLUG, USE_YMAX_PLUG, USE_ZMAX_PLUG)
1036 #error "You probably want to use Max Endstops for DELTA!"
1037 #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
1038 #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
1039 #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || HAS_LCD_MENU)
1040 #error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller."
1042 #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
1043 #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
1044 #elif GRID_MAX_POINTS_X < 3
1045 #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be 3 or higher."
1053 #if DISABLED(CLASSIC_JERK) && IS_KINEMATIC
1054 #error "CLASSIC_JERK is required for DELTA and SCARA."
1065 + ENABLED(PROBE_MANUALLY) \
1066 + ENABLED(FIX_MOUNTED_PROBE) \
1067 + (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \
1068 + ENABLED(BLTOUCH) \
1069 + ENABLED(TOUCH_MI_PROBE) \
1070 + ENABLED(SOLENOID_PROBE) \
1071 + ENABLED(Z_PROBE_ALLEN_KEY) \
1072 + ENABLED(Z_PROBE_SLED) \
1073 + ENABLED(RACK_AND_PINION_PROBE) \
1074 + ENABLED(SENSORLESS_PROBING)
1075 #error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, FIX_MOUNTED_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
1083 #if BOTH(Z_PROBE_SLED, DELTA)
1084 #error "You cannot use Z_PROBE_SLED with DELTA."
1090 #if ENABLED(SOLENOID_PROBE)
1091 #if ENABLED(EXT_SOLENOID)
1092 #error "SOLENOID_PROBE is incompatible with EXT_SOLENOID."
1093 #elif !HAS_SOLENOID_1
1094 #error "SOLENOID_PROBE requires SOL1_PIN. It can be added to your Configuration.h."
1101 #if HAS_Z_SERVO_PROBE
1103 #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)."
1104 #elif Z_PROBE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
1105 #error "SERVO0_PIN must be defined for your servo or BLTOUCH probe."
1106 #elif Z_PROBE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
1107 #error "SERVO1_PIN must be defined for your servo or BLTOUCH probe."
1108 #elif Z_PROBE_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
1109 #error "SERVO2_PIN must be defined for your servo or BLTOUCH probe."
1110 #elif Z_PROBE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
1111 #error "SERVO3_PIN must be defined for your servo or BLTOUCH probe."
1112 #elif Z_PROBE_SERVO_NR >= NUM_SERVOS
1113 #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS."
1117 #if ENABLED(BLTOUCH)
1118 #if BLTOUCH_DELAY < 200
1119 #error "BLTOUCH_DELAY less than 200 is unsafe and is not supported."
1120 #elif DISABLED(BLTOUCH_SET_5V_MODE) && NONE(ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN, ENDSTOPPULLUP_ZMIN_PROBE)
1121 #error "BLTOUCH without BLTOUCH_SET_5V_MODE requires ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN or ENDSTOPPULLUP_ZMIN_PROBE."
1125 #if ENABLED(RACK_AND_PINION_PROBE) && !(defined(Z_PROBE_DEPLOY_X) && defined(Z_PROBE_RETRACT_X))
1126 #error "RACK_AND_PINION_PROBE requires Z_PROBE_DEPLOY_X and Z_PROBE_RETRACT_X."
1132 #if ENABLED(TOUCH_MI_PROBE)
1133 #if DISABLED(Z_SAFE_HOMING)
1134 #error "TOUCH_MI_PROBE requires Z_SAFE_HOMING."
1135 #elif !defined(TOUCH_MI_RETRACT_Z)
1136 #error "TOUCH_MI_PROBE requires TOUCH_MI_RETRACT_Z."
1137 #elif defined(Z_AFTER_PROBING)
1138 #error "TOUCH_MI_PROBE requires Z_AFTER_PROBING to be disabled."
1139 #elif Z_HOMING_HEIGHT < 10
1140 #error "TOUCH_MI_PROBE requires Z_HOMING_HEIGHT >= 10."
1141 #elif Z_MIN_PROBE_ENDSTOP_INVERTING
1142 #error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING to be set to false."
1143 #elif DISABLED(BABYSTEP_ZPROBE_OFFSET)
1144 #error "TOUCH_MI_PROBE requires BABYSTEPPING with BABYSTEP_ZPROBE_OFFSET."
1145 #elif !HAS_RESUME_CONTINUE
1146 #error "TOUCH_MI_PROBE currently requires an LCD controller or EMERGENCY_PARSER."
1153 #if ENABLED(SENSORLESS_PROBING)
1154 #if ENABLED(DELTA) && !(AXIS_HAS_STALLGUARD(X) && AXIS_HAS_STALLGUARD(Y) && AXIS_HAS_STALLGUARD(Z))
1155 #error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z."
1156 #elif !AXIS_HAS_STALLGUARD(Z)
1157 #error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z."
1159 #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1160 #if DISABLED(USE_ZMIN_PLUG)
1161 #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires USE_ZMIN_PLUG to be enabled."
1163 #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires the Z_MIN_PIN to be defined."
1164 #elif Z_MIN_PROBE_ENDSTOP_INVERTING != Z_MIN_ENDSTOP_INVERTING
1165 #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires Z_MIN_ENDSTOP_INVERTING to match Z_MIN_PROBE_ENDSTOP_INVERTING."
1167 #elif !HAS_Z_MIN_PROBE_PIN
1168 #error "Z_MIN_PROBE_PIN must be defined if Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN is not enabled."
1174 #ifndef Z_CLEARANCE_DEPLOY_PROBE
1175 #error "You must define Z_CLEARANCE_DEPLOY_PROBE in your configuration."
1176 #elif !defined(Z_CLEARANCE_BETWEEN_PROBES)
1177 #error "You must define Z_CLEARANCE_BETWEEN_PROBES in your configuration."
1178 #elif Z_CLEARANCE_DEPLOY_PROBE < 0
1179 #error "Probes need Z_CLEARANCE_DEPLOY_PROBE >= 0."
1180 #elif Z_CLEARANCE_BETWEEN_PROBES < 0
1181 #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
1182 #elif Z_AFTER_PROBING < 0
1183 #error "Probes need Z_AFTER_PROBING >= 0."
1186 #if MULTIPLE_PROBING || EXTRA_PROBING
1187 #if !MULTIPLE_PROBING
1188 #error "EXTRA_PROBING requires MULTIPLE_PROBING."
1189 #elif MULTIPLE_PROBING < 2
1190 #error "MULTIPLE_PROBING must be 2 or more."
1191 #elif MULTIPLE_PROBING <= EXTRA_PROBING
1192 #error "EXTRA_PROBING must be less than MULTIPLE_PROBING."
1196 #if Z_PROBE_LOW_POINT > 0
1197 #error "Z_PROBE_LOW_POINT must be less than or equal to 0."
1205 #if HAS_ABL_NOT_UBL && !PROBE_SELECTED
1206 #error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
1209 #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
1210 #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
1219 + ENABLED(AUTO_BED_LEVELING_LINEAR) \
1220 + ENABLED(AUTO_BED_LEVELING_3POINT) \
1221 + ENABLED(AUTO_BED_LEVELING_BILINEAR) \
1222 + ENABLED(AUTO_BED_LEVELING_UBL) \
1223 + ENABLED(MESH_BED_LEVELING)
1224 #error "Select only one of: MESH_BED_LEVELING, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
1231 #if ENABLED(AUTO_BED_LEVELING_UBL)
1238 #undef PROBE_MANUALLY
1241 #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
1242 #elif DISABLED(EEPROM_SETTINGS)
1243 #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
1244 #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
1245 #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
1246 #elif !defined(RESTORE_LEVELING_AFTER_G28)
1247 #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'."
1250 #elif HAS_ABL_NOT_UBL
1259 #if IS_SCARA && DISABLED(AUTO_BED_LEVELING_BILINEAR)
1260 #error "SCARA machines can only use the AUTO_BED_LEVELING_BILINEAR leveling option."
1263 #elif ENABLED(MESH_BED_LEVELING)
1266 #undef PROBE_MANUALLY
1273 #error "MESH_BED_LEVELING is not compatible with DELTA printers."
1274 #elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
1275 #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
1281 #if HAS_CLASSIC_JERK
1282 static_assert(DEFAULT_ZJERK > 0.1,
"Low DEFAULT_ZJERK values are incompatible with mesh-based leveling.");
1284 #elif ENABLED(G26_MESH_VALIDATION)
1285 #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL."
1288 #if ENABLED(MESH_EDIT_GFX_OVERLAY) && !(ENABLED(AUTO_BED_LEVELING_UBL) && HAS_GRAPHICAL_LCD)
1289 #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
1292 #if ENABLED(G29_RETRY_AND_RECOVER)
1293 #if ENABLED(AUTO_BED_LEVELING_UBL)
1294 #error "G29_RETRY_AND_RECOVER is not compatible with UBL."
1295 #elif ENABLED(MESH_BED_LEVELING)
1296 #error "G29_RETRY_AND_RECOVER is not compatible with MESH_BED_LEVELING."
1303 #if ENABLED(LCD_BED_LEVELING)
1305 #error "LCD_BED_LEVELING requires a programmable LCD controller."
1306 #elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL)
1307 #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING."
1314 #if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0
1315 #error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0."
1318 #if ENABLED(CODEPENDENT_XY_HOMING)
1319 #if ENABLED(QUICK_HOME)
1320 #error "QUICK_HOME is incompatible with CODEPENDENT_XY_HOMING."
1322 #error "CODEPENDENT_XY_HOMING requires a Cartesian setup."
1329 #if ENABLED(Z_SAFE_HOMING)
1330 #if HAS_BED_PROBE && (ENABLED(DELTA) || IS_SCARA)
1331 static_assert(
WITHIN(Z_SAFE_HOMING_X_POINT, PROBE_X_MIN, PROBE_X_MAX),
"Z_SAFE_HOMING_X_POINT is outside the probe region.");
1332 static_assert(
WITHIN(Z_SAFE_HOMING_Y_POINT, PROBE_Y_MIN, PROBE_Y_MAX),
"Z_SAFE_HOMING_Y_POINT is outside the probe region.");
1334 static_assert(
WITHIN(Z_SAFE_HOMING_X_POINT,
X_MIN_POS,
X_MAX_POS),
"Z_SAFE_HOMING_X_POINT can't be reached by the nozzle.");
1335 static_assert(
WITHIN(Z_SAFE_HOMING_Y_POINT,
Y_MIN_POS,
Y_MAX_POS),
"Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle.");
1337 #endif // Z_SAFE_HOMING
1342 #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z)
1343 #if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING)
1344 #error "DISABLE_[XYZ] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
1351 #if ENABLED(FILAMENT_WIDTH_SENSOR)
1352 #if !HAS_FILAMENT_WIDTH_SENSOR
1353 #error "FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined."
1354 #elif ENABLED(NO_VOLUMETRICS)
1355 #error "FILAMENT_WIDTH_SENSOR requires NO_VOLUMETRICS to be disabled."
1362 #if ENABLED(ULTIPANEL) && NONE(NEWPANEL, SR_LCD_2W_NL) && !defined(SHIFT_CLK)
1363 #error "ULTIPANEL requires some kind of encoder."
1366 #if ENCODER_PULSES_PER_STEP < 0
1367 #error "ENCODER_PULSES_PER_STEP should not be negative, use REVERSE_MENU_DIRECTION instead."
1373 #if ENABLED(SAV_3DGLCD)
1374 #if NONE(U8GLIB_SSD1306, U8GLIB_SH1106)
1375 #error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
1376 #elif BOTH(U8GLIB_SSD1306, U8GLIB_SH1106)
1377 #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
1385 #if ENABLED(Z_PROBE_ALLEN_KEY) && (Z_HOME_DIR < 0) && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
1386 #error "You can't home to a z min endstop with a Z_PROBE_ALLEN_KEY"
1392 #if ENABLED(DUAL_X_CARRIAGE)
1394 #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
1395 #elif CORE_IS_XY || CORE_IS_XZ
1396 #error "DUAL_X_CARRIAGE cannot be used with COREXY, COREYX, COREXZ, or COREZX."
1397 #elif !(HAS_X2_ENABLE && HAS_X2_STEP && HAS_X2_DIR)
1398 #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
1400 #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
1401 #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
1402 #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
1403 #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
1404 #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
1413 #if E0_AUTO_FAN_PIN == FAN_PIN
1414 #error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."
1415 #elif E1_AUTO_FAN_PIN == FAN_PIN
1416 #error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN."
1417 #elif E2_AUTO_FAN_PIN == FAN_PIN
1418 #error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN."
1419 #elif E3_AUTO_FAN_PIN == FAN_PIN
1420 #error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN."
1425 #if HAS_FAN0 && CONTROLLER_FAN_PIN == FAN_PIN
1426 #error "You cannot set CONTROLLER_FAN_PIN equal to FAN_PIN."
1429 #if ENABLED(USE_CONTROLLER_FAN)
1430 #if !HAS_CONTROLLER_FAN
1431 #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
1432 #elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
1433 #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
1434 #elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
1435 #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
1436 #elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
1437 #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
1438 #elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
1439 #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
1446 #if ENABLED(CASE_LIGHT_ENABLE)
1447 #if !PIN_EXISTS(CASE_LIGHT)
1448 #error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN to be defined."
1449 #elif CASE_LIGHT_PIN == FAN_PIN
1450 #error "CASE_LIGHT_PIN conflicts with FAN_PIN. Resolve before continuing."
1457 #if ENABLED(HEATER_0_USER_THERMISTOR) && !(defined(HOTEND0_PULLUP_RESISTOR_OHMS) && defined(HOTEND0_RESISTANCE_25C_OHMS) && defined(HOTEND0_BETA))
1458 #error "TEMP_SENSOR_0 1000 requires HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS and HOTEND0_BETA in Configuration_adv.h."
1459 #elif ENABLED(HEATER_1_USER_THERMISTOR) && !(defined(HOTEND1_PULLUP_RESISTOR_OHMS) && defined(HOTEND1_RESISTANCE_25C_OHMS) && defined(HOTEND1_BETA))
1460 #error "TEMP_SENSOR_1 1000 requires HOTEND1_PULLUP_RESISTOR_OHMS, HOTEND1_RESISTANCE_25C_OHMS and HOTEND1_BETA in Configuration_adv.h."
1461 #elif ENABLED(HEATER_2_USER_THERMISTOR) && !(defined(HOTEND2_PULLUP_RESISTOR_OHMS) && defined(HOTEND2_RESISTANCE_25C_OHMS) && defined(HOTEND2_BETA))
1462 #error "TEMP_SENSOR_2 1000 requires HOTEND2_PULLUP_RESISTOR_OHMS, HOTEND2_RESISTANCE_25C_OHMS and HOTEND2_BETA in Configuration_adv.h."
1463 #elif ENABLED(HEATER_3_USER_THERMISTOR) && !(defined(HOTEND3_PULLUP_RESISTOR_OHMS) && defined(HOTEND3_RESISTANCE_25C_OHMS) && defined(HOTEND3_BETA))
1464 #error "TEMP_SENSOR_3 1000 requires HOTEND3_PULLUP_RESISTOR_OHMS, HOTEND3_RESISTANCE_25C_OHMS and HOTEND3_BETA in Configuration_adv.h."
1465 #elif ENABLED(HEATER_4_USER_THERMISTOR) && !(defined(HOTEND4_PULLUP_RESISTOR_OHMS) && defined(HOTEND4_RESISTANCE_25C_OHMS) && defined(HOTEND4_BETA))
1466 #error "TEMP_SENSOR_4 1000 requires HOTEND4_PULLUP_RESISTOR_OHMS, HOTEND4_RESISTANCE_25C_OHMS and HOTEND4_BETA in Configuration_adv.h."
1467 #elif ENABLED(HEATER_5_USER_THERMISTOR) && !(defined(HOTEND5_PULLUP_RESISTOR_OHMS) && defined(HOTEND5_RESISTANCE_25C_OHMS) && defined(HOTEND5_BETA))
1468 #error "TEMP_SENSOR_5 1000 requires HOTEND5_PULLUP_RESISTOR_OHMS, HOTEND5_RESISTANCE_25C_OHMS and HOTEND5_BETA in Configuration_adv.h."
1469 #elif ENABLED(HEATER_BED_USER_THERMISTOR) && !(defined(BED_PULLUP_RESISTOR_OHMS) && defined(BED_RESISTANCE_25C_OHMS) && defined(BED_BETA))
1470 #error "TEMP_SENSOR_BED 1000 requires BED_PULLUP_RESISTOR_OHMS, BED_RESISTANCE_25C_OHMS and BED_BETA in Configuration_adv.h."
1471 #elif ENABLED(HEATER_CHAMBER_USER_THERMISTOR) && !(defined(CHAMBER_PULLUP_RESISTOR_OHMS) && defined(CHAMBER_RESISTANCE_25C_OHMS) && defined(CHAMBER_BETA))
1472 #error "TEMP_SENSOR_CHAMBER 1000 requires CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS and CHAMBER_BETA in Configuration_adv.h."
1479 #error "HEATER_0_PIN not defined for this board."
1480 #elif !ANY_PIN(TEMP_0, MAX6675_SS)
1481 #error "TEMP_0_PIN not defined for this board."
1482 #elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PIN_EXISTS(E0_STEP, E0_DIR))
1483 #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board."
1484 #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP, E0_DIR) || !HAS_E0_ENABLE))
1485 #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
1486 #elif EXTRUDERS && TEMP_SENSOR_0 == 0
1487 #error "TEMP_SENSOR_0 is required with any extruders."
1491 #if ENABLED(HEATER_0_USES_MAX6675) && !PIN_EXISTS(MAX6675_SS)
1492 #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
1493 #elif (HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1
1494 #error "HEATER_1_PIN not defined for this board."
1498 #if ENABLED(HEATER_1_USES_MAX6675) && !PIN_EXISTS(MAX6675_SS2)
1499 #error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board."
1500 #elif TEMP_SENSOR_1 == 0
1501 #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
1502 #elif !ANY_PIN(TEMP_1, MAX6675_SS2)
1503 #error "TEMP_1_PIN not defined for this board."
1506 #if TEMP_SENSOR_2 == 0
1507 #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
1509 #error "HEATER_2_PIN not defined for this board."
1510 #elif !PIN_EXISTS(TEMP_2)
1511 #error "TEMP_2_PIN not defined for this board."
1514 #if TEMP_SENSOR_3 == 0
1515 #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS."
1517 #error "HEATER_3_PIN not defined for this board."
1518 #elif !PIN_EXISTS(TEMP_3)
1519 #error "TEMP_3_PIN not defined for this board."
1522 #if TEMP_SENSOR_4 == 0
1523 #error "TEMP_SENSOR_4 is required with 5 or more HOTENDS."
1525 #error "HEATER_4_PIN not defined for this board."
1526 #elif !PIN_EXISTS(TEMP_4)
1527 #error "TEMP_4_PIN not defined for this board."
1530 #if TEMP_SENSOR_5 == 0
1531 #error "TEMP_SENSOR_5 is required with 6 HOTENDS."
1533 #error "HEATER_5_PIN not defined for this board."
1534 #elif !PIN_EXISTS(TEMP_5)
1535 #error "TEMP_5_PIN not defined for this board."
1537 #elif TEMP_SENSOR_5 != 0
1538 #error "TEMP_SENSOR_5 shouldn't be set with only 5 HOTENDS."
1540 #elif TEMP_SENSOR_4 != 0
1541 #error "TEMP_SENSOR_4 shouldn't be set with only 4 HOTENDS."
1542 #elif TEMP_SENSOR_5 != 0
1543 #error "TEMP_SENSOR_5 shouldn't be set with only 4 HOTENDS."
1545 #elif TEMP_SENSOR_3 != 0
1546 #error "TEMP_SENSOR_3 shouldn't be set with only 3 HOTENDS."
1547 #elif TEMP_SENSOR_4 != 0
1548 #error "TEMP_SENSOR_4 shouldn't be set with only 3 HOTENDS."
1549 #elif TEMP_SENSOR_5 != 0
1550 #error "TEMP_SENSOR_5 shouldn't be set with only 3 HOTENDS."
1552 #elif TEMP_SENSOR_2 != 0
1553 #error "TEMP_SENSOR_2 shouldn't be set with only 2 HOTENDS."
1554 #elif TEMP_SENSOR_3 != 0
1555 #error "TEMP_SENSOR_3 shouldn't be set with only 2 HOTENDS."
1556 #elif TEMP_SENSOR_4 != 0
1557 #error "TEMP_SENSOR_4 shouldn't be set with only 2 HOTENDS."
1558 #elif TEMP_SENSOR_5 != 0
1559 #error "TEMP_SENSOR_5 shouldn't be set with only 2 HOTENDS."
1561 #elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
1562 #error "TEMP_SENSOR_1 shouldn't be set with only 1 HOTEND."
1563 #elif TEMP_SENSOR_2 != 0
1564 #error "TEMP_SENSOR_2 shouldn't be set with only 1 HOTEND."
1565 #elif TEMP_SENSOR_3 != 0
1566 #error "TEMP_SENSOR_3 shouldn't be set with only 1 HOTEND."
1567 #elif TEMP_SENSOR_4 != 0
1568 #error "TEMP_SENSOR_4 shouldn't be set with only 1 HOTEND."
1569 #elif TEMP_SENSOR_5 != 0
1570 #error "TEMP_SENSOR_5 shouldn't be set with only 1 HOTEND."
1573 #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
1574 #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT."
1580 #if ENABLED(TEMP_STAT_LEDS) && !ANY_PIN(STAT_LED_RED, STAT_LED_BLUE)
1581 #error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
1587 #if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
1588 #error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED."
1594 #if defined(LED_BACKLIGHT_TIMEOUT) && !(EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && HAS_POWER_SWITCH)
1595 #error "LED_BACKLIGHT_TIMEOUT requires a FYSETC Mini Panel and a Power Switch."
1601 #if ENABLED(MULTI_NOZZLE_DUPLICATION)
1603 #error "MULTI_NOZZLE_DUPLICATION requires 2 or more hotends."
1604 #elif ENABLED(DUAL_X_CARRIAGE)
1605 #error "MULTI_NOZZLE_DUPLICATION is incompatible with DUAL_X_CARRIAGE."
1606 #elif ENABLED(SINGLENOZZLE)
1607 #error "MULTI_NOZZLE_DUPLICATION is incompatible with SINGLENOZZLE."
1608 #elif ENABLED(MIXING_EXTRUDER)
1609 #error "MULTI_NOZZLE_DUPLICATION is incompatible with MIXING_EXTRUDER."
1610 #elif ENABLED(SWITCHING_EXTRUDER)
1611 #error "MULTI_NOZZLE_DUPLICATION is incompatible with SWITCHING_EXTRUDER."
1618 #if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only
1620 #if !(PIN_EXISTS(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
1621 #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
1624 #if !(PIN_EXISTS(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
1625 #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
1628 #if !(PIN_EXISTS(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
1629 #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
1632 #if !(PIN_EXISTS(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
1633 #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
1636 #if !(PIN_EXISTS(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
1637 #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
1640 #if !(PIN_EXISTS(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
1641 #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
1643 #endif // E_STEPPERS > 5
1644 #endif // E_STEPPERS > 4
1645 #endif // E_STEPPERS > 3
1646 #endif // E_STEPPERS > 2
1647 #endif // E_STEPPERS > 1
1648 #endif // E_STEPPERS
1655 #define _PLUG_UNUSED_TEST(AXIS,PLUG) (DISABLED(USE_##PLUG##MIN_PLUG, USE_##PLUG##MAX_PLUG) && !(ENABLED(AXIS##_DUAL_ENDSTOPS) && WITHIN(AXIS##2_USE_ENDSTOP, _##PLUG##MAX_, _##PLUG##MIN_)))
1656 #define _AXIS_PLUG_UNUSED_TEST(AXIS) (_PLUG_UNUSED_TEST(AXIS,X) && _PLUG_UNUSED_TEST(AXIS,Y) && _PLUG_UNUSED_TEST(AXIS,Z))
1659 #if _AXIS_PLUG_UNUSED_TEST(X)
1660 #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG."
1662 #if _AXIS_PLUG_UNUSED_TEST(Y)
1663 #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG."
1665 #if _AXIS_PLUG_UNUSED_TEST(Z)
1666 #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
1671 #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
1672 #error "Enable USE_XMIN_PLUG when homing X to MIN."
1673 #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
1674 #error "Enable USE_XMAX_PLUG when homing X to MAX."
1675 #elif Y_HOME_DIR < 0 && DISABLED(USE_YMIN_PLUG)
1676 #error "Enable USE_YMIN_PLUG when homing Y to MIN."
1677 #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
1678 #error "Enable USE_YMAX_PLUG when homing Y to MAX."
1681 #if Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
1682 #error "Enable USE_ZMIN_PLUG when homing Z to MIN."
1683 #elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
1684 #error "Enable USE_ZMAX_PLUG when homing Z to MAX."
1688 #if ENABLED(X_DUAL_ENDSTOPS)
1690 #error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS."
1691 #elif X2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1692 #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _XMIN_."
1693 #elif X2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1694 #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."
1695 #elif X2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1696 #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _YMIN_."
1697 #elif X2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1698 #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _YMAX_."
1699 #elif X2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1700 #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _ZMIN_."
1701 #elif X2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1702 #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _ZMAX_."
1703 #elif !HAS_X2_MIN && !HAS_X2_MAX
1704 #error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1705 #elif ENABLED(DELTA)
1706 #error "X_DUAL_ENDSTOPS is not compatible with DELTA."
1709 #if ENABLED(Y_DUAL_ENDSTOPS)
1711 #error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS."
1712 #elif Y2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1713 #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _XMIN_."
1714 #elif Y2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1715 #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _XMAX_."
1716 #elif Y2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1717 #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _YMIN_."
1718 #elif Y2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1719 #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."
1720 #elif Y2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1721 #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _ZMIN_."
1722 #elif Y2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1723 #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _ZMAX_."
1724 #elif !HAS_Y2_MIN && !HAS_Y2_MAX
1725 #error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1726 #elif ENABLED(DELTA)
1727 #error "Y_DUAL_ENDSTOPS is not compatible with DELTA."
1730 #if ENABLED(Z_DUAL_ENDSTOPS)
1732 #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
1733 #elif Z2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1734 #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _XMIN_."
1735 #elif Z2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1736 #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _XMAX_."
1737 #elif Z2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1738 #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _YMIN_."
1739 #elif Z2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1740 #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _YMAX_."
1741 #elif Z2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1742 #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _ZMIN_."
1743 #elif Z2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1744 #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _ZMAX_."
1745 #elif !HAS_Z2_MIN && !HAS_Z2_MAX
1746 #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1747 #elif ENABLED(DELTA)
1748 #error "Z_DUAL_ENDSTOPS is not compatible with DELTA."
1751 #if ENABLED(Z_TRIPLE_ENDSTOPS)
1753 #error "You must set Z2_USE_ENDSTOP with Z_TRIPLE_ENDSTOPS."
1754 #elif Z2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1755 #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _XMIN_."
1756 #elif Z2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1757 #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _XMAX_."
1758 #elif Z2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1759 #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _YMIN_."
1760 #elif Z2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1761 #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _YMAX_."
1762 #elif Z2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1763 #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _ZMIN_."
1764 #elif Z2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1765 #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _ZMAX_."
1766 #elif !HAS_Z2_MIN && !HAS_Z2_MAX
1767 #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1768 #elif ENABLED(DELTA)
1769 #error "Z_TRIPLE_ENDSTOPS is not compatible with DELTA."
1772 #error "You must set Z3_USE_ENDSTOP with Z_TRIPLE_ENDSTOPS."
1773 #elif Z3_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
1774 #error "USE_XMIN_PLUG is required when Z3_USE_ENDSTOP is _XMIN_."
1775 #elif Z3_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
1776 #error "USE_XMAX_PLUG is required when Z3_USE_ENDSTOP is _XMAX_."
1777 #elif Z3_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
1778 #error "USE_YMIN_PLUG is required when Z3_USE_ENDSTOP is _YMIN_."
1779 #elif Z3_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
1780 #error "USE_YMAX_PLUG is required when Z3_USE_ENDSTOP is _YMAX_."
1781 #elif Z3_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
1782 #error "USE_ZMIN_PLUG is required when Z3_USE_ENDSTOP is _ZMIN_."
1783 #elif Z3_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
1784 #error "USE_ZMAX_PLUG is required when Z3_USE_ENDSTOP is _ZMAX_."
1785 #elif !HAS_Z3_MIN && !HAS_Z3_MAX
1786 #error "Z3_USE_ENDSTOP has been assigned to a nonexistent endstop!"
1787 #elif ENABLED(DELTA)
1788 #error "Z_TRIPLE_ENDSTOPS is not compatible with DELTA."
1792 #if defined(ENDSTOP_NOISE_THRESHOLD) && !WITHIN(ENDSTOP_NOISE_THRESHOLD, 2, 7)
1793 #error "ENDSTOP_NOISE_THRESHOLD must be an integer from 2 to 7."
1799 #if ENABLED(EMERGENCY_PARSER) && defined(__AVR__) && defined(USBCON)
1800 #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
1806 #if ENABLED(EXPERIMENTAL_I2CBUS) && I2C_SLAVE_ADDRESS > 0
1807 #if I2C_SLAVE_ADDRESS < 8
1808 #error "I2C_SLAVE_ADDRESS can't be less than 8. (Addresses 0 - 7 are reserved.)"
1809 #elif I2C_SLAVE_ADDRESS > 127
1810 #error "I2C_SLAVE_ADDRESS can't be over 127. (Only 7 bits allowed.)"
1817 #if ENABLED(G38_PROBE_TARGET)
1819 #error "G38_PROBE_TARGET requires a bed probe."
1821 #error "G38_PROBE_TARGET requires a Cartesian machine."
1828 #define _RGB_TEST (PIN_EXISTS(RGB_LED_R, RGB_LED_G, RGB_LED_B))
1829 #if ENABLED(PRINTER_EVENT_LEDS) && !HAS_COLOR_LEDS
1830 #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9533, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
1831 #elif ENABLED(RGB_LED)
1833 #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
1834 #elif ENABLED(RGBW_LED)
1835 #error "Please enable only one of RGB_LED and RGBW_LED."
1837 #elif ENABLED(RGBW_LED)
1838 #if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W))
1839 #error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN."
1841 #elif ENABLED(NEOPIXEL_LED)
1842 #if !(PIN_EXISTS(NEOPIXEL) && NEOPIXEL_PIXELS > 0)
1843 #error "NEOPIXEL_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS."
1851 #if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255
1852 #define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
1855 #elif HAS_AUTO_FAN_1
1857 #elif HAS_AUTO_FAN_2
1859 #elif HAS_AUTO_FAN_3
1868 + (ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && DISABLED(IS_RRD_SC)) \
1869 + (ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(IS_RRD_FG_SC)) \
1870 + (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
1871 + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
1872 + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)) \
1873 + (ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(IS_RRW_KEYPAD)) \
1874 + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
1875 + (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
1876 + ENABLED(RADDS_DISPLAY) \
1877 + ENABLED(ULTIMAKERCONTROLLER) \
1878 + ENABLED(PANEL_ONE) \
1879 + ENABLED(G3D_PANEL) \
1880 + ENABLED(RIGIDBOT_PANEL) \
1881 + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
1882 + ENABLED(ZONESTAR_LCD) \
1883 + ENABLED(RA_CONTROL_PANEL) \
1884 + ENABLED(LCD_SAINSMART_I2C_1602) \
1885 + ENABLED(LCD_SAINSMART_I2C_2004) \
1886 + ENABLED(LCM1602) \
1887 + ENABLED(LCD_I2C_PANELOLU2) \
1888 + ENABLED(LCD_I2C_VIKI) \
1889 + ENABLED(SAV_3DLCD) \
1890 + ENABLED(FF_INTERFACEBOARD) \
1891 + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \
1893 + ENABLED(miniVIKI) \
1894 + ENABLED(MAKRPANEL) \
1895 + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
1896 + ENABLED(BQ_LCD_SMART_CONTROLLER) \
1897 + ENABLED(CARTESIO_UI) \
1898 + ENABLED(LCD_FOR_MELZI) \
1899 + ENABLED(ULTI_CONTROLLER) \
1900 + ENABLED(MKS_MINI_12864) \
1901 + ENABLED(FYSETC_MINI_12864_X_X) \
1902 + ENABLED(FYSETC_MINI_12864_1_2) \
1903 + ENABLED(FYSETC_MINI_12864_2_0) \
1904 + ENABLED(FYSETC_MINI_12864_2_1) \
1905 + ENABLED(CR10_STOCKDISPLAY) \
1906 + ENABLED(ANET_FULL_GRAPHICS_LCD) \
1907 + ENABLED(AZSMZ_12864) \
1908 + ENABLED(SILVER_GATE_GLCD_CONTROLLER) \
1909 + ENABLED(SAV_3DGLCD) \
1910 + ENABLED(OLED_PANEL_TINYBOY2) \
1911 + ENABLED(MKS_12864OLED) \
1912 + ENABLED(MKS_12864OLED_SSD1306) \
1913 + ENABLED(U8GLIB_SH1106_EINSTART) \
1914 + ENABLED(OVERLORD_OLED) \
1915 + ENABLED(DGUS_LCD) \
1916 + ENABLED(MALYAN_LCD) \
1917 + ENABLED(LULZBOT_TOUCH_UI) \
1918 + ENABLED(FSMC_GRAPHICAL_TFT)
1919 #error "Please select no more than one LCD controller option."
1925 #undef IS_U8GLIB_SSD1306
1926 #undef IS_RRW_KEYPAD
1933 #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
1934 #error "RGB_LED is required for FYSETC_MINI_12864 1.2 and 2.0."
1935 #elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
1936 #error "LED_USER_PRESET_STARTUP is required for FYSETC_MINI_12864 2.x displays."
1942 #define INVALID_TMC_SPI(ST) (AXIS_HAS_SPI && !PIN_EXISTS(ST##_CS))
1943 #if INVALID_TMC_SPI(X)
1944 #error "An SPI driven TMC driver on X requires X_CS_PIN."
1945 #elif INVALID_TMC_SPI(X2)
1946 #error "An SPI driven TMC driver on X2 requires X2_CS_PIN."
1947 #elif INVALID_TMC_SPI(Y)
1948 #error "An SPI driven TMC driver on Y requires Y_CS_PIN."
1949 #elif INVALID_TMC_SPI(Y2)
1950 #error "An SPI driven TMC driver on Y2 requires Y2_CS_PIN."
1951 #elif INVALID_TMC_SPI(Z)
1952 #error "An SPI driven TMC driver on Z requires Z_CS_PIN."
1953 #elif INVALID_TMC_SPI(Z2)
1954 #error "An SPI driven TMC driver on Z2 requires Z2_CS_PIN."
1955 #elif INVALID_TMC_SPI(Z3)
1956 #error "An SPI driven TMC driver on Z3 requires Z3_CS_PIN."
1957 #elif INVALID_TMC_SPI(E0)
1958 #error "An SPI driven TMC driver on E0 requires E0_CS_PIN."
1959 #elif INVALID_TMC_SPI(E1)
1960 #error "An SPI driven TMC driver on E1 requires E1_CS_PIN."
1961 #elif INVALID_TMC_SPI(E2)
1962 #error "An SPI driven TMC driver on E2 requires E2_CS_PIN."
1963 #elif INVALID_TMC_SPI(E3)
1964 #error "An SPI driven TMC driver on E3 requires E3_CS_PIN."
1965 #elif INVALID_TMC_SPI(E4)
1966 #error "An SPI driven TMC driver on E4 requires E4_CS_PIN."
1967 #elif INVALID_TMC_SPI(E5)
1968 #error "An SPI driven TMC driver on E5 requires E5_CS_PIN."
1970 #undef INVALID_TMC_SPI
1975 #define INVALID_TMC_UART(ST) (AXIS_HAS_UART(ST) && !(defined(ST##_HARDWARE_SERIAL) || (PIN_EXISTS(ST##_SERIAL_RX, ST##_SERIAL_TX))))
1976 #if INVALID_TMC_UART(X)
1977 #error "TMC2208 or TMC2209 on X requires X_HARDWARE_SERIAL or X_SERIAL_(RX|TX)_PIN."
1978 #elif INVALID_TMC_UART(X2)
1979 #error "TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN."
1980 #elif INVALID_TMC_UART(Y)
1981 #error "TMC2208 or TMC2209 on Y requires Y_HARDWARE_SERIAL or Y_SERIAL_(RX|TX)_PIN."
1982 #elif INVALID_TMC_UART(Y2)
1983 #error "TMC2208 or TMC2209 on Y2 requires Y2_HARDWARE_SERIAL or Y2_SERIAL_(RX|TX)_PIN."
1984 #elif INVALID_TMC_UART(Z)
1985 #error "TMC2208 or TMC2209 on Z requires Z_HARDWARE_SERIAL or Z_SERIAL_(RX|TX)_PIN."
1986 #elif INVALID_TMC_UART(Z2)
1987 #error "TMC2208 or TMC2209 on Z2 requires Z2_HARDWARE_SERIAL or Z2_SERIAL_(RX|TX)_PIN."
1988 #elif INVALID_TMC_UART(Z3)
1989 #error "TMC2208 or TMC2209 on Z3 requires Z3_HARDWARE_SERIAL or Z3_SERIAL_(RX|TX)_PIN."
1990 #elif INVALID_TMC_UART(E0)
1991 #error "TMC2208 or TMC2209 on E0 requires E0_HARDWARE_SERIAL or E0_SERIAL_(RX|TX)_PIN."
1992 #elif INVALID_TMC_UART(E1)
1993 #error "TMC2208 or TMC2209 on E1 requires E1_HARDWARE_SERIAL or E1_SERIAL_(RX|TX)_PIN."
1994 #elif INVALID_TMC_UART(E2)
1995 #error "TMC2208 or TMC2209 on E2 requires E2_HARDWARE_SERIAL or E2_SERIAL_(RX|TX)_PIN."
1996 #elif INVALID_TMC_UART(E3)
1997 #error "TMC2208 or TMC2209 on E3 requires E3_HARDWARE_SERIAL or E3_SERIAL_(RX|TX)_PIN."
1998 #elif INVALID_TMC_UART(E4)
1999 #error "TMC2208 or TMC2209 on E4 requires E4_HARDWARE_SERIAL or E4_SERIAL_(RX|TX)_PIN."
2000 #elif INVALID_TMC_UART(E5)
2001 #error "TMC2208 or TMC2209 on E5 requires E5_HARDWARE_SERIAL or E5_SERIAL_(RX|TX)_PIN."
2003 #undef INVALID_TMC_UART
2008 #define INVALID_TMC_ADDRESS(ST) static_assert(0 <= ST##_SLAVE_ADDRESS && ST##_SLAVE_ADDRESS <= 3, "TMC2209 slave address must be 0, 1, 2 or 3")
2009 #if AXIS_DRIVER_TYPE_X(TMC2209)
2011 #elif AXIS_DRIVER_TYPE_X2(TMC2209)
2013 #elif AXIS_DRIVER_TYPE_Y(TMC2209)
2015 #elif AXIS_DRIVER_TYPE_Y2(TMC2209)
2017 #elif AXIS_DRIVER_TYPE_Z(TMC2209)
2019 #elif AXIS_DRIVER_TYPE_Z2(TMC2209)
2021 #elif AXIS_DRIVER_TYPE_Z3(TMC2209)
2023 #elif AXIS_DRIVER_TYPE_E0(TMC2209)
2025 #elif AXIS_DRIVER_TYPE_E1(TMC2209)
2027 #elif AXIS_DRIVER_TYPE_E2(TMC2209)
2029 #elif AXIS_DRIVER_TYPE_E3(TMC2209)
2031 #elif AXIS_DRIVER_TYPE_E4(TMC2209)
2033 #elif AXIS_DRIVER_TYPE_E5(TMC2209)
2036 #undef INVALID_TMC_ADDRESS
2041 #if HAS_TMC220x && !defined(TARGET_LPC1768) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
2042 defined(X_HARDWARE_SERIAL ) || defined(X2_HARDWARE_SERIAL) \
2043 || defined(Y_HARDWARE_SERIAL ) || defined(Y2_HARDWARE_SERIAL) \
2044 || defined(Z_HARDWARE_SERIAL ) || defined(Z2_HARDWARE_SERIAL) \
2045 || defined(Z3_HARDWARE_SERIAL) || defined(E0_HARDWARE_SERIAL) \
2046 || defined(E1_HARDWARE_SERIAL) || defined(E2_HARDWARE_SERIAL) \
2047 || defined(E3_HARDWARE_SERIAL) || defined(E4_HARDWARE_SERIAL) \
2048 || defined(E5_HARDWARE_SERIAL) )
2049 #error "Select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
2055 #if HAS_TMC220x && !defined(__AVR__) && !defined(TARGET_LPC1768) && !defined(TARGET_STM32F1) && !defined(TARGET_STM32F4) && !( \
2056 defined(X_HARDWARE_SERIAL ) || defined(X2_HARDWARE_SERIAL) \
2057 || defined(Y_HARDWARE_SERIAL ) || defined(Y2_HARDWARE_SERIAL) \
2058 || defined(Z_HARDWARE_SERIAL ) || defined(Z2_HARDWARE_SERIAL) \
2059 || defined(Z3_HARDWARE_SERIAL) || defined(E0_HARDWARE_SERIAL) \
2060 || defined(E1_HARDWARE_SERIAL) || defined(E2_HARDWARE_SERIAL) \
2061 || defined(E3_HARDWARE_SERIAL) || defined(E4_HARDWARE_SERIAL) \
2062 || defined(E5_HARDWARE_SERIAL) )
2063 #error "TMC2208 Software Serial is supported only on AVR, LPC1768, STM32F1 and STM32F4 platforms."
2066 #if ENABLED(SENSORLESS_HOMING)
2074 #define X_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(X,TMC2209)
2075 #define Y_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Y,TMC2209)
2076 #define Z_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Z,TMC2209)
2078 #if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z)
2079 #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z."
2080 #elif X_SENSORLESS && X_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_XMIN)
2081 #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) when homing to X_MIN."
2082 #elif X_SENSORLESS && X_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_XMAX)
2083 #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) when homing to X_MAX."
2084 #elif Y_SENSORLESS && Y_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_YMIN)
2085 #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) when homing to Y_MIN."
2086 #elif Y_SENSORLESS && Y_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_YMAX)
2087 #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) when homing to Y_MAX."
2088 #elif Z_SENSORLESS && Z_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN)
2089 #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN."
2090 #elif Z_SENSORLESS && Z_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMAX)
2091 #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX."
2092 #elif X_SENSORLESS && X_HOME_DIR < 0 && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
2093 #if X_ENDSTOP_INVERTING
2094 #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = true when homing to X_MIN."
2096 #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to X_MIN."
2098 #elif X_SENSORLESS && X_HOME_DIR > 0 && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
2099 #if X_ENDSTOP_INVERTING
2100 #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = true when homing to X_MAX."
2102 #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to X_MAX."
2104 #elif Y_SENSORLESS && Y_HOME_DIR < 0 && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
2105 #if Y_ENDSTOP_INVERTING
2106 #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = true when homing to Y_MIN."
2108 #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MIN."
2110 #elif Y_SENSORLESS && Y_HOME_DIR > 0 && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
2111 #if Y_ENDSTOP_INVERTING
2112 #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = true when homing to Y_MAX."
2114 #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MAX."
2116 #elif Z_SENSORLESS && Z_HOME_DIR < 0 && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
2117 #if Z_ENDSTOP_INVERTING
2118 #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = true when homing to Z_MIN."
2120 #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MIN."
2122 #elif Z_SENSORLESS && Z_HOME_DIR > 0 && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
2123 #if Z_ENDSTOP_INVERTING
2124 #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = true when homing to Z_MAX."
2126 #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MAX."
2128 #elif ENDSTOP_NOISE_THRESHOLD
2129 #error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_THRESHOLD."
2130 #elif !(X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS)
2131 #error "SENSORLESS_HOMING requires a TMC stepper driver with StallGuard on X, Y, or Z axes."
2134 #undef X_ENDSTOP_INVERTING
2135 #undef Y_ENDSTOP_INVERTING
2136 #undef Z_ENDSTOP_INVERTING
2140 #if ENABLED(SENSORLESS_PROBING)
2141 #if ENABLED(DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS)
2142 #error "SENSORLESS_PROBING for DELTA requires TMC stepper drivers with StallGuard on X, Y, and Z axes."
2144 #error "SENSORLESS_PROBING requires a TMC stepper driver with StallGuard on Z."
2149 #if CORE_IS_XY && X_SENSORLESS != Y_SENSORLESS
2150 #error "CoreXY requires both X and Y to use sensorless homing if either does."
2151 #elif CORE_IS_XZ && X_SENSORLESS != Z_SENSORLESS
2152 #error "CoreXZ requires both X and Z to use sensorless homing if either does."
2153 #elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS
2154 #error "CoreYZ requires both Y and Z to use sensorless homing if either does."
2158 #if ENABLED(HYBRID_THRESHOLD) && !STEALTHCHOP_ENABLED
2159 #error "Enable STEALTHCHOP_(XY|Z|E) to use HYBRID_THRESHOLD."
2160 #elif ENABLED(SENSORLESS_HOMING) && !HAS_STALLGUARD
2161 #error "SENSORLESS_HOMING requires TMC2130, TMC2160, TMC2209, TMC2660, or TMC5160 stepper drivers."
2162 #elif ENABLED(SENSORLESS_PROBING) && !HAS_STALLGUARD
2163 #error "SENSORLESS_PROBING requires TMC2130, TMC2160, TMC2209, TMC2660, or TMC5160 stepper drivers."
2164 #elif STEALTHCHOP_ENABLED && !HAS_STEALTHCHOP
2165 #error "STEALTHCHOP requires TMC2130, TMC2160, TMC2208, TMC2209, or TMC5160 stepper drivers."
2168 #define IN_CHAIN(A) (A##_CHAIN_POS > 0)
2170 #if IN_CHAIN(X) || IN_CHAIN(Y) || IN_CHAIN(Z) || IN_CHAIN(X2) || IN_CHAIN(Y2) || IN_CHAIN(Z2) || IN_CHAIN(Z3) || IN_CHAIN(E0) || IN_CHAIN(E1) || IN_CHAIN(E2) || IN_CHAIN(E3) || IN_CHAIN(E4) || IN_CHAIN(E5)
2171 #if (IN_CHAIN(X) && !PIN_EXISTS(X_CS) ) || (IN_CHAIN(Y) && !PIN_EXISTS(Y_CS) ) \
2172 || (IN_CHAIN(Z) && !PIN_EXISTS(Z_CS) ) || (IN_CHAIN(X2) && !PIN_EXISTS(X2_CS)) \
2173 || (IN_CHAIN(Y2) && !PIN_EXISTS(Y2_CS)) || (IN_CHAIN(Z2) && !PIN_EXISTS(Z2_CS)) \
2174 || (IN_CHAIN(Z3) && !PIN_EXISTS(Z3_CS)) || (IN_CHAIN(E0) && !PIN_EXISTS(E0_CS)) \
2175 || (IN_CHAIN(E1) && !PIN_EXISTS(E1_CS)) || (IN_CHAIN(E2) && !PIN_EXISTS(E2_CS)) \
2176 || (IN_CHAIN(E3) && !PIN_EXISTS(E3_CS)) || (IN_CHAIN(E4) && !PIN_EXISTS(E4_CS)) \
2177 || (IN_CHAIN(E5) && !PIN_EXISTS(E5_CS))
2178 #error "All chained TMC drivers need a CS pin."
2181 #define CS_COMPARE X_CS_PIN
2183 #define CS_COMPARE Y_CS_PIN
2185 #define CS_COMPARE Z_CS_PIN
2187 #define CS_COMPARE X2_CS_PIN
2189 #define CS_COMPARE Y2_CS_PIN
2191 #define CS_COMPARE Z2_CS_PIN
2193 #define CS_COMPARE Z3_CS_PIN
2195 #define CS_COMPARE E0_CS_PIN
2197 #define CS_COMPARE E1_CS_PIN
2199 #define CS_COMPARE E2_CS_PIN
2201 #define CS_COMPARE E3_CS_PIN
2203 #define CS_COMPARE E4_CS_PIN
2205 #define CS_COMPARE E5_CS_PIN
2207 #if (IN_CHAIN(X) && X_CS_PIN != CS_COMPARE) || (IN_CHAIN(Y) && Y_CS_PIN != CS_COMPARE) \
2208 || (IN_CHAIN(Z) && Z_CS_PIN != CS_COMPARE) || (IN_CHAIN(X2) && X2_CS_PIN != CS_COMPARE) \
2209 || (IN_CHAIN(Y2) && Y2_CS_PIN != CS_COMPARE) || (IN_CHAIN(Z2) && Z2_CS_PIN != CS_COMPARE) \
2210 || (IN_CHAIN(Z3) && Z3_CS_PIN != CS_COMPARE) || (IN_CHAIN(E0) && E0_CS_PIN != CS_COMPARE) \
2211 || (IN_CHAIN(E1) && E1_CS_PIN != CS_COMPARE) || (IN_CHAIN(E2) && E2_CS_PIN != CS_COMPARE) \
2212 || (IN_CHAIN(E3) && E3_CS_PIN != CS_COMPARE) || (IN_CHAIN(E4) && E4_CS_PIN != CS_COMPARE) \
2213 || (IN_CHAIN(E5) && E5_CS_PIN != CS_COMPARE)
2214 #error "All chained TMC drivers must use the same CS pin."
2221 #if ENABLED(DELTA) && (ENABLED(STEALTHCHOP_XY) != ENABLED(STEALTHCHOP_Z))
2222 #error "STEALTHCHOP_XY and STEALTHCHOP_Z must be the same on DELTA."
2228 #if ENABLED(DIGIPOT_MCP4018)
2229 #if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
2230 || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
2231 #error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
2242 #define _ARR_TEST(N,I) (sanity_arr_##N[_MIN(I,int(COUNT(sanity_arr_##N))-1)] > 0)
2244 static_assert(
COUNT(
sanity_arr_1) >=
XYZE,
"DEFAULT_AXIS_STEPS_PER_UNIT requires X, Y, Z and E elements.");
2245 static_assert(
COUNT(
sanity_arr_1) <=
XYZE_N,
"DEFAULT_AXIS_STEPS_PER_UNIT has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)");
2249 "DEFAULT_AXIS_STEPS_PER_UNIT values must be positive.");
2251 static_assert(
COUNT(
sanity_arr_2) >=
XYZE,
"DEFAULT_MAX_FEEDRATE requires X, Y, Z and E elements.");
2252 static_assert(
COUNT(
sanity_arr_2) <=
XYZE_N,
"DEFAULT_MAX_FEEDRATE has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)");
2256 "DEFAULT_MAX_FEEDRATE values must be positive.");
2258 static_assert(
COUNT(
sanity_arr_3) >=
XYZE,
"DEFAULT_MAX_ACCELERATION requires X, Y, Z and E elements.");
2259 static_assert(
COUNT(
sanity_arr_3) <=
XYZE_N,
"DEFAULT_MAX_ACCELERATION has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)");
2263 "DEFAULT_MAX_ACCELERATION values must be positive.");
2265 #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
2266 #ifdef MAX_ACCEL_EDIT_VALUES
2267 constexpr
float sanity_arr_4[] = MAX_ACCEL_EDIT_VALUES;
2268 static_assert(
COUNT(sanity_arr_4) >=
XYZE,
"MAX_ACCEL_EDIT_VALUES requires X, Y, Z and E elements.");
2269 static_assert(
COUNT(sanity_arr_4) <=
XYZE,
"MAX_ACCEL_EDIT_VALUES has too many elements. X, Y, Z and E elements only.");
2273 "MAX_ACCEL_EDIT_VALUES values must be positive.");
2277 #if ENABLED(LIMITED_MAX_FR_EDITING)
2278 #ifdef MAX_FEEDRATE_EDIT_VALUES
2279 constexpr
float sanity_arr_5[] = MAX_FEEDRATE_EDIT_VALUES;
2280 static_assert(
COUNT(sanity_arr_5) >=
XYZE,
"MAX_FEEDRATE_EDIT_VALUES requires X, Y, Z and E elements.");
2281 static_assert(
COUNT(sanity_arr_5) <=
XYZE,
"MAX_FEEDRATE_EDIT_VALUES has too many elements. X, Y, Z and E elements only.");
2285 "MAX_FEEDRATE_EDIT_VALUES values must be positive.");
2289 #if ENABLED(LIMITED_JERK_EDITING)
2290 #ifdef MAX_JERK_EDIT_VALUES
2291 constexpr
float sanity_arr_6[] = MAX_JERK_EDIT_VALUES;
2292 static_assert(
COUNT(sanity_arr_6) >=
XYZE,
"MAX_JERK_EDIT_VALUES requires X, Y, Z and E elements.");
2293 static_assert(
COUNT(sanity_arr_6) <=
XYZE,
"MAX_JERK_EDIT_VALUES has too many elements. X, Y, Z and E elements only.");
2297 "MAX_JERK_EDIT_VALUES values must be positive.");
2303 #if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS)
2304 #error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS."
2307 #if !BLOCK_BUFFER_SIZE || !IS_POWER_OF_2(BLOCK_BUFFER_SIZE)
2308 #error "BLOCK_BUFFER_SIZE must be a power of 2."
2311 #if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
2312 #error "LED_CONTROL_MENU requires an LCD controller."
2315 #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) && DISABLED(NEOPIXEL_LED)
2316 #error "CASE_LIGHT_USE_NEOPIXEL requires NEOPIXEL_LED."
2319 #if ENABLED(SKEW_CORRECTION)
2320 #if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
2321 #error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
2323 #if ENABLED(SKEW_CORRECTION_FOR_Z)
2324 #if !defined(XZ_SKEW_FACTOR) && !(defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD))
2325 #error "SKEW_CORRECTION requires XZ_SKEW_FACTOR or XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD."
2327 #if !defined(YZ_SKEW_FACTOR) && !(defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD))
2328 #error "SKEW_CORRECTION requires YZ_SKEW_FACTOR or YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD."
2333 #if ENABLED(POWER_LOSS_RECOVERY) && DISABLED(ULTIPANEL)
2334 #error "POWER_LOSS_RECOVERY currently requires an LCD Controller."
2337 #if ENABLED(Z_STEPPER_AUTO_ALIGN)
2339 #if !Z_MULTI_STEPPER_DRIVERS
2340 #error "Z_STEPPER_AUTO_ALIGN requires Z_DUAL_STEPPER_DRIVERS or Z_TRIPLE_STEPPER_DRIVERS."
2341 #elif !HAS_BED_PROBE
2342 #error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
2345 #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
2346 #if DISABLED(Z_TRIPLE_STEPPER_DRIVERS)
2347 #error "Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS requires Z_TRIPLE_STEPPER_DRIVERS."
2349 constexpr
float sanity_arr_screw_xy[][2] = Z_STEPPER_ALIGN_STEPPER_XY;
2352 "Z_STEPPER_ALIGN_STEPPER_XY requires three {X,Y} entries (one per Z stepper)."
2358 #if ENABLED(PRINTCOUNTER) && DISABLED(EEPROM_SETTINGS)
2359 #error "PRINTCOUNTER requires EEPROM_SETTINGS. Please update your Configuration."
2362 #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !PIN_EXISTS(USB_CS, USB_INTR)
2363 #error "USB_CS_PIN and USB_INTR_PIN are required for USB_FLASH_DRIVE_SUPPORT."
2366 #if ENABLED(SD_FIRMWARE_UPDATE) && !defined(__AVR_ATmega2560__)
2367 #error "SD_FIRMWARE_UPDATE requires an ATmega2560-based (Arduino Mega) board."
2370 #if ENABLED(GCODE_MACROS) && !WITHIN(GCODE_MACROS_SLOTS, 1, 10)
2371 #error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
2374 #if ENABLED(CUSTOM_USER_MENUS)
2376 constexpr
char _chr1 = USER_GCODE_1[strlen(USER_GCODE_1) - 1];
2377 static_assert(_chr1 !=
'\n' && _chr1 !=
'\r',
"USER_GCODE_1 cannot have a newline at the end. Please remove it.");
2380 constexpr
char _chr2 = USER_GCODE_2[strlen(USER_GCODE_2) - 1];
2381 static_assert(_chr2 !=
'\n' && _chr2 !=
'\r',
"USER_GCODE_2 cannot have a newline at the end. Please remove it.");
2384 constexpr
char _chr3 = USER_GCODE_3[strlen(USER_GCODE_3) - 1];
2385 static_assert(_chr3 !=
'\n' && _chr3 !=
'\r',
"USER_GCODE_3 cannot have a newline at the end. Please remove it.");
2388 constexpr
char _chr4 = USER_GCODE_4[strlen(USER_GCODE_4) - 1];
2389 static_assert(_chr4 !=
'\n' && _chr4 !=
'\r',
"USER_GCODE_4 cannot have a newline at the end. Please remove it.");
2392 constexpr
char _chr5 = USER_GCODE_5[strlen(USER_GCODE_5) - 1];
2393 static_assert(_chr5 !=
'\n' && _chr5 !=
'\r',
"USER_GCODE_5 cannot have a newline at the end. Please remove it.");
2397 #if ENABLED(BACKLASH_COMPENSATION)
2399 #error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
2401 #ifndef BACKLASH_DISTANCE_MM
2402 #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM"
2404 #ifndef BACKLASH_CORRECTION
2405 #error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION"
2409 #if ENABLED(GRADIENT_MIX) && MIXING_VIRTUAL_TOOLS < 2
2410 #error "GRADIENT_MIX requires 2 or more MIXING_VIRTUAL_TOOLS."
2416 #if ENABLED(PHOTO_GCODE)
2417 #if (PIN_EXISTS(CHDK) + PIN_EXISTS(PHOTOGRAPH) + defined(PHOTO_SWITCH_POSITION)) > 1
2418 #error "Please define only one of CHDK_PIN, PHOTOGRAPH_PIN, or PHOTO_SWITCH_POSITION."
2419 #elif defined(PHOTO_SWITCH_POSITION) && !defined(PHOTO_POSITION)
2420 #error "PHOTO_SWITCH_POSITION requires PHOTO_POSITION. Please update your Configuration_adv.h."
2421 #elif PIN_EXISTS(CHDK) && defined(CHDK_DELAY)
2422 #error "CHDK_DELAY has been replaced by PHOTO_SWITCH_MS. Please update your Configuration_adv.h."
2423 #elif PIN_EXISTS(CHDK) && !defined(PHOTO_SWITCH_MS)
2424 #error "PHOTO_SWITCH_MS is required with CHDK_PIN. Please update your Configuration_adv.h."
2425 #elif defined(PHOTO_RETRACT_MM)
2426 static_assert(PHOTO_RETRACT_MM + 0 >= 0,
"PHOTO_RETRACT_MM must be >= 0.");
2433 #if ENABLED(PRUSA_MMU2)
2434 #if DISABLED(NOZZLE_PARK_FEATURE)
2435 #error "PRUSA_MMU2 requires NOZZLE_PARK_FEATURE."
2436 #elif EXTRUDERS != 5
2437 #error "PRUSA_MMU2 requires EXTRUDERS = 5."
2438 #elif DISABLED(ADVANCED_PAUSE_FEATURE)
2439 static_assert(
nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT,
"M600"),
"ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2.");
2446 #if ENABLED(PRINTCOUNTER)
2447 #if defined(SERVICE_INTERVAL_1) != defined(SERVICE_NAME_1)
2448 #error "Both SERVICE_NAME_1 and SERVICE_INTERVAL_1 are required."
2449 #elif defined(SERVICE_INTERVAL_2) != defined(SERVICE_NAME_2)
2450 #error "Both SERVICE_NAME_2 and SERVICE_INTERVAL_2 are required."
2451 #elif defined(SERVICE_INTERVAL_3) != defined(SERVICE_NAME_3)
2452 #error "Both SERVICE_NAME_3 and SERVICE_INTERVAL_3 are required."
2459 #if !BOTH(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
2460 #if ENABLED(DUAL_X_CARRIAGE)
2461 #error "DUAL_X_CARRIAGE requires both MIN_ and MAX_SOFTWARE_ENDSTOPS."
2462 #elif HAS_HOTEND_OFFSET
2463 #error "MIN_ and MAX_SOFTWARE_ENDSTOPS are both required with offset hotends."
2470 #if ENABLED(PSU_CONTROL) && !defined(PSU_ACTIVE_HIGH)
2471 #error "PSU_CONTROL requires PSU_ACTIVE_HIGH to be defined as 'true' or 'false'."
2475 #define _PIN_CONFLICT(P) (PIN_EXISTS(P) && P##_PIN == SPINDLE_LASER_PWM_PIN)
2476 #if BOTH(SPINDLE_FEATURE, LASER_FEATURE)
2477 #error "Enable only one of SPINDLE_FEATURE or LASER_FEATURE."
2478 #elif !PIN_EXISTS(SPINDLE_LASER_ENA)
2479 #error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN."
2480 #elif ENABLED(SPINDLE_CHANGE_DIR) && !PIN_EXISTS(SPINDLE_DIR)
2481 #error "SPINDLE_DIR_PIN is required for SPINDLE_CHANGE_DIR."
2482 #elif ENABLED(SPINDLE_LASER_PWM)
2483 #if !defined(SPINDLE_LASER_PWM_PIN) || SPINDLE_LASER_PWM_PIN < 0
2484 #error "SPINDLE_LASER_PWM_PIN is required for SPINDLE_LASER_PWM."
2485 #elif !PWM_PIN(SPINDLE_LASER_PWM_PIN)
2486 #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
2487 #elif SPINDLE_LASER_POWERUP_DELAY < 1
2488 #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
2489 #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
2490 #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
2491 #elif !defined(SPINDLE_LASER_PWM_INVERT)
2492 #error "SPINDLE_LASER_PWM_INVERT is required for (SPINDLE|LASER)_FEATURE."
2493 #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
2494 #error "SPINDLE_LASER_PWM equation constant(s) missing."
2495 #elif _PIN_CONFLICT(X_MIN)
2496 #error "SPINDLE_LASER_PWM pin conflicts with X_MIN_PIN."
2497 #elif _PIN_CONFLICT(X_MAX)
2498 #error "SPINDLE_LASER_PWM pin conflicts with X_MAX_PIN."
2499 #elif _PIN_CONFLICT(Z_STEP)
2500 #error "SPINDLE_LASER_PWM pin conflicts with Z_STEP_PIN."
2501 #elif _PIN_CONFLICT(CASE_LIGHT)
2502 #error "SPINDLE_LASER_PWM_PIN conflicts with CASE_LIGHT_PIN."
2503 #elif _PIN_CONFLICT(E0_AUTO_FAN)
2504 #error "SPINDLE_LASER_PWM_PIN conflicts with E0_AUTO_FAN_PIN."
2505 #elif _PIN_CONFLICT(E1_AUTO_FAN)
2506 #error "SPINDLE_LASER_PWM_PIN conflicts with E1_AUTO_FAN_PIN."
2507 #elif _PIN_CONFLICT(E2_AUTO_FAN)
2508 #error "SPINDLE_LASER_PWM_PIN conflicts with E2_AUTO_FAN_PIN."
2509 #elif _PIN_CONFLICT(E3_AUTO_FAN)
2510 #error "SPINDLE_LASER_PWM_PIN conflicts with E3_AUTO_FAN_PIN."
2511 #elif _PIN_CONFLICT(E4_AUTO_FAN)
2512 #error "SPINDLE_LASER_PWM_PIN conflicts with E4_AUTO_FAN_PIN."
2513 #elif _PIN_CONFLICT(E5_AUTO_FAN)
2514 #error "SPINDLE_LASER_PWM_PIN conflicts with E5_AUTO_FAN_PIN."
2515 #elif _PIN_CONFLICT(FAN)
2516 #error "SPINDLE_LASER_PWM_PIN conflicts with FAN_PIN."
2517 #elif _PIN_CONFLICT(FAN1)
2518 #error "SPINDLE_LASER_PWM_PIN conflicts with FAN1_PIN."
2519 #elif _PIN_CONFLICT(FAN2)
2520 #error "SPINDLE_LASER_PWM_PIN conflicts with FAN2_PIN."
2521 #elif _PIN_CONFLICT(CONTROLLERFAN)
2522 #error "SPINDLE_LASER_PWM_PIN conflicts with CONTROLLERFAN_PIN."
2523 #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_XY)
2524 #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_XY."
2525 #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_Z)
2526 #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_Z."
2527 #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_E)
2528 #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_E."
2531 #undef _PIN_CONFLICT
2534 #if !HAS_GRAPHICAL_LCD
2535 #if ENABLED(PRINT_PROGRESS_SHOW_DECIMALS)
2536 #error "PRINT_PROGRESS_SHOW_DECIMALS currently requires a Graphical LCD."
2537 #elif ENABLED(SHOW_REMAINING_TIME)
2538 #error "SHOW_REMAINING_TIME currently requires a Graphical LCD."
#define WITHIN(N, L, H)
Definition: macros.h:195
#define Y_MIN_POS
Definition: Configuration_A3ides_2209_MINI.h:985
#define DEFAULT_MAX_ACCELERATION
Definition: Configuration_A3ides_2209_MINI.h:696
constexpr float sanity_arr_1[]
Definition: SanityCheck.h:2238
#define E0_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:285
Definition: L6470_Marlin.h:30
Definition: L6470_Marlin.h:30
#define E1_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:286
Definition: L6470_Marlin.h:30
Definition: L6470_Marlin.h:30
constexpr float sanity_arr_3[]
Definition: SanityCheck.h:2240
Definition: L6470_Marlin.h:30
bool PWM_PIN(const pin_t p)
#define INVALID_TMC_ADDRESS(ST)
Definition: SanityCheck.h:2008
#define XYZ
Definition: macros.h:27
Definition: L6470_Marlin.h:30
#define X_MIN_POS
Definition: Configuration_A3ides_2209_MINI.h:984
#define E2_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:287
#define Y_MAX_POS
Definition: Configuration_A3ides_2209_MINI.h:988
Definition: L6470_Marlin.h:30
Definition: L6470_Marlin.h:30
Definition: L6470_Marlin.h:30
#define COUNT(a)
Definition: macros.h:200
#define X_BED_SIZE
Definition: Configuration_A3ides_2209_MINI.h:980
#define _ARR_TEST(N, I)
Definition: SanityCheck.h:2242
#define E3_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:288
constexpr float sanity_arr_2[]
Definition: SanityCheck.h:2239
#define Y_MAX_LENGTH
Definition: Conditionals_post.h:53
#define DEFAULT_MAX_FEEDRATE
Definition: Configuration_A3ides_2209_MINI.h:687
Definition: L6470_Marlin.h:30
#define DEFAULT_AXIS_STEPS_PER_UNIT
Definition: Configuration_A3ides_2209_MINI.h:677
#define X_MAX_POS
Definition: Configuration_A3ides_2209_MINI.h:987
#define Y_BED_SIZE
Definition: Configuration_A3ides_2209_MINI.h:981
Definition: L6470_Marlin.h:30
#define XYZE
Definition: macros.h:25
#define Z_STEPPER_COUNT
Definition: Conditionals_post.h:1768
#define XYZE_N
Definition: Conditionals_LCD.h:453
#define X_MAX_LENGTH
Definition: Conditionals_post.h:52
Definition: L6470_Marlin.h:30
Definition: L6470_Marlin.h:30