My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SanityCheck.h 114KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * SanityCheck.h
  25. *
  26. * Test configuration values for errors at compile-time.
  27. */
  28. /**
  29. * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features.
  30. */
  31. #if __cplusplus < 201103L
  32. #error "Marlin requires C++11 support (gcc >= 4.7, Arduino IDE >= 1.6.8). Please upgrade your toolchain."
  33. #endif
  34. /**
  35. * We try our best to include sanity checks for all changed configuration
  36. * directives because users have a tendency to use outdated config files with
  37. * the bleeding-edge source code, but sometimes this is not enough. This check
  38. * forces a minimum config file revision. Otherwise Marlin will not build.
  39. */
  40. #define HEXIFY(H) _CAT(0x,H)
  41. #if !defined(CONFIGURATION_H_VERSION) || HEXIFY(CONFIGURATION_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_H_VERSION)
  42. #error "You are using an old Configuration.h file, update it before building Marlin."
  43. #endif
  44. #if !defined(CONFIGURATION_ADV_H_VERSION) || HEXIFY(CONFIGURATION_ADV_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_ADV_H_VERSION)
  45. #error "You are using an old Configuration_adv.h file, update it before building Marlin."
  46. #endif
  47. #undef HEXIFY
  48. /**
  49. * Warnings for old configurations
  50. */
  51. #ifndef MOTHERBOARD
  52. #error "MOTHERBOARD is required. Please update your configuration."
  53. #elif !defined(X_BED_SIZE) || !defined(Y_BED_SIZE)
  54. #error "X_BED_SIZE and Y_BED_SIZE are now required! Please update your configuration."
  55. #elif WATCH_TEMP_PERIOD > 500
  56. #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds."
  57. #elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD))
  58. #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS."
  59. #elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD)
  60. #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED."
  61. #elif (CORE_IS_XZ || CORE_IS_YZ) && ENABLED(Z_LATE_ENABLE)
  62. #error "Z_LATE_ENABLE can't be used with COREXZ, COREZX, COREYZ, or COREZY."
  63. #elif defined(X_HOME_RETRACT_MM)
  64. #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
  65. #elif defined(SDCARDDETECTINVERTED)
  66. #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
  67. #elif defined(BTENABLED)
  68. #error "BTENABLED is now BLUETOOTH. Please update your configuration."
  69. #elif defined(CUSTOM_MENDEL_NAME)
  70. #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration."
  71. #elif defined(HAS_AUTOMATIC_VERSIONING)
  72. #error "HAS_AUTOMATIC_VERSIONING is now USE_AUTOMATIC_VERSIONING. Please update your configuration."
  73. #elif defined(SDSLOW)
  74. #error "SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead."
  75. #elif defined(SDEXTRASLOW)
  76. #error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead."
  77. #elif defined(FILAMENT_SENSOR)
  78. #error "FILAMENT_SENSOR is now FILAMENT_WIDTH_SENSOR. Please update your configuration."
  79. #elif defined(ENDSTOPPULLUP_FIL_RUNOUT)
  80. #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP. Please update your configuration."
  81. #elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
  82. #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
  83. #elif defined(LANGUAGE_INCLUDE)
  84. #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration."
  85. #elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y)
  86. #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead."
  87. #elif defined(PID_PARAMS_PER_EXTRUDER)
  88. #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead."
  89. #elif defined(EXTRUDER_WATTS) || defined(BED_WATTS)
  90. #error "EXTRUDER_WATTS and BED_WATTS are deprecated. Remove them from your configuration."
  91. #elif defined(SERVO_ENDSTOP_ANGLES)
  92. #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead."
  93. #elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR)
  94. #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
  95. #elif defined(Z_ENDSTOP_SERVO_NR)
  96. #error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR. Please update your configuration."
  97. #elif defined(DEFAULT_XYJERK)
  98. #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead."
  99. #elif defined(XY_TRAVEL_SPEED)
  100. #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead."
  101. #elif defined(PROBE_SERVO_DEACTIVATION_DELAY)
  102. #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead."
  103. #elif defined(SERVO_DEACTIVATION_DELAY)
  104. #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead."
  105. #elif ENABLED(FILAMENTCHANGEENABLE)
  106. #error "FILAMENTCHANGEENABLE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
  107. #elif ENABLED(FILAMENT_CHANGE_FEATURE)
  108. #error "FILAMENT_CHANGE_FEATURE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
  109. #elif defined(FILAMENT_CHANGE_X_POS) || defined(FILAMENT_CHANGE_Y_POS)
  110. #error "FILAMENT_CHANGE_[XY]_POS is now set with NOZZLE_PARK_POINT. Please update your configuration."
  111. #elif defined(FILAMENT_CHANGE_Z_ADD)
  112. #error "FILAMENT_CHANGE_Z_ADD is now set with NOZZLE_PARK_POINT. Please update your configuration."
  113. #elif defined(FILAMENT_CHANGE_XY_FEEDRATE)
  114. #error "FILAMENT_CHANGE_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE. Please update your configuration."
  115. #elif defined(FILAMENT_CHANGE_Z_FEEDRATE)
  116. #error "FILAMENT_CHANGE_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE. Please update your configuration."
  117. #elif defined(PAUSE_PARK_X_POS) || defined(PAUSE_PARK_Y_POS)
  118. #error "PAUSE_PARK_[XY]_POS is now set with NOZZLE_PARK_POINT. Please update your configuration."
  119. #elif defined(PAUSE_PARK_Z_ADD)
  120. #error "PAUSE_PARK_Z_ADD is now set with NOZZLE_PARK_POINT. Please update your configuration."
  121. #elif defined(PAUSE_PARK_XY_FEEDRATE)
  122. #error "PAUSE_PARK_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE. Please update your configuration."
  123. #elif defined(PAUSE_PARK_Z_FEEDRATE)
  124. #error "PAUSE_PARK_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE. Please update your configuration."
  125. #elif defined(FILAMENT_CHANGE_RETRACT_FEEDRATE)
  126. #error "FILAMENT_CHANGE_RETRACT_FEEDRATE is now PAUSE_PARK_RETRACT_FEEDRATE. Please update your configuration."
  127. #elif defined(FILAMENT_CHANGE_RETRACT_LENGTH)
  128. #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
  129. #elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
  130. #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
  131. #elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE)
  132. #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
  133. #elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
  134. #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
  135. #elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH)
  136. #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
  137. #elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
  138. #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
  139. #elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
  140. #error "FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS is now FILAMENT_CHANGE_ALERT_BEEPS. Please update your configuration."
  141. #elif defined(FILAMENT_CHANGE_NO_STEPPER_TIMEOUT)
  142. #error "FILAMENT_CHANGE_NO_STEPPER_TIMEOUT is now PAUSE_PARK_NO_STEPPER_TIMEOUT. Please update your configuration."
  143. #elif defined(PLA_PREHEAT_HOTEND_TEMP)
  144. #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration."
  145. #elif defined(PLA_PREHEAT_HPB_TEMP)
  146. #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED. Please update your configuration."
  147. #elif defined(PLA_PREHEAT_FAN_SPEED)
  148. #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED. Please update your configuration."
  149. #elif defined(ABS_PREHEAT_HOTEND_TEMP)
  150. #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND. Please update your configuration."
  151. #elif defined(ABS_PREHEAT_HPB_TEMP)
  152. #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED. Please update your configuration."
  153. #elif defined(ABS_PREHEAT_FAN_SPEED)
  154. #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED. Please update your configuration."
  155. #elif defined(ENDSTOPS_ONLY_FOR_HOMING)
  156. #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead."
  157. #elif defined(HOMING_FEEDRATE)
  158. #error "HOMING_FEEDRATE is deprecated. Set individual rates with HOMING_FEEDRATE_(XY|Z|E) instead."
  159. #elif defined(MANUAL_HOME_POSITIONS)
  160. #error "MANUAL_HOME_POSITIONS is deprecated. Set MANUAL_[XYZ]_HOME_POS as-needed instead."
  161. #elif defined(PID_ADD_EXTRUSION_RATE)
  162. #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."
  163. #elif defined(Z_RAISE_BEFORE_HOMING)
  164. #error "Z_RAISE_BEFORE_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
  165. #elif defined(MIN_Z_HEIGHT_FOR_HOMING)
  166. #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
  167. #elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
  168. #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead."
  169. #elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS)
  170. #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."
  171. #elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
  172. #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."
  173. #elif defined(MANUAL_BED_LEVELING)
  174. #error "MANUAL_BED_LEVELING is now LCD_BED_LEVELING. Please update your configuration."
  175. #elif defined(MESH_HOME_SEARCH_Z)
  176. #error "MESH_HOME_SEARCH_Z is now LCD_PROBE_Z_RANGE. Please update your configuration."
  177. #elif defined(MANUAL_PROBE_Z_RANGE)
  178. #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE. Please update your configuration."
  179. #elif !defined(MIN_STEPS_PER_SEGMENT)
  180. #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h.
  181. #elif MIN_STEPS_PER_SEGMENT <= 0
  182. #error "MIN_STEPS_PER_SEGMENT must be at least 1. Please update your Configuration_adv.h."
  183. #elif defined(PREVENT_DANGEROUS_EXTRUDE)
  184. #error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION. Please update your configuration."
  185. #elif defined(SCARA)
  186. #error "SCARA is now MORGAN_SCARA. Please update your configuration."
  187. #elif defined(ENABLE_AUTO_BED_LEVELING)
  188. #error "ENABLE_AUTO_BED_LEVELING is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
  189. #elif defined(AUTO_BED_LEVELING_FEATURE)
  190. #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
  191. #elif defined(ABL_GRID_POINTS)
  192. #error "ABL_GRID_POINTS is now GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y. Please update your configuration."
  193. #elif defined(ABL_GRID_POINTS_X) || defined(ABL_GRID_POINTS_Y)
  194. #error "ABL_GRID_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  195. #elif defined(ABL_GRID_MAX_POINTS_X) || defined(ABL_GRID_MAX_POINTS_Y)
  196. #error "ABL_GRID_MAX_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  197. #elif defined(MESH_NUM_X_POINTS) || defined(MESH_NUM_Y_POINTS)
  198. #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  199. #elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS)
  200. #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  201. #elif defined(UBL_G26_MESH_VALIDATION)
  202. #error "UBL_G26_MESH_VALIDATION is now G26_MESH_VALIDATION. Please update your configuration."
  203. #elif defined(UBL_MESH_EDIT_ENABLED)
  204. #error "UBL_MESH_EDIT_ENABLED is now G26_MESH_VALIDATION. Please update your configuration."
  205. #elif defined(UBL_MESH_EDITING)
  206. #error "UBL_MESH_EDITING is now G26_MESH_VALIDATION. Please update your configuration."
  207. #elif defined(BLTOUCH_HEATERS_OFF)
  208. #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF. Please update your configuration."
  209. #elif defined(BLTOUCH_V3)
  210. #error "BLTOUCH_V3 is obsolete. Please update your configuration."
  211. #elif defined(BLTOUCH_FORCE_OPEN_DRAIN_MODE)
  212. #error "BLTOUCH_FORCE_OPEN_DRAIN_MODE is obsolete. Please update your configuration."
  213. #elif defined(BEEPER)
  214. #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
  215. #elif defined(SDCARDDETECT)
  216. #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions."
  217. #elif defined(STAT_LED_RED) || defined(STAT_LED_BLUE)
  218. #error "STAT_LED_RED/STAT_LED_BLUE are now STAT_LED_RED_PIN/STAT_LED_BLUE_PIN. Please update your pins definitions."
  219. #elif defined(LCD_PIN_BL)
  220. #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions."
  221. #elif defined(LCD_PIN_RESET)
  222. #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
  223. #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)
  224. #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
  225. #elif defined(min_software_endstops) || defined(max_software_endstops)
  226. #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
  227. #elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)
  228. #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
  229. #elif defined(CONTROLLERFAN_PIN)
  230. #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
  231. #elif defined(MIN_RETRACT)
  232. #error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
  233. #elif defined(ADVANCE)
  234. #error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE."
  235. #elif defined(LIN_ADVANCE_E_D_RATIO)
  236. #error "LIN_ADVANCE (1.5) no longer uses LIN_ADVANCE_E_D_RATIO. Check your configuration."
  237. #elif defined(NEOPIXEL_RGBW_LED)
  238. #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration."
  239. #elif ENABLED(DELTA) && defined(DELTA_PROBEABLE_RADIUS)
  240. #error "Remove DELTA_PROBEABLE_RADIUS and use MIN_PROBE_EDGE to inset the probe area instead."
  241. #elif defined(UBL_MESH_INSET)
  242. #error "UBL_MESH_INSET is now just MESH_INSET. Please update your configuration."
  243. #elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X) || defined(UBL_MESH_MAX_Y)
  244. #error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]. Please update your configuration."
  245. #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)
  246. #error "ABL_PROBE_PT_[123]_[XY] is no longer required. Please remove it from Configuration.h."
  247. #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)
  248. #error "UBL_PROBE_PT_[123]_[XY] is no longer required. Please remove it from Configuration.h."
  249. #elif defined(LEFT_PROBE_BED_POSITION)
  250. #error "LEFT_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_LEFT. Please update your configuration."
  251. #elif defined(RIGHT_PROBE_BED_POSITION)
  252. #error "RIGHT_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_RIGHT. Please update your configuration."
  253. #elif defined(FRONT_PROBE_BED_POSITION)
  254. #error "FRONT_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_FRONT. Please update your configuration."
  255. #elif defined(BACK_PROBE_BED_POSITION)
  256. #error "BACK_PROBE_BED_POSITION has been replaced by MIN_PROBE_EDGE_BACK. Please update your configuration."
  257. #elif defined(ENABLE_MESH_EDIT_GFX_OVERLAY)
  258. #error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY. Please update your configuration."
  259. #elif defined(BABYSTEP_ZPROBE_GFX_REVERSE)
  260. #error "BABYSTEP_ZPROBE_GFX_REVERSE is now set by OVERLAY_GFX_REVERSE. Please update your configurations."
  261. #elif defined(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)
  262. #error "UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN is now SEGMENT_LEVELED_MOVES. Please update your configuration."
  263. #elif HAS_PID_HEATING && (defined(K1) || !defined(PID_K1))
  264. #error "K1 is now PID_K1. Please update your configuration."
  265. #elif defined(PROBE_DOUBLE_TOUCH)
  266. #error "PROBE_DOUBLE_TOUCH is now MULTIPLE_PROBING. Please update your configuration."
  267. #elif defined(ANET_KEYPAD_LCD)
  268. #error "ANET_KEYPAD_LCD is now ZONESTAR_LCD. Please update your configuration."
  269. #elif defined(LCD_I2C_SAINSMART_YWROBOT)
  270. #error "LCD_I2C_SAINSMART_YWROBOT is now LCD_SAINSMART_I2C_(1602|2004). Please update your configuration."
  271. #elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT)
  272. #error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN. Please update your configuration."
  273. #elif defined(HAVE_TMCDRIVER)
  274. #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
  275. #elif defined(STEALTHCHOP)
  276. #error "STEALTHCHOP is now STEALTHCHOP_(XY|Z|E). Please update your Configuration_adv.h."
  277. #elif defined(HAVE_TMC26X)
  278. #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
  279. #elif defined(HAVE_TMC2130)
  280. #error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h."
  281. #elif defined(HAVE_TMC2208)
  282. #error "HAVE_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208. Please update your Configuration.h."
  283. #elif defined(HAVE_L6470DRIVER)
  284. #error "HAVE_L6470DRIVER is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h."
  285. #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) \
  286. || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) || defined(E5_IS_TMC)
  287. #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
  288. #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) \
  289. || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X) || defined(E5_IS_TMC26X)
  290. #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X. Please update your Configuration.h."
  291. #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) \
  292. || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130) || defined(E5_IS_TMC2130)
  293. #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130. Please update your Configuration.h."
  294. #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) \
  295. || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208) || defined(E5_IS_TMC2208)
  296. #error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208. Please update your Configuration.h."
  297. #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) \
  298. || defined(E0_IS_L6470) || defined(E1_IS_L6470) || defined(E2_IS_L6470) || defined(E3_IS_L6470) || defined(E4_IS_L6470) || defined(E5_IS_L6470)
  299. #error "[AXIS]_IS_L6470 is now [AXIS]_DRIVER_TYPE L6470. Please update your Configuration.h."
  300. #elif defined(AUTOMATIC_CURRENT_CONTROL)
  301. #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
  302. #elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
  303. #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH. Please update your configuration."
  304. #elif ENABLED(LEVEL_BED_CORNERS) && !defined(LEVEL_CORNERS_INSET)
  305. #error "LEVEL_BED_CORNERS requires a LEVEL_CORNERS_INSET value. Please update your Configuration.h."
  306. #elif defined(BEZIER_JERK_CONTROL)
  307. #error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION. Please update your configuration."
  308. #elif DISABLED(CLASSIC_JERK) && defined(JUNCTION_DEVIATION_FACTOR)
  309. #error "JUNCTION_DEVIATION_FACTOR is now JUNCTION_DEVIATION_MM. Please update your configuration."
  310. #elif defined(JUNCTION_ACCELERATION_FACTOR)
  311. #error "JUNCTION_ACCELERATION_FACTOR is obsolete. Delete it from Configuration_adv.h."
  312. #elif defined(JUNCTION_ACCELERATION)
  313. #error "JUNCTION_ACCELERATION is obsolete. Delete it from Configuration_adv.h."
  314. #elif defined(MAX7219_DEBUG_STEPPER_HEAD)
  315. #error "MAX7219_DEBUG_STEPPER_HEAD is now MAX7219_DEBUG_PLANNER_HEAD. Please update your configuration."
  316. #elif defined(MAX7219_DEBUG_STEPPER_TAIL)
  317. #error "MAX7219_DEBUG_STEPPER_TAIL is now MAX7219_DEBUG_PLANNER_TAIL. Please update your configuration."
  318. #elif defined(MAX7219_DEBUG_STEPPER_QUEUE)
  319. #error "MAX7219_DEBUG_STEPPER_QUEUE is now MAX7219_DEBUG_PLANNER_QUEUE. Please update your configuration."
  320. #elif defined(ENDSTOP_NOISE_FILTER)
  321. #error "ENDSTOP_NOISE_FILTER is now ENDSTOP_NOISE_THRESHOLD [2-7]. Please update your configuration."
  322. #elif defined(RETRACT_ZLIFT)
  323. #error "RETRACT_ZLIFT is now RETRACT_ZRAISE. Please update your Configuration_adv.h."
  324. #elif defined(TOOLCHANGE_PARK_ZLIFT) || defined(TOOLCHANGE_UNPARK_ZLIFT)
  325. #error "TOOLCHANGE_PARK_ZLIFT and TOOLCHANGE_UNPARK_ZLIFT are now TOOLCHANGE_ZRAISE. Please update your configuration."
  326. #elif defined(SINGLENOZZLE_TOOLCHANGE_ZRAISE)
  327. #error "SINGLENOZZLE_TOOLCHANGE_ZRAISE is now TOOLCHANGE_ZRAISE. Please update your configuration."
  328. #elif defined(SINGLENOZZLE_SWAP_LENGTH)
  329. #error "SINGLENOZZLE_SWAP_LENGTH is now TOOLCHANGE_FIL_SWAP_LENGTH. Please update your configuration."
  330. #elif defined(SINGLENOZZLE_SWAP_RETRACT_SPEED)
  331. #error "SINGLENOZZLE_SWAP_RETRACT_SPEED is now TOOLCHANGE_FIL_SWAP_RETRACT_SPEED. Please update your configuration."
  332. #elif defined(SINGLENOZZLE_SWAP_PRIME_SPEED)
  333. #error "SINGLENOZZLE_SWAP_PRIME_SPEED is now TOOLCHANGE_FIL_SWAP_PRIME_SPEED. Please update your configuration."
  334. #elif defined(SINGLENOZZLE_SWAP_PARK)
  335. #error "SINGLENOZZLE_SWAP_PARK is now TOOLCHANGE_PARK. Please update your configuration."
  336. #elif defined(SINGLENOZZLE_TOOLCHANGE_XY)
  337. #error "SINGLENOZZLE_TOOLCHANGE_XY is now TOOLCHANGE_PARK_XY. Please update your configuration."
  338. #elif defined(SINGLENOZZLE_PARK_XY_FEEDRATE)
  339. #error "SINGLENOZZLE_PARK_XY_FEEDRATE is now TOOLCHANGE_PARK_XY_FEEDRATE. Please update your configuration."
  340. #elif defined(PARKING_EXTRUDER_SECURITY_RAISE)
  341. #error "PARKING_EXTRUDER_SECURITY_RAISE is now TOOLCHANGE_ZRAISE. Please update your configuration."
  342. #elif defined(SWITCHING_TOOLHEAD_SECURITY_RAISE)
  343. #error "SWITCHING_TOOLHEAD_SECURITY_RAISE is now TOOLCHANGE_ZRAISE. Please update your configuration."
  344. #elif defined(G0_FEEDRATE) && G0_FEEDRATE == 0
  345. #error "G0_FEEDRATE is now used to set the G0 feedrate. Please update your configuration."
  346. #elif defined(MBL_Z_STEP)
  347. #error "MBL_Z_STEP is now MESH_EDIT_Z_STEP. Please update your configuration."
  348. #elif defined(CHDK)
  349. #error "CHDK is now CHDK_PIN. Please update your Configuration_adv.h."
  350. #elif defined(MAX6675_SS)
  351. #error "MAX6675_SS is now MAX6675_SS_PIN. Please update your configuration and/or pins."
  352. #elif defined(MAX6675_SS2)
  353. #error "MAX6675_SS2 is now MAX6675_SS2_PIN. Please update your configuration and/or pins."
  354. #elif defined(SPINDLE_LASER_ENABLE)
  355. #error "SPINDLE_LASER_ENABLE is now SPINDLE_FEATURE or LASER_FEATURE. Please update your Configuration_adv.h."
  356. #elif defined(SPINDLE_LASER_ENABLE_PIN)
  357. #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN. Please update your Configuration_adv.h and/or pins."
  358. #elif defined(SPINDLE_DIR_CHANGE)
  359. #error "SPINDLE_DIR_CHANGE is now SPINDLE_CHANGE_DIR. Please update your Configuration_adv.h."
  360. #elif defined(SPINDLE_STOP_ON_DIR_CHANGE)
  361. #error "SPINDLE_STOP_ON_DIR_CHANGE is now SPINDLE_CHANGE_DIR_STOP. Please update your Configuration_adv.h."
  362. #elif defined(SPINDLE_LASER_ENABLE_INVERT)
  363. #error "SPINDLE_LASER_ENABLE_INVERT is now SPINDLE_LASER_ACTIVE_HIGH. Please update your Configuration_adv.h."
  364. #elif defined(CHAMBER_HEATER_PIN)
  365. #error "CHAMBER_HEATER_PIN is now HEATER_CHAMBER_PIN. Please update your configuration and/or pins."
  366. #elif defined(TMC_Z_CALIBRATION)
  367. #error "TMC_Z_CALIBRATION has been deprecated in favor of Z_STEPPER_AUTO_ALIGN. Please update your configuration."
  368. #elif defined(Z_MIN_PROBE_ENDSTOP)
  369. #error "Z_MIN_PROBE_ENDSTOP is no longer required. Please remove it from Configuration.h."
  370. #elif defined(DUAL_NOZZLE_DUPLICATION_MODE)
  371. #error "DUAL_NOZZLE_DUPLICATION_MODE is now MULTI_NOZZLE_DUPLICATION. Please update your configuration."
  372. #elif defined(MENU_ITEM_CASE_LIGHT)
  373. #error "MENU_ITEM_CASE_LIGHT is now CASE_LIGHT_MENU. Please update your configuration."
  374. #elif defined(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
  375. #error "ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED is now SD_ABORT_ON_ENDSTOP_HIT. Please update your Configuration_adv.h."
  376. #elif defined(LPC_SD_LCD) || defined(LPC_SD_ONBOARD) || defined(LPC_SD_CUSTOM_CABLE)
  377. #error "LPC_SD_(LCD|ONBOARD|CUSTOM_CABLE) are now SDCARD_CONNECTION. Please update your Configuration_adv.h."
  378. #elif defined(USB_SD_DISABLED)
  379. #error "USB_SD_DISABLED is now NO_SD_HOST_DRIVE. Please update your Configuration_adv.h."
  380. #elif defined(USB_SD_ONBOARD)
  381. #error "USB_SD_ONBOARD is obsolete. Disable NO_SD_HOST_DRIVE instead."
  382. #elif POWER_SUPPLY == 1
  383. #error "Replace POWER_SUPPLY 1 by enabling PSU_CONTROL and setting PSU_ACTIVE_HIGH to 'false'."
  384. #elif POWER_SUPPLY == 2
  385. #error "Replace POWER_SUPPLY 2 by enabling PSU_CONTROL and setting PSU_ACTIVE_HIGH to 'true'."
  386. #elif defined(POWER_SUPPLY)
  387. #error "POWER_SUPPLY is now obsolete. Please remove it from Configuration.h."
  388. #elif defined(MKS_ROBIN_TFT)
  389. #error "MKS_ROBIN_TFT is now FSMC_GRAPHICAL_TFT. Please update your configuration."
  390. #elif defined(SDPOWER)
  391. #error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
  392. #elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
  393. #error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them from Configuration.h."
  394. #elif defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_X)
  395. #error "Z_PROBE_ALLEN_KEY_(DEPLOY|STOW) coordinates are now a single setting. Please update your configuration."
  396. #elif defined(X_PROBE_OFFSET_FROM_EXTRUDER) || defined(Y_PROBE_OFFSET_FROM_EXTRUDER) || defined(Z_PROBE_OFFSET_FROM_EXTRUDER)
  397. #error "[XYZ]_PROBE_OFFSET_FROM_EXTRUDER is now NOZZLE_TO_PROBE_OFFSET. Please update your configuration."
  398. #elif defined(MIN_PROBE_X) || defined(MIN_PROBE_Y) || defined(MAX_PROBE_X) || defined(MAX_PROBE_Y)
  399. #error "(MIN|MAX)_PROBE_[XY] are now calculated at runtime. Please remove them from Configuration.h."
  400. #elif defined(Z_STEPPER_ALIGN_X) || defined(Z_STEPPER_ALIGN_X)
  401. #error "Z_STEPPER_ALIGN_X and Z_STEPPER_ALIGN_Y are now combined as Z_STEPPER_ALIGN_XY. Please update your Configuration_adv.h."
  402. #elif defined(JUNCTION_DEVIATION)
  403. #error "JUNCTION_DEVIATION is no longer required. (See CLASSIC_JERK). Please remove it from Configuration.h."
  404. #endif
  405. #define BOARD_MKS_13 -1000
  406. #define BOARD_TRIGORILLA -1001
  407. #define BOARD_RURAMPS4D -1002
  408. #define BOARD_FORMBOT_TREX2 -1003
  409. #define BOARD_BIQU_SKR_V1_1 -1004
  410. #define BOARD_STM32F1R -1005
  411. #define BOARD_STM32F103R -1006
  412. #if MB(MKS_13)
  413. #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
  414. #elif MB(TRIGORILLA)
  415. #error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration."
  416. #elif MB(RURAMPS4D)
  417. #error "BOARD_RURAMPS4D has been renamed BOARD_RURAMPS4D_11. Please update your configuration."
  418. #elif MB(FORMBOT_TREX2)
  419. #error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration."
  420. #elif MB(BIQU_SKR_V1_1)
  421. #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BIGTREE_SKR_V1_1. Please update your configuration."
  422. #elif MB(STM32F1R)
  423. #error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
  424. #elif MB(STM32F103R)
  425. #error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
  426. #endif
  427. #undef BOARD_MKS_13
  428. #undef BOARD_TRIGORILLA
  429. #undef BOARD_RURAMPS4D
  430. #undef BOARD_FORMBOT_TREX2
  431. #undef BOARD_BIQU_SKR_V1_1
  432. #undef BOARD_STM32F1R
  433. #undef BOARD_STM32F103R
  434. /**
  435. * Marlin release, version and default string
  436. */
  437. #ifndef SHORT_BUILD_VERSION
  438. #error "SHORT_BUILD_VERSION must be specified."
  439. #elif !defined(DETAILED_BUILD_VERSION)
  440. #error "BUILD_VERSION must be specified."
  441. #elif !defined(STRING_DISTRIBUTION_DATE)
  442. #error "STRING_DISTRIBUTION_DATE must be specified."
  443. #elif !defined(PROTOCOL_VERSION)
  444. #error "PROTOCOL_VERSION must be specified."
  445. #elif !defined(MACHINE_NAME)
  446. #error "MACHINE_NAME must be specified."
  447. #elif !defined(SOURCE_CODE_URL)
  448. #error "SOURCE_CODE_URL must be specified."
  449. #elif !defined(DEFAULT_MACHINE_UUID)
  450. #error "DEFAULT_MACHINE_UUID must be specified."
  451. #elif !defined(WEBSITE_URL)
  452. #error "WEBSITE_URL must be specified."
  453. #endif
  454. /**
  455. * Serial
  456. */
  457. #if !(defined(__AVR__) && defined(USBCON))
  458. #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
  459. #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
  460. #elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
  461. #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
  462. #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
  463. #error "TX_BUFFER_SIZE must be 0 or a power of 2 between 1 and 256."
  464. #endif
  465. #elif ANY(SERIAL_XON_XOFF, SERIAL_STATS_MAX_RX_QUEUED, SERIAL_STATS_DROPPED_RX)
  466. #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
  467. #endif
  468. #if SERIAL_PORT > 7
  469. #error "Set SERIAL_PORT to the port on your board. Usually this is 0."
  470. #endif
  471. #if defined(SERIAL_PORT_2) && NUM_SERIAL < 2
  472. #error "SERIAL_PORT_2 is not supported for your MOTHERBOARD. Disable it to continue."
  473. #endif
  474. /**
  475. * Dual / Triple Stepper Drivers
  476. */
  477. #if BOTH(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE)
  478. #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
  479. #elif ENABLED(X_DUAL_STEPPER_DRIVERS) && !(HAS_X2_ENABLE && HAS_X2_STEP && HAS_X2_DIR)
  480. #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)."
  481. #elif ENABLED(Y_DUAL_STEPPER_DRIVERS) && !(HAS_Y2_ENABLE && HAS_Y2_STEP && HAS_Y2_DIR)
  482. #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins (and an extra E plug)."
  483. #elif ENABLED(Z_DUAL_STEPPER_DRIVERS)
  484. #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
  485. #error "Please select either Z_TRIPLE_STEPPER_DRIVERS or Z_DUAL_STEPPER_DRIVERS, not both."
  486. #elif !(HAS_Z2_ENABLE && HAS_Z2_STEP && HAS_Z2_DIR)
  487. #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."
  488. #endif
  489. #elif ENABLED(Z_TRIPLE_STEPPER_DRIVERS) && !(HAS_Z2_ENABLE && HAS_Z2_STEP && HAS_Z2_DIR && HAS_Z3_ENABLE && HAS_Z3_STEP && HAS_Z3_DIR)
  490. #error "Z_TRIPLE_STEPPER_DRIVERS requires Z3 pins (and two extra E plugs)."
  491. #endif
  492. /**
  493. * Validate that the bed size fits
  494. */
  495. static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS) are too narrow to contain X_BED_SIZE.");
  496. static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS) are too narrow to contain Y_BED_SIZE.");
  497. /**
  498. * Granular software endstops (Marlin >= 1.1.7)
  499. */
  500. #if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z)
  501. #if IS_KINEMATIC
  502. #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
  503. #elif NONE(MIN_SOFTWARE_ENDSTOP_X, MIN_SOFTWARE_ENDSTOP_Y)
  504. #error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options."
  505. #endif
  506. #endif
  507. #if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z)
  508. #if IS_KINEMATIC
  509. #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
  510. #elif NONE(MAX_SOFTWARE_ENDSTOP_X, MAX_SOFTWARE_ENDSTOP_Y)
  511. #error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options."
  512. #endif
  513. #endif
  514. #if !defined(TARGET_LPC1768) && ANY( \
  515. ENDSTOPPULLDOWNS, \
  516. ENDSTOPPULLDOWN_XMAX, ENDSTOPPULLDOWN_YMAX, \
  517. ENDSTOPPULLDOWN_ZMAX, ENDSTOPPULLDOWN_XMIN, \
  518. ENDSTOPPULLDOWN_YMIN, ENDSTOPPULLDOWN_ZMIN \
  519. )
  520. #error "PULLDOWN pin mode is not available on the selected board."
  521. #endif
  522. #if BOTH(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS)
  523. #error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS."
  524. #elif BOTH(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN)
  525. #error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN."
  526. #elif BOTH(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX)
  527. #error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX."
  528. #elif BOTH(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX)
  529. #error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX."
  530. #elif BOTH(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX)
  531. #error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX."
  532. #elif BOTH(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN)
  533. #error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN."
  534. #elif BOTH(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN)
  535. #error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN."
  536. #elif BOTH(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN)
  537. #error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN."
  538. #endif
  539. /**
  540. * LCD Info Screen Style
  541. */
  542. #if LCD_INFO_SCREEN_STYLE > 0
  543. #if HAS_GRAPHICAL_LCD || LCD_WIDTH < 20 || LCD_HEIGHT < 4
  544. #error "Alternative LCD_INFO_SCREEN_STYLE requires 20x4 Character LCD."
  545. #elif LCD_INFO_SCREEN_STYLE > 1
  546. #error "LCD_INFO_SCREEN_STYLE only has options 0 and 1 at this time."
  547. #endif
  548. #endif
  549. /**
  550. * Progress Bar
  551. */
  552. #if ENABLED(LCD_PROGRESS_BAR)
  553. #if NONE(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
  554. #error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY."
  555. #elif !HAS_CHARACTER_LCD
  556. #error "LCD_PROGRESS_BAR requires a character LCD."
  557. #elif HAS_GRAPHICAL_LCD
  558. #error "LCD_PROGRESS_BAR does not apply to graphical displays."
  559. #elif ENABLED(FILAMENT_LCD_DISPLAY)
  560. #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
  561. #elif PROGRESS_MSG_EXPIRE < 0
  562. #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0."
  563. #endif
  564. #elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && !HAS_GRAPHICAL_LCD && DISABLED(EXTENSIBLE_UI)
  565. #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Graphical LCD, or EXTENSIBLE_UI."
  566. #endif
  567. #if !HAS_LCD_MENU && ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
  568. #error "SD_REPRINT_LAST_SELECTED_FILE currently requires a Marlin-native LCD menu."
  569. #endif
  570. /**
  571. * Custom Boot and Status screens
  572. */
  573. #if EITHER(SHOW_CUSTOM_BOOTSCREEN, CUSTOM_STATUS_SCREEN_IMAGE) && !HAS_GRAPHICAL_LCD
  574. #error "Graphical LCD is required for SHOW_CUSTOM_BOOTSCREEN and CUSTOM_STATUS_SCREEN_IMAGE."
  575. #endif
  576. /**
  577. * LCD Lightweight Screen Style
  578. */
  579. #if ENABLED(LIGHTWEIGHT_UI) && DISABLED(U8GLIB_ST7920)
  580. #error "LIGHTWEIGHT_UI requires a U8GLIB_ST7920-based display."
  581. #endif
  582. /**
  583. * SD File Sorting
  584. */
  585. #if ENABLED(SDCARD_SORT_ALPHA)
  586. #if SDSORT_LIMIT > 256
  587. #error "SDSORT_LIMIT must be 256 or smaller."
  588. #elif SDSORT_LIMIT < 10
  589. #error "SDSORT_LIMIT should be greater than 9 to be useful."
  590. #elif DISABLED(SDSORT_USES_RAM)
  591. #if ENABLED(SDSORT_DYNAMIC_RAM)
  592. #error "SDSORT_DYNAMIC_RAM requires SDSORT_USES_RAM (which reads the directory into RAM)."
  593. #elif ENABLED(SDSORT_CACHE_NAMES)
  594. #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)."
  595. #endif
  596. #endif
  597. #if ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
  598. #if SDSORT_CACHE_VFATS < 2
  599. #error "SDSORT_CACHE_VFATS must be 2 or greater!"
  600. #elif SDSORT_CACHE_VFATS > MAX_VFAT_ENTRIES
  601. #undef SDSORT_CACHE_VFATS
  602. #define SDSORT_CACHE_VFATS MAX_VFAT_ENTRIES
  603. #warning "SDSORT_CACHE_VFATS was reduced to MAX_VFAT_ENTRIES!"
  604. #endif
  605. #endif
  606. #endif
  607. #if defined(EVENT_GCODE_SD_STOP) && DISABLED(NOZZLE_PARK_FEATURE)
  608. static_assert(nullptr == strstr(EVENT_GCODE_SD_STOP, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_STOP.");
  609. #endif
  610. /**
  611. * I2C Position Encoders
  612. */
  613. #if ENABLED(I2C_POSITION_ENCODERS)
  614. #if !BOTH(BABYSTEPPING, BABYSTEP_XY)
  615. #error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY."
  616. #elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5)
  617. #error "I2CPE_ENCODER_CNT must be between 1 and 5."
  618. #endif
  619. #endif
  620. /**
  621. * Babystepping
  622. */
  623. #if ENABLED(BABYSTEPPING)
  624. #if ENABLED(SCARA)
  625. #error "BABYSTEPPING is not implemented for SCARA yet."
  626. #elif BOTH(DELTA, BABYSTEP_XY)
  627. #error "BABYSTEPPING only implemented for Z axis on deltabots."
  628. #elif BOTH(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING)
  629. #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination"
  630. #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE
  631. #error "BABYSTEP_ZPROBE_OFFSET requires a probe."
  632. #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !HAS_GRAPHICAL_LCD
  633. #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a Graphical LCD."
  634. #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && DISABLED(BABYSTEP_ZPROBE_OFFSET)
  635. #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
  636. #elif ENABLED(BABYSTEP_HOTEND_Z_OFFSET) && !HAS_HOTEND_OFFSET
  637. #error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS."
  638. #elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
  639. #error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible."
  640. #endif
  641. #endif
  642. /**
  643. * Filament Runout needs one or more pins and either SD Support or Auto print start detection
  644. */
  645. #if HAS_FILAMENT_SENSOR
  646. #if !PIN_EXISTS(FIL_RUNOUT)
  647. #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
  648. #elif NUM_RUNOUT_SENSORS > E_STEPPERS
  649. #error "NUM_RUNOUT_SENSORS cannot exceed the number of E steppers."
  650. #elif NUM_RUNOUT_SENSORS > 1 && !PIN_EXISTS(FIL_RUNOUT2)
  651. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 1 requires FIL_RUNOUT2_PIN."
  652. #elif NUM_RUNOUT_SENSORS > 2 && !PIN_EXISTS(FIL_RUNOUT3)
  653. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 2 requires FIL_RUNOUT3_PIN."
  654. #elif NUM_RUNOUT_SENSORS > 3 && !PIN_EXISTS(FIL_RUNOUT4)
  655. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 3 requires FIL_RUNOUT4_PIN."
  656. #elif NUM_RUNOUT_SENSORS > 4 && !PIN_EXISTS(FIL_RUNOUT5)
  657. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 4 requires FIL_RUNOUT5_PIN."
  658. #elif NUM_RUNOUT_SENSORS > 5 && !PIN_EXISTS(FIL_RUNOUT6)
  659. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 5 requires FIL_RUNOUT6_PIN."
  660. #elif NONE(SDSUPPORT, PRINTJOB_TIMER_AUTOSTART)
  661. #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
  662. #elif FILAMENT_RUNOUT_DISTANCE_MM < 0
  663. #error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero."
  664. #elif DISABLED(ADVANCED_PAUSE_FEATURE)
  665. static_assert(nullptr == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR.");
  666. #endif
  667. #endif
  668. /**
  669. * Advanced Pause
  670. */
  671. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  672. #if !HAS_RESUME_CONTINUE
  673. #error "ADVANCED_PAUSE_FEATURE currently requires an LCD controller or EMERGENCY_PARSER."
  674. #elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
  675. #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
  676. #elif ENABLED(PARK_HEAD_ON_PAUSE) && NONE(SDSUPPORT, NEWPANEL, EMERGENCY_PARSER)
  677. #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
  678. #elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
  679. #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT."
  680. #elif DISABLED(NOZZLE_PARK_FEATURE)
  681. #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
  682. #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
  683. #error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
  684. #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_SLOW_LOAD_LENGTH > EXTRUDE_MAXLENGTH
  685. #error "FILAMENT_CHANGE_SLOW_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
  686. #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_FAST_LOAD_LENGTH > EXTRUDE_MAXLENGTH
  687. #error "FILAMENT_CHANGE_FAST_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
  688. #endif
  689. #endif
  690. #if ENABLED(NOZZLE_PARK_FEATURE)
  691. constexpr float npp[] = NOZZLE_PARK_POINT;
  692. static_assert(COUNT(npp) == XYZ, "NOZZLE_PARK_POINT requires X, Y, and Z values.");
  693. #endif
  694. /**
  695. * Individual axis homing is useless for DELTAS
  696. */
  697. #if BOTH(INDIVIDUAL_AXIS_HOMING_MENU, DELTA)
  698. #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
  699. #endif
  700. /**
  701. * Options only for EXTRUDERS > 1
  702. */
  703. #if EXTRUDERS > 1
  704. #if EXTRUDERS > 6
  705. #error "Marlin supports a maximum of 6 EXTRUDERS."
  706. #endif
  707. #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
  708. #error "EXTRUDERS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT."
  709. #endif
  710. #if ENABLED(HEATERS_PARALLEL)
  711. #error "EXTRUDERS must be 1 with HEATERS_PARALLEL."
  712. #endif
  713. #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
  714. #ifndef TOOLCHANGE_FIL_SWAP_LENGTH
  715. #error "TOOLCHANGE_FILAMENT_SWAP requires TOOLCHANGE_FIL_SWAP_LENGTH. Please update your Configuration."
  716. #elif !defined(TOOLCHANGE_FIL_SWAP_RETRACT_SPEED)
  717. #error "TOOLCHANGE_FILAMENT_SWAP requires TOOLCHANGE_FIL_SWAP_RETRACT_SPEED. Please update your Configuration."
  718. #elif !defined(TOOLCHANGE_FIL_SWAP_PRIME_SPEED)
  719. #error "TOOLCHANGE_FILAMENT_SWAP requires TOOLCHANGE_FIL_SWAP_PRIME_SPEED. Please update your Configuration."
  720. #endif
  721. #endif
  722. #if ENABLED(TOOLCHANGE_PARK)
  723. #ifndef TOOLCHANGE_PARK_XY
  724. #error "TOOLCHANGE_PARK requires TOOLCHANGE_PARK_XY. Please update your Configuration."
  725. #elif !defined(TOOLCHANGE_PARK_XY_FEEDRATE)
  726. #error "TOOLCHANGE_PARK requires TOOLCHANGE_PARK_XY_FEEDRATE. Please update your Configuration."
  727. #endif
  728. #endif
  729. #ifndef TOOLCHANGE_ZRAISE
  730. #error "TOOLCHANGE_ZRAISE required for EXTRUDERS > 1. Please update your Configuration_adv.h."
  731. #endif
  732. #elif ENABLED(MK2_MULTIPLEXER)
  733. #error "MK2_MULTIPLEXER requires 2 or more EXTRUDERS."
  734. #elif ENABLED(SINGLENOZZLE)
  735. #error "SINGLENOZZLE requires 2 or more EXTRUDERS."
  736. #endif
  737. /**
  738. * Sanity checking for the Průša MK2 Multiplexer
  739. */
  740. #ifdef SNMM
  741. #error "SNMM is now MK2_MULTIPLEXER. Please update your configuration."
  742. #endif
  743. /**
  744. * A Dual Nozzle carriage with switching servo
  745. */
  746. #if ENABLED(SWITCHING_NOZZLE)
  747. #if ENABLED(DUAL_X_CARRIAGE)
  748. #error "SWITCHING_NOZZLE and DUAL_X_CARRIAGE are incompatible."
  749. #elif ENABLED(SINGLENOZZLE)
  750. #error "SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
  751. #elif EXTRUDERS != 2
  752. #error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
  753. #elif NUM_SERVOS < 1
  754. #error "SWITCHING_NOZZLE requires NUM_SERVOS >= 1."
  755. #endif
  756. #ifndef SWITCHING_NOZZLE_SERVO_NR
  757. #error "SWITCHING_NOZZLE requires SWITCHING_NOZZLE_SERVO_NR."
  758. #elif SWITCHING_NOZZLE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
  759. #error "SERVO0_PIN must be defined for your SWITCHING_NOZZLE."
  760. #elif SWITCHING_NOZZLE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
  761. #error "SERVO1_PIN must be defined for your SWITCHING_NOZZLE."
  762. #elif SWITCHING_NOZZLE_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
  763. #error "SERVO2_PIN must be defined for your SWITCHING_NOZZLE."
  764. #elif SWITCHING_NOZZLE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
  765. #error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
  766. #endif
  767. #ifdef SWITCHING_NOZZLE_E1_SERVO_NR
  768. #if SWITCHING_NOZZLE_E1_SERVO_NR == SWITCHING_NOZZLE_SERVO_NR
  769. #error "SWITCHING_NOZZLE_E1_SERVO_NR must be different from SWITCHING_NOZZLE_SERVO_NR."
  770. #elif SWITCHING_NOZZLE_E1_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
  771. #error "SERVO0_PIN must be defined for your SWITCHING_NOZZLE."
  772. #elif SWITCHING_NOZZLE_E1_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
  773. #error "SERVO1_PIN must be defined for your SWITCHING_NOZZLE."
  774. #elif SWITCHING_NOZZLE_E1_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
  775. #error "SERVO2_PIN must be defined for your SWITCHING_NOZZLE."
  776. #elif SWITCHING_NOZZLE_E1_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
  777. #error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
  778. #endif
  779. #endif
  780. #endif
  781. /**
  782. * Single Stepper Dual Extruder with switching servo
  783. */
  784. #if ENABLED(SWITCHING_EXTRUDER)
  785. #if NUM_SERVOS < 1
  786. #error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1."
  787. #elif SWITCHING_EXTRUDER_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
  788. #error "SERVO0_PIN must be defined for your SWITCHING_EXTRUDER."
  789. #elif SWITCHING_EXTRUDER_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
  790. #error "SERVO1_PIN must be defined for your SWITCHING_EXTRUDER."
  791. #elif SWITCHING_EXTRUDER_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
  792. #error "SERVO2_PIN must be defined for your SWITCHING_EXTRUDER."
  793. #elif SWITCHING_EXTRUDER_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
  794. #error "SERVO3_PIN must be defined for your SWITCHING_EXTRUDER."
  795. #endif
  796. #if EXTRUDERS > 3
  797. #if NUM_SERVOS < 2
  798. #error "SWITCHING_EXTRUDER with 4 extruders requires NUM_SERVOS >= 2."
  799. #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
  800. #error "SERVO0_PIN must be defined for your SWITCHING_EXTRUDER."
  801. #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
  802. #error "SERVO1_PIN must be defined for your SWITCHING_EXTRUDER."
  803. #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
  804. #error "SERVO2_PIN must be defined for your SWITCHING_EXTRUDER."
  805. #elif SWITCHING_EXTRUDER_E23_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
  806. #error "SERVO3_PIN must be defined for your SWITCHING_EXTRUDER."
  807. #elif SWITCHING_EXTRUDER_E23_SERVO_NR == SWITCHING_EXTRUDER_SERVO_NR
  808. #error "SWITCHING_EXTRUDER_E23_SERVO_NR should be a different extruder from SWITCHING_EXTRUDER_SERVO_NR."
  809. #endif
  810. #endif
  811. #endif
  812. /**
  813. * Mixing Extruder requirements
  814. */
  815. #if ENABLED(MIXING_EXTRUDER)
  816. #if EXTRUDERS > 1
  817. #error "For MIXING_EXTRUDER set MIXING_STEPPERS > 1 instead of EXTRUDERS > 1."
  818. #elif MIXING_STEPPERS < 2
  819. #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
  820. #elif ENABLED(FILAMENT_SENSOR)
  821. #error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway."
  822. #elif ENABLED(SWITCHING_EXTRUDER)
  823. #error "Please select either MIXING_EXTRUDER or SWITCHING_EXTRUDER, not both."
  824. #elif ENABLED(SINGLENOZZLE)
  825. #error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE."
  826. #endif
  827. #endif
  828. /**
  829. * Linear Advance 1.5 - Check K value range
  830. */
  831. #if ENABLED(LIN_ADVANCE)
  832. static_assert(
  833. WITHIN(LIN_ADVANCE_K, 0, 10),
  834. "LIN_ADVANCE_K must be a value from 0 to 10 (Changed in LIN_ADVANCE v1.5, Marlin 1.1.9)."
  835. );
  836. #endif
  837. /**
  838. * Special tool-changing options
  839. */
  840. #if 1 < 0 \
  841. + ENABLED(SINGLENOZZLE) \
  842. + ENABLED(DUAL_X_CARRIAGE) \
  843. + ENABLED(PARKING_EXTRUDER) \
  844. + ENABLED(MAGNETIC_PARKING_EXTRUDER) \
  845. + ENABLED(SWITCHING_TOOLHEAD) \
  846. + ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) \
  847. + ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
  848. #error "Please select only one of SINGLENOZZLE, DUAL_X_CARRIAGE, PARKING_EXTRUDER, SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, or ELECTROMAGNETIC_SWITCHING_TOOLHEAD."
  849. #endif
  850. /**
  851. * (Magnetic) Parking Extruder requirements
  852. */
  853. #if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
  854. #if ENABLED(EXT_SOLENOID)
  855. #error "(MAGNETIC_)PARKING_EXTRUDER and EXT_SOLENOID are incompatible. (Pins are used twice.)"
  856. #elif EXTRUDERS != 2
  857. #error "(MAGNETIC_)PARKING_EXTRUDER requires exactly 2 EXTRUDERS."
  858. #elif !defined(PARKING_EXTRUDER_PARKING_X)
  859. #error "(MAGNETIC_)PARKING_EXTRUDER requires PARKING_EXTRUDER_PARKING_X."
  860. #elif !defined(TOOLCHANGE_ZRAISE)
  861. #error "(MAGNETIC_)PARKING_EXTRUDER requires TOOLCHANGE_ZRAISE."
  862. #elif TOOLCHANGE_ZRAISE < 0
  863. #error "TOOLCHANGE_ZRAISE must be 0 or higher."
  864. #elif ENABLED(PARKING_EXTRUDER)
  865. #if !PIN_EXISTS(SOL0, SOL1)
  866. #error "PARKING_EXTRUDER requires SOL0_PIN and SOL1_PIN."
  867. #elif !defined(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE) || !WITHIN(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE, LOW, HIGH)
  868. #error "PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE must be defined as HIGH or LOW."
  869. #elif !defined(PARKING_EXTRUDER_SOLENOIDS_DELAY) || !WITHIN(PARKING_EXTRUDER_SOLENOIDS_DELAY, 0, 2000)
  870. #error "PARKING_EXTRUDER_SOLENOIDS_DELAY must be between 0 and 2000 (ms)."
  871. #endif
  872. #endif
  873. #endif
  874. /**
  875. * Switching Toolhead requirements
  876. */
  877. #if ENABLED(SWITCHING_TOOLHEAD)
  878. #ifndef SWITCHING_TOOLHEAD_SERVO_NR
  879. #error "SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_SERVO_NR."
  880. #elif EXTRUDERS < 2
  881. #error "SWITCHING_TOOLHEAD requires at least 2 EXTRUDERS."
  882. #elif NUM_SERVOS < (SWITCHING_TOOLHEAD_SERVO_NR - 1)
  883. #if SWITCHING_TOOLHEAD_SERVO_NR == 0
  884. #error "A SWITCHING_TOOLHEAD_SERVO_NR of 0 requires NUM_SERVOS >= 1."
  885. #elif SWITCHING_TOOLHEAD_SERVO_NR == 1
  886. #error "A SWITCHING_TOOLHEAD_SERVO_NR of 1 requires NUM_SERVOS >= 2."
  887. #elif SWITCHING_TOOLHEAD_SERVO_NR == 2
  888. #error "A SWITCHING_TOOLHEAD_SERVO_NR of 2 requires NUM_SERVOS >= 3."
  889. #elif SWITCHING_TOOLHEAD_SERVO_NR == 3
  890. #error "A SWITCHING_TOOLHEAD_SERVO_NR of 3 requires NUM_SERVOS >= 4."
  891. #endif
  892. #elif !defined(TOOLCHANGE_ZRAISE)
  893. #error "SWITCHING_TOOLHEAD requires TOOLCHANGE_ZRAISE."
  894. #elif TOOLCHANGE_ZRAISE < 0
  895. #error "TOOLCHANGE_ZRAISE must be 0 or higher."
  896. #endif
  897. #endif
  898. /**
  899. * (Electro)magnetic Switching Toolhead requirements
  900. */
  901. #if EITHER(MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
  902. #ifndef SWITCHING_TOOLHEAD_Y_POS
  903. #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_POS"
  904. #elif !defined(SWITCHING_TOOLHEAD_X_POS)
  905. #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_X_POS"
  906. #elif !defined(SWITCHING_TOOLHEAD_Z_HOP)
  907. #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Z_HOP."
  908. #elif !defined(SWITCHING_TOOLHEAD_Y_CLEAR)
  909. #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_CLEAR."
  910. #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
  911. #if ENABLED(EXT_SOLENOID)
  912. #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD and EXT_SOLENOID are incompatible. (Pins are used twice.)"
  913. #elif !PIN_EXISTS(SOL0)
  914. #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SOL0_PIN."
  915. #endif
  916. #endif
  917. #endif
  918. /**
  919. * Part-Cooling Fan Multiplexer requirements
  920. */
  921. #if PIN_EXISTS(FANMUX1)
  922. #if !HAS_FANMUX
  923. #error "FANMUX0_PIN must be set before FANMUX1_PIN can be set."
  924. #endif
  925. #elif PIN_EXISTS(FANMUX2)
  926. #error "FANMUX0_PIN and FANMUX1_PIN must be set before FANMUX2_PIN can be set."
  927. #endif
  928. /**
  929. * Limited number of servos
  930. */
  931. #if NUM_SERVOS > NUM_SERVO_PLUGS
  932. #error "The selected board doesn't support enough servos for your configuration. Reduce NUM_SERVOS."
  933. #endif
  934. /**
  935. * Servo deactivation depends on servo endstops, switching nozzle, or switching extruder
  936. */
  937. #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)
  938. #error "Z_PROBE_SERVO_NR, switching nozzle, switching toolhead or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE."
  939. #endif
  940. /**
  941. * Required LCD language
  942. */
  943. #if HAS_CHARACTER_LCD && !defined(DISPLAY_CHARSET_HD44780)
  944. #error "You must set DISPLAY_CHARSET_HD44780 to JAPANESE, WESTERN or CYRILLIC for your LCD controller."
  945. #endif
  946. /**
  947. * Bed Heating Options - PID vs Limit Switching
  948. */
  949. #if BOTH(PIDTEMPBED, BED_LIMIT_SWITCHING)
  950. #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
  951. #endif
  952. /**
  953. * Kinematics
  954. */
  955. /**
  956. * Allow only one kinematic type to be defined
  957. */
  958. #if 1 < 0 \
  959. + ENABLED(DELTA) \
  960. + ENABLED(MORGAN_SCARA) \
  961. + ENABLED(COREXY) \
  962. + ENABLED(COREXZ) \
  963. + ENABLED(COREYZ) \
  964. + ENABLED(COREYX) \
  965. + ENABLED(COREZX) \
  966. + ENABLED(COREZY)
  967. #error "Please enable only one of DELTA, MORGAN_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
  968. #endif
  969. /**
  970. * Delta requirements
  971. */
  972. #if ENABLED(DELTA)
  973. #if NONE(USE_XMAX_PLUG, USE_YMAX_PLUG, USE_ZMAX_PLUG)
  974. #error "You probably want to use Max Endstops for DELTA!"
  975. #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
  976. #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
  977. #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || HAS_LCD_MENU)
  978. #error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller."
  979. #elif ABL_GRID
  980. #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
  981. #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
  982. #elif GRID_MAX_POINTS_X < 3
  983. #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be 3 or higher."
  984. #endif
  985. #endif
  986. #endif
  987. /**
  988. * Junction deviation is incompatible with kinematic systems.
  989. */
  990. #if DISABLED(CLASSIC_JERK) && IS_KINEMATIC
  991. #error "CLASSIC_JERK is required for DELTA and SCARA."
  992. #endif
  993. /**
  994. * Probes
  995. */
  996. /**
  997. * Allow only one probe option to be defined
  998. */
  999. #if 1 < 0 \
  1000. + ENABLED(PROBE_MANUALLY) \
  1001. + ENABLED(FIX_MOUNTED_PROBE) \
  1002. + (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \
  1003. + ENABLED(BLTOUCH) \
  1004. + ENABLED(TOUCH_MI_PROBE) \
  1005. + ENABLED(SOLENOID_PROBE) \
  1006. + ENABLED(Z_PROBE_ALLEN_KEY) \
  1007. + ENABLED(Z_PROBE_SLED) \
  1008. + ENABLED(RACK_AND_PINION_PROBE) \
  1009. + ENABLED(SENSORLESS_PROBING)
  1010. #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."
  1011. #endif
  1012. #if HAS_BED_PROBE
  1013. /**
  1014. * Z_PROBE_SLED is incompatible with DELTA
  1015. */
  1016. #if BOTH(Z_PROBE_SLED, DELTA)
  1017. #error "You cannot use Z_PROBE_SLED with DELTA."
  1018. #endif
  1019. /**
  1020. * SOLENOID_PROBE requirements
  1021. */
  1022. #if ENABLED(SOLENOID_PROBE)
  1023. #if ENABLED(EXT_SOLENOID)
  1024. #error "SOLENOID_PROBE is incompatible with EXT_SOLENOID."
  1025. #elif !HAS_SOLENOID_1
  1026. #error "SOLENOID_PROBE requires SOL1_PIN. It can be added to your Configuration.h."
  1027. #endif
  1028. #endif
  1029. /**
  1030. * NUM_SERVOS is required for a Z servo probe
  1031. */
  1032. #if HAS_Z_SERVO_PROBE
  1033. #ifndef NUM_SERVOS
  1034. #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)."
  1035. #elif Z_PROBE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
  1036. #error "SERVO0_PIN must be defined for your servo or BLTOUCH probe."
  1037. #elif Z_PROBE_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
  1038. #error "SERVO1_PIN must be defined for your servo or BLTOUCH probe."
  1039. #elif Z_PROBE_SERVO_NR == 2 && !PIN_EXISTS(SERVO2)
  1040. #error "SERVO2_PIN must be defined for your servo or BLTOUCH probe."
  1041. #elif Z_PROBE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
  1042. #error "SERVO3_PIN must be defined for your servo or BLTOUCH probe."
  1043. #elif Z_PROBE_SERVO_NR >= NUM_SERVOS
  1044. #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS."
  1045. #endif
  1046. #endif
  1047. #if ENABLED(BLTOUCH)
  1048. #if BLTOUCH_DELAY < 200
  1049. #error "BLTOUCH_DELAY less than 200 is unsafe and is not supported."
  1050. #elif DISABLED(BLTOUCH_SET_5V_MODE) && NONE(ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN, ENDSTOPPULLUP_ZMIN_PROBE)
  1051. #error "BLTOUCH without BLTOUCH_SET_5V_MODE requires ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN or ENDSTOPPULLUP_ZMIN_PROBE."
  1052. #endif
  1053. #endif
  1054. #if ENABLED(RACK_AND_PINION_PROBE) && !(defined(Z_PROBE_DEPLOY_X) && defined(Z_PROBE_RETRACT_X))
  1055. #error "RACK_AND_PINION_PROBE requires Z_PROBE_DEPLOY_X and Z_PROBE_RETRACT_X."
  1056. #endif
  1057. /**
  1058. * Touch-MI probe requirements
  1059. */
  1060. #if ENABLED(TOUCH_MI_PROBE)
  1061. #if DISABLED(Z_SAFE_HOMING)
  1062. #error "TOUCH_MI_PROBE requires Z_SAFE_HOMING."
  1063. #elif !defined(TOUCH_MI_RETRACT_Z)
  1064. #error "TOUCH_MI_PROBE requires TOUCH_MI_RETRACT_Z."
  1065. #elif defined(Z_AFTER_PROBING)
  1066. #error "TOUCH_MI_PROBE requires Z_AFTER_PROBING to be disabled."
  1067. #elif Z_HOMING_HEIGHT < 10
  1068. #error "TOUCH_MI_PROBE requires Z_HOMING_HEIGHT >= 10."
  1069. #elif Z_MIN_PROBE_ENDSTOP_INVERTING
  1070. #error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING to be set to false."
  1071. #elif DISABLED(BABYSTEP_ZPROBE_OFFSET)
  1072. #error "TOUCH_MI_PROBE requires BABYSTEPPING with BABYSTEP_ZPROBE_OFFSET."
  1073. #elif !HAS_RESUME_CONTINUE
  1074. #error "TOUCH_MI_PROBE currently requires an LCD controller or EMERGENCY_PARSER."
  1075. #endif
  1076. #endif
  1077. /**
  1078. * Require pin options and pins to be defined
  1079. */
  1080. #if ENABLED(SENSORLESS_PROBING)
  1081. #if ENABLED(DELTA) && !(AXIS_HAS_STALLGUARD(X) && AXIS_HAS_STALLGUARD(Y) && AXIS_HAS_STALLGUARD(Z))
  1082. #error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z."
  1083. #elif !AXIS_HAS_STALLGUARD(Z)
  1084. #error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z."
  1085. #endif
  1086. #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  1087. #if DISABLED(USE_ZMIN_PLUG)
  1088. #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires USE_ZMIN_PLUG to be enabled."
  1089. #elif !HAS_Z_MIN
  1090. #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires the Z_MIN_PIN to be defined."
  1091. #elif Z_MIN_PROBE_ENDSTOP_INVERTING != Z_MIN_ENDSTOP_INVERTING
  1092. #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires Z_MIN_ENDSTOP_INVERTING to match Z_MIN_PROBE_ENDSTOP_INVERTING."
  1093. #endif
  1094. #elif !HAS_Z_MIN_PROBE_PIN
  1095. #error "Z_MIN_PROBE_PIN must be defined if Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN is not enabled."
  1096. #endif
  1097. /**
  1098. * Make sure Z raise values are set
  1099. */
  1100. #ifndef Z_CLEARANCE_DEPLOY_PROBE
  1101. #error "You must define Z_CLEARANCE_DEPLOY_PROBE in your configuration."
  1102. #elif !defined(Z_CLEARANCE_BETWEEN_PROBES)
  1103. #error "You must define Z_CLEARANCE_BETWEEN_PROBES in your configuration."
  1104. #elif Z_CLEARANCE_DEPLOY_PROBE < 0
  1105. #error "Probes need Z_CLEARANCE_DEPLOY_PROBE >= 0."
  1106. #elif Z_CLEARANCE_BETWEEN_PROBES < 0
  1107. #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
  1108. #elif Z_AFTER_PROBING < 0
  1109. #error "Probes need Z_AFTER_PROBING >= 0."
  1110. #endif
  1111. #if MULTIPLE_PROBING || EXTRA_PROBING
  1112. #if !MULTIPLE_PROBING
  1113. #error "EXTRA_PROBING requires MULTIPLE_PROBING."
  1114. #elif MULTIPLE_PROBING < 2
  1115. #error "MULTIPLE_PROBING must be 2 or more."
  1116. #elif MULTIPLE_PROBING <= EXTRA_PROBING
  1117. #error "EXTRA_PROBING must be less than MULTIPLE_PROBING."
  1118. #endif
  1119. #endif
  1120. #if Z_PROBE_LOW_POINT > 0
  1121. #error "Z_PROBE_LOW_POINT must be less than or equal to 0."
  1122. #endif
  1123. #else
  1124. /**
  1125. * Require some kind of probe for bed leveling and probe testing
  1126. */
  1127. #if HAS_ABL_NOT_UBL && !PROBE_SELECTED
  1128. #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."
  1129. #endif
  1130. #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
  1131. #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."
  1132. #endif
  1133. #endif
  1134. /**
  1135. * Allow only one bed leveling option to be defined
  1136. */
  1137. #if 1 < 0 \
  1138. + ENABLED(AUTO_BED_LEVELING_LINEAR) \
  1139. + ENABLED(AUTO_BED_LEVELING_3POINT) \
  1140. + ENABLED(AUTO_BED_LEVELING_BILINEAR) \
  1141. + ENABLED(AUTO_BED_LEVELING_UBL) \
  1142. + ENABLED(MESH_BED_LEVELING)
  1143. #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."
  1144. #endif
  1145. /**
  1146. * Bed Leveling Requirements
  1147. */
  1148. #if ENABLED(AUTO_BED_LEVELING_UBL)
  1149. /**
  1150. * Unified Bed Leveling
  1151. */
  1152. // Hide PROBE_MANUALLY from the rest of the code
  1153. #undef PROBE_MANUALLY
  1154. #if IS_SCARA
  1155. #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
  1156. #elif DISABLED(EEPROM_SETTINGS)
  1157. #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
  1158. #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
  1159. #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
  1160. #elif !defined(RESTORE_LEVELING_AFTER_G28)
  1161. #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'."
  1162. #endif
  1163. #elif HAS_ABL_NOT_UBL
  1164. /**
  1165. * Auto Bed Leveling
  1166. */
  1167. /**
  1168. * Delta and SCARA have limited bed leveling options
  1169. */
  1170. #if IS_SCARA && DISABLED(AUTO_BED_LEVELING_BILINEAR)
  1171. #error "SCARA machines can only use the AUTO_BED_LEVELING_BILINEAR leveling option."
  1172. #endif
  1173. #elif ENABLED(MESH_BED_LEVELING)
  1174. // Hide PROBE_MANUALLY from the rest of the code
  1175. #undef PROBE_MANUALLY
  1176. /**
  1177. * Mesh Bed Leveling
  1178. */
  1179. #if ENABLED(DELTA)
  1180. #error "MESH_BED_LEVELING is not compatible with DELTA printers."
  1181. #elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
  1182. #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
  1183. #endif
  1184. #endif
  1185. #if HAS_MESH
  1186. #if HAS_CLASSIC_JERK
  1187. static_assert(DEFAULT_ZJERK > 0.1, "Low DEFAULT_ZJERK values are incompatible with mesh-based leveling.");
  1188. #endif
  1189. #elif ENABLED(G26_MESH_VALIDATION)
  1190. #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL."
  1191. #endif
  1192. #if ENABLED(MESH_EDIT_GFX_OVERLAY) && !(ENABLED(AUTO_BED_LEVELING_UBL) && HAS_GRAPHICAL_LCD)
  1193. #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
  1194. #endif
  1195. #if ENABLED(G29_RETRY_AND_RECOVER)
  1196. #if ENABLED(AUTO_BED_LEVELING_UBL)
  1197. #error "G29_RETRY_AND_RECOVER is not compatible with UBL."
  1198. #elif ENABLED(MESH_BED_LEVELING)
  1199. #error "G29_RETRY_AND_RECOVER is not compatible with MESH_BED_LEVELING."
  1200. #endif
  1201. #endif
  1202. /**
  1203. * LCD_BED_LEVELING requirements
  1204. */
  1205. #if ENABLED(LCD_BED_LEVELING)
  1206. #if !HAS_LCD_MENU
  1207. #error "LCD_BED_LEVELING requires a programmable LCD controller."
  1208. #elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL)
  1209. #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING."
  1210. #endif
  1211. #endif
  1212. /**
  1213. * Homing
  1214. */
  1215. #if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0
  1216. #error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0."
  1217. #endif
  1218. #if ENABLED(CODEPENDENT_XY_HOMING)
  1219. #if ENABLED(QUICK_HOME)
  1220. #error "QUICK_HOME is incompatible with CODEPENDENT_XY_HOMING."
  1221. #elif IS_KINEMATIC
  1222. #error "CODEPENDENT_XY_HOMING requires a Cartesian setup."
  1223. #endif
  1224. #endif
  1225. /**
  1226. * Make sure Z_SAFE_HOMING point is reachable
  1227. */
  1228. #if ENABLED(Z_SAFE_HOMING)
  1229. #if HAS_BED_PROBE && (ENABLED(DELTA) || IS_SCARA)
  1230. static_assert(WITHIN(Z_SAFE_HOMING_X_POINT, PROBE_X_MIN, PROBE_X_MAX), "Z_SAFE_HOMING_X_POINT is outside the probe region.");
  1231. static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, PROBE_Y_MIN, PROBE_Y_MAX), "Z_SAFE_HOMING_Y_POINT is outside the probe region.");
  1232. #else
  1233. 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.");
  1234. 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.");
  1235. #endif
  1236. #endif // Z_SAFE_HOMING
  1237. /**
  1238. * Make sure DISABLE_[XYZ] compatible with selected homing options
  1239. */
  1240. #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z)
  1241. #if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING)
  1242. #error "DISABLE_[XYZ] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
  1243. #endif
  1244. #endif
  1245. /**
  1246. * Filament Width Sensor
  1247. */
  1248. #if ENABLED(FILAMENT_WIDTH_SENSOR)
  1249. #if !HAS_FILAMENT_WIDTH_SENSOR
  1250. #error "FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined."
  1251. #elif ENABLED(NO_VOLUMETRICS)
  1252. #error "FILAMENT_WIDTH_SENSOR requires NO_VOLUMETRICS to be disabled."
  1253. #endif
  1254. #endif
  1255. /**
  1256. * ULTIPANEL encoder
  1257. */
  1258. #if ENABLED(ULTIPANEL) && NONE(NEWPANEL, SR_LCD_2W_NL) && !defined(SHIFT_CLK)
  1259. #error "ULTIPANEL requires some kind of encoder."
  1260. #endif
  1261. #if ENCODER_PULSES_PER_STEP < 0
  1262. #error "ENCODER_PULSES_PER_STEP should not be negative, use REVERSE_MENU_DIRECTION instead."
  1263. #endif
  1264. /**
  1265. * SAV_3DGLCD display options
  1266. */
  1267. #if ENABLED(SAV_3DGLCD)
  1268. #if NONE(U8GLIB_SSD1306, U8GLIB_SH1106)
  1269. #error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
  1270. #elif BOTH(U8GLIB_SSD1306, U8GLIB_SH1106)
  1271. #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
  1272. #endif
  1273. #endif
  1274. /**
  1275. * Allen Key
  1276. * Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis.
  1277. */
  1278. #if ENABLED(Z_PROBE_ALLEN_KEY) && (Z_HOME_DIR < 0) && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  1279. #error "You can't home to a z min endstop with a Z_PROBE_ALLEN_KEY"
  1280. #endif
  1281. /**
  1282. * Dual X Carriage requirements
  1283. */
  1284. #if ENABLED(DUAL_X_CARRIAGE)
  1285. #if EXTRUDERS < 2
  1286. #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
  1287. #elif CORE_IS_XY || CORE_IS_XZ
  1288. #error "DUAL_X_CARRIAGE cannot be used with COREXY, COREYX, COREXZ, or COREZX."
  1289. #elif !(HAS_X2_ENABLE && HAS_X2_STEP && HAS_X2_DIR)
  1290. #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
  1291. #elif !HAS_X_MAX
  1292. #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
  1293. #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
  1294. #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
  1295. #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
  1296. #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
  1297. #endif
  1298. #endif
  1299. /**
  1300. * Make sure auto fan pins don't conflict with the fan pin
  1301. */
  1302. #if HAS_AUTO_FAN
  1303. #if HAS_FAN0
  1304. #if E0_AUTO_FAN_PIN == FAN_PIN
  1305. #error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."
  1306. #elif E1_AUTO_FAN_PIN == FAN_PIN
  1307. #error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN."
  1308. #elif E2_AUTO_FAN_PIN == FAN_PIN
  1309. #error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN."
  1310. #elif E3_AUTO_FAN_PIN == FAN_PIN
  1311. #error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN."
  1312. #endif
  1313. #endif
  1314. #endif
  1315. #if HAS_FAN0 && CONTROLLER_FAN_PIN == FAN_PIN
  1316. #error "You cannot set CONTROLLER_FAN_PIN equal to FAN_PIN."
  1317. #endif
  1318. #if ENABLED(USE_CONTROLLER_FAN)
  1319. #if !HAS_CONTROLLER_FAN
  1320. #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
  1321. #elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  1322. #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  1323. #elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  1324. #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  1325. #elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  1326. #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  1327. #elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  1328. #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  1329. #endif
  1330. #endif
  1331. /**
  1332. * Case Light requirements
  1333. */
  1334. #if ENABLED(CASE_LIGHT_ENABLE)
  1335. #if !PIN_EXISTS(CASE_LIGHT)
  1336. #error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN to be defined."
  1337. #elif CASE_LIGHT_PIN == FAN_PIN
  1338. #error "CASE_LIGHT_PIN conflicts with FAN_PIN. Resolve before continuing."
  1339. #endif
  1340. #endif
  1341. /**
  1342. * Required custom thermistor settings
  1343. */
  1344. #if ENABLED(HEATER_0_USER_THERMISTOR) && !(defined(HOTEND0_PULLUP_RESISTOR_OHMS) && defined(HOTEND0_RESISTANCE_25C_OHMS) && defined(HOTEND0_BETA))
  1345. #error "TEMP_SENSOR_0 1000 requires HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS and HOTEND0_BETA in Configuration_adv.h."
  1346. #elif ENABLED(HEATER_1_USER_THERMISTOR) && !(defined(HOTEND1_PULLUP_RESISTOR_OHMS) && defined(HOTEND1_RESISTANCE_25C_OHMS) && defined(HOTEND1_BETA))
  1347. #error "TEMP_SENSOR_1 1000 requires HOTEND1_PULLUP_RESISTOR_OHMS, HOTEND1_RESISTANCE_25C_OHMS and HOTEND1_BETA in Configuration_adv.h."
  1348. #elif ENABLED(HEATER_2_USER_THERMISTOR) && !(defined(HOTEND2_PULLUP_RESISTOR_OHMS) && defined(HOTEND2_RESISTANCE_25C_OHMS) && defined(HOTEND2_BETA))
  1349. #error "TEMP_SENSOR_2 1000 requires HOTEND2_PULLUP_RESISTOR_OHMS, HOTEND2_RESISTANCE_25C_OHMS and HOTEND2_BETA in Configuration_adv.h."
  1350. #elif ENABLED(HEATER_3_USER_THERMISTOR) && !(defined(HOTEND3_PULLUP_RESISTOR_OHMS) && defined(HOTEND3_RESISTANCE_25C_OHMS) && defined(HOTEND3_BETA))
  1351. #error "TEMP_SENSOR_3 1000 requires HOTEND3_PULLUP_RESISTOR_OHMS, HOTEND3_RESISTANCE_25C_OHMS and HOTEND3_BETA in Configuration_adv.h."
  1352. #elif ENABLED(HEATER_4_USER_THERMISTOR) && !(defined(HOTEND4_PULLUP_RESISTOR_OHMS) && defined(HOTEND4_RESISTANCE_25C_OHMS) && defined(HOTEND4_BETA))
  1353. #error "TEMP_SENSOR_4 1000 requires HOTEND4_PULLUP_RESISTOR_OHMS, HOTEND4_RESISTANCE_25C_OHMS and HOTEND4_BETA in Configuration_adv.h."
  1354. #elif ENABLED(HEATER_5_USER_THERMISTOR) && !(defined(HOTEND5_PULLUP_RESISTOR_OHMS) && defined(HOTEND5_RESISTANCE_25C_OHMS) && defined(HOTEND5_BETA))
  1355. #error "TEMP_SENSOR_5 1000 requires HOTEND5_PULLUP_RESISTOR_OHMS, HOTEND5_RESISTANCE_25C_OHMS and HOTEND5_BETA in Configuration_adv.h."
  1356. #elif ENABLED(HEATER_BED_USER_THERMISTOR) && !(defined(BED_PULLUP_RESISTOR_OHMS) && defined(BED_RESISTANCE_25C_OHMS) && defined(BED_BETA))
  1357. #error "TEMP_SENSOR_BED 1000 requires BED_PULLUP_RESISTOR_OHMS, BED_RESISTANCE_25C_OHMS and BED_BETA in Configuration_adv.h."
  1358. #elif ENABLED(HEATER_CHAMBER_USER_THERMISTOR) && !(defined(CHAMBER_PULLUP_RESISTOR_OHMS) && defined(CHAMBER_RESISTANCE_25C_OHMS) && defined(CHAMBER_BETA))
  1359. #error "TEMP_SENSOR_CHAMBER 1000 requires CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS and CHAMBER_BETA in Configuration_adv.h."
  1360. #endif
  1361. /**
  1362. * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set.
  1363. */
  1364. #if !HAS_HEATER_0
  1365. #error "HEATER_0_PIN not defined for this board."
  1366. #elif !ANY_PIN(TEMP_0, MAX6675_SS)
  1367. #error "TEMP_0_PIN not defined for this board."
  1368. #elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PIN_EXISTS(E0_STEP, E0_DIR))
  1369. #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board."
  1370. #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP, E0_DIR) || !HAS_E0_ENABLE))
  1371. #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
  1372. #elif EXTRUDERS && TEMP_SENSOR_0 == 0
  1373. #error "TEMP_SENSOR_0 is required with any extruders."
  1374. #endif
  1375. // Pins are required for heaters
  1376. #if ENABLED(HEATER_0_USES_MAX6675) && !PIN_EXISTS(MAX6675_SS)
  1377. #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
  1378. #elif (HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1
  1379. #error "HEATER_1_PIN not defined for this board."
  1380. #endif
  1381. #if HOTENDS > 1
  1382. #if ENABLED(HEATER_1_USES_MAX6675) && !PIN_EXISTS(MAX6675_SS2)
  1383. #error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board."
  1384. #elif TEMP_SENSOR_1 == 0
  1385. #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
  1386. #elif !ANY_PIN(TEMP_1, MAX6675_SS2)
  1387. #error "TEMP_1_PIN not defined for this board."
  1388. #endif
  1389. #if HOTENDS > 2
  1390. #if TEMP_SENSOR_2 == 0
  1391. #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
  1392. #elif !HAS_HEATER_2
  1393. #error "HEATER_2_PIN not defined for this board."
  1394. #elif !PIN_EXISTS(TEMP_2)
  1395. #error "TEMP_2_PIN not defined for this board."
  1396. #endif
  1397. #if HOTENDS > 3
  1398. #if TEMP_SENSOR_3 == 0
  1399. #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS."
  1400. #elif !HAS_HEATER_3
  1401. #error "HEATER_3_PIN not defined for this board."
  1402. #elif !PIN_EXISTS(TEMP_3)
  1403. #error "TEMP_3_PIN not defined for this board."
  1404. #endif
  1405. #if HOTENDS > 4
  1406. #if TEMP_SENSOR_4 == 0
  1407. #error "TEMP_SENSOR_4 is required with 5 or more HOTENDS."
  1408. #elif !HAS_HEATER_4
  1409. #error "HEATER_4_PIN not defined for this board."
  1410. #elif !PIN_EXISTS(TEMP_4)
  1411. #error "TEMP_4_PIN not defined for this board."
  1412. #endif
  1413. #if HOTENDS > 5
  1414. #if TEMP_SENSOR_5 == 0
  1415. #error "TEMP_SENSOR_5 is required with 6 HOTENDS."
  1416. #elif !HAS_HEATER_5
  1417. #error "HEATER_5_PIN not defined for this board."
  1418. #elif !PIN_EXISTS(TEMP_5)
  1419. #error "TEMP_5_PIN not defined for this board."
  1420. #endif
  1421. #elif TEMP_SENSOR_5 != 0
  1422. #error "TEMP_SENSOR_5 shouldn't be set with only 5 HOTENDS."
  1423. #endif
  1424. #elif TEMP_SENSOR_4 != 0
  1425. #error "TEMP_SENSOR_4 shouldn't be set with only 4 HOTENDS."
  1426. #elif TEMP_SENSOR_5 != 0
  1427. #error "TEMP_SENSOR_5 shouldn't be set with only 4 HOTENDS."
  1428. #endif
  1429. #elif TEMP_SENSOR_3 != 0
  1430. #error "TEMP_SENSOR_3 shouldn't be set with only 3 HOTENDS."
  1431. #elif TEMP_SENSOR_4 != 0
  1432. #error "TEMP_SENSOR_4 shouldn't be set with only 3 HOTENDS."
  1433. #elif TEMP_SENSOR_5 != 0
  1434. #error "TEMP_SENSOR_5 shouldn't be set with only 3 HOTENDS."
  1435. #endif
  1436. #elif TEMP_SENSOR_2 != 0
  1437. #error "TEMP_SENSOR_2 shouldn't be set with only 2 HOTENDS."
  1438. #elif TEMP_SENSOR_3 != 0
  1439. #error "TEMP_SENSOR_3 shouldn't be set with only 2 HOTENDS."
  1440. #elif TEMP_SENSOR_4 != 0
  1441. #error "TEMP_SENSOR_4 shouldn't be set with only 2 HOTENDS."
  1442. #elif TEMP_SENSOR_5 != 0
  1443. #error "TEMP_SENSOR_5 shouldn't be set with only 2 HOTENDS."
  1444. #endif
  1445. #elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
  1446. #error "TEMP_SENSOR_1 shouldn't be set with only 1 HOTEND."
  1447. #elif TEMP_SENSOR_2 != 0
  1448. #error "TEMP_SENSOR_2 shouldn't be set with only 1 HOTEND."
  1449. #elif TEMP_SENSOR_3 != 0
  1450. #error "TEMP_SENSOR_3 shouldn't be set with only 1 HOTEND."
  1451. #elif TEMP_SENSOR_4 != 0
  1452. #error "TEMP_SENSOR_4 shouldn't be set with only 1 HOTEND."
  1453. #elif TEMP_SENSOR_5 != 0
  1454. #error "TEMP_SENSOR_5 shouldn't be set with only 1 HOTEND."
  1455. #endif
  1456. #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
  1457. #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT."
  1458. #endif
  1459. /**
  1460. * Temperature status LEDs
  1461. */
  1462. #if ENABLED(TEMP_STAT_LEDS) && !ANY_PIN(STAT_LED_RED, STAT_LED_BLUE)
  1463. #error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
  1464. #endif
  1465. /**
  1466. * LED Control Menu
  1467. */
  1468. #if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
  1469. #error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED."
  1470. #endif
  1471. /**
  1472. * LED Backlight Timeout
  1473. */
  1474. #if defined(LED_BACKLIGHT_TIMEOUT) && !(EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && HAS_POWER_SWITCH)
  1475. #error "LED_BACKLIGHT_TIMEOUT requires a FYSETC Mini Panel and a Power Switch."
  1476. #endif
  1477. /**
  1478. * Basic multi hotend duplication mode
  1479. */
  1480. #if ENABLED(MULTI_NOZZLE_DUPLICATION)
  1481. #if HOTENDS < 2
  1482. #error "MULTI_NOZZLE_DUPLICATION requires 2 or more hotends."
  1483. #elif ENABLED(DUAL_X_CARRIAGE)
  1484. #error "MULTI_NOZZLE_DUPLICATION is incompatible with DUAL_X_CARRIAGE."
  1485. #elif ENABLED(SINGLENOZZLE)
  1486. #error "MULTI_NOZZLE_DUPLICATION is incompatible with SINGLENOZZLE."
  1487. #elif ENABLED(MIXING_EXTRUDER)
  1488. #error "MULTI_NOZZLE_DUPLICATION is incompatible with MIXING_EXTRUDER."
  1489. #elif ENABLED(SWITCHING_EXTRUDER)
  1490. #error "MULTI_NOZZLE_DUPLICATION is incompatible with SWITCHING_EXTRUDER."
  1491. #endif
  1492. #endif
  1493. /**
  1494. * Test Extruder Stepper Pins
  1495. */
  1496. #if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only
  1497. #if E_STEPPERS
  1498. #if !(PIN_EXISTS(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
  1499. #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
  1500. #endif
  1501. #if E_STEPPERS > 1
  1502. #if !(PIN_EXISTS(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
  1503. #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
  1504. #endif
  1505. #if E_STEPPERS > 2
  1506. #if !(PIN_EXISTS(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
  1507. #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
  1508. #endif
  1509. #if E_STEPPERS > 3
  1510. #if !(PIN_EXISTS(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
  1511. #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
  1512. #endif
  1513. #if E_STEPPERS > 4
  1514. #if !(PIN_EXISTS(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
  1515. #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
  1516. #endif
  1517. #if E_STEPPERS > 5
  1518. #if !(PIN_EXISTS(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
  1519. #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
  1520. #endif
  1521. #endif // E_STEPPERS > 5
  1522. #endif // E_STEPPERS > 4
  1523. #endif // E_STEPPERS > 3
  1524. #endif // E_STEPPERS > 2
  1525. #endif // E_STEPPERS > 1
  1526. #endif // E_STEPPERS
  1527. #endif
  1528. /**
  1529. * Endstop Tests
  1530. */
  1531. #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_)))
  1532. #define _AXIS_PLUG_UNUSED_TEST(AXIS) (_PLUG_UNUSED_TEST(AXIS,X) && _PLUG_UNUSED_TEST(AXIS,Y) && _PLUG_UNUSED_TEST(AXIS,Z))
  1533. // At least 3 endstop plugs must be used
  1534. #if _AXIS_PLUG_UNUSED_TEST(X)
  1535. #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG."
  1536. #endif
  1537. #if _AXIS_PLUG_UNUSED_TEST(Y)
  1538. #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG."
  1539. #endif
  1540. #if _AXIS_PLUG_UNUSED_TEST(Z)
  1541. #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
  1542. #endif
  1543. // Delta and Cartesian use 3 homing endstops
  1544. #if !IS_SCARA
  1545. #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
  1546. #error "Enable USE_XMIN_PLUG when homing X to MIN."
  1547. #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
  1548. #error "Enable USE_XMAX_PLUG when homing X to MAX."
  1549. #elif Y_HOME_DIR < 0 && DISABLED(USE_YMIN_PLUG)
  1550. #error "Enable USE_YMIN_PLUG when homing Y to MIN."
  1551. #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
  1552. #error "Enable USE_YMAX_PLUG when homing Y to MAX."
  1553. #endif
  1554. #endif
  1555. #if Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
  1556. #error "Enable USE_ZMIN_PLUG when homing Z to MIN."
  1557. #elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
  1558. #error "Enable USE_ZMAX_PLUG when homing Z to MAX."
  1559. #endif
  1560. // Dual endstops requirements
  1561. #if ENABLED(X_DUAL_ENDSTOPS)
  1562. #if !X2_USE_ENDSTOP
  1563. #error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS."
  1564. #elif X2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
  1565. #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _XMIN_."
  1566. #elif X2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
  1567. #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."
  1568. #elif X2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
  1569. #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _YMIN_."
  1570. #elif X2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
  1571. #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _YMAX_."
  1572. #elif X2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
  1573. #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _ZMIN_."
  1574. #elif X2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
  1575. #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _ZMAX_."
  1576. #elif !HAS_X2_MIN && !HAS_X2_MAX
  1577. #error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1578. #elif ENABLED(DELTA)
  1579. #error "X_DUAL_ENDSTOPS is not compatible with DELTA."
  1580. #endif
  1581. #endif
  1582. #if ENABLED(Y_DUAL_ENDSTOPS)
  1583. #if !Y2_USE_ENDSTOP
  1584. #error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS."
  1585. #elif Y2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
  1586. #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _XMIN_."
  1587. #elif Y2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
  1588. #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _XMAX_."
  1589. #elif Y2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
  1590. #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _YMIN_."
  1591. #elif Y2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
  1592. #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."
  1593. #elif Y2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
  1594. #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _ZMIN_."
  1595. #elif Y2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
  1596. #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _ZMAX_."
  1597. #elif !HAS_Y2_MIN && !HAS_Y2_MAX
  1598. #error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1599. #elif ENABLED(DELTA)
  1600. #error "Y_DUAL_ENDSTOPS is not compatible with DELTA."
  1601. #endif
  1602. #endif
  1603. #if ENABLED(Z_DUAL_ENDSTOPS)
  1604. #if !Z2_USE_ENDSTOP
  1605. #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
  1606. #elif Z2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
  1607. #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _XMIN_."
  1608. #elif Z2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
  1609. #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _XMAX_."
  1610. #elif Z2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
  1611. #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _YMIN_."
  1612. #elif Z2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
  1613. #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _YMAX_."
  1614. #elif Z2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
  1615. #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _ZMIN_."
  1616. #elif Z2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
  1617. #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _ZMAX_."
  1618. #elif !HAS_Z2_MIN && !HAS_Z2_MAX
  1619. #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1620. #elif ENABLED(DELTA)
  1621. #error "Z_DUAL_ENDSTOPS is not compatible with DELTA."
  1622. #endif
  1623. #endif
  1624. #if ENABLED(Z_TRIPLE_ENDSTOPS)
  1625. #if !Z2_USE_ENDSTOP
  1626. #error "You must set Z2_USE_ENDSTOP with Z_TRIPLE_ENDSTOPS."
  1627. #elif Z2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
  1628. #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _XMIN_."
  1629. #elif Z2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
  1630. #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _XMAX_."
  1631. #elif Z2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
  1632. #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _YMIN_."
  1633. #elif Z2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
  1634. #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _YMAX_."
  1635. #elif Z2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
  1636. #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _ZMIN_."
  1637. #elif Z2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
  1638. #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _ZMAX_."
  1639. #elif !HAS_Z2_MIN && !HAS_Z2_MAX
  1640. #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1641. #elif ENABLED(DELTA)
  1642. #error "Z_TRIPLE_ENDSTOPS is not compatible with DELTA."
  1643. #endif
  1644. #if !Z3_USE_ENDSTOP
  1645. #error "You must set Z3_USE_ENDSTOP with Z_TRIPLE_ENDSTOPS."
  1646. #elif Z3_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG)
  1647. #error "USE_XMIN_PLUG is required when Z3_USE_ENDSTOP is _XMIN_."
  1648. #elif Z3_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG)
  1649. #error "USE_XMAX_PLUG is required when Z3_USE_ENDSTOP is _XMAX_."
  1650. #elif Z3_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG)
  1651. #error "USE_YMIN_PLUG is required when Z3_USE_ENDSTOP is _YMIN_."
  1652. #elif Z3_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG)
  1653. #error "USE_YMAX_PLUG is required when Z3_USE_ENDSTOP is _YMAX_."
  1654. #elif Z3_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG)
  1655. #error "USE_ZMIN_PLUG is required when Z3_USE_ENDSTOP is _ZMIN_."
  1656. #elif Z3_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG)
  1657. #error "USE_ZMAX_PLUG is required when Z3_USE_ENDSTOP is _ZMAX_."
  1658. #elif !HAS_Z3_MIN && !HAS_Z3_MAX
  1659. #error "Z3_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1660. #elif ENABLED(DELTA)
  1661. #error "Z_TRIPLE_ENDSTOPS is not compatible with DELTA."
  1662. #endif
  1663. #endif
  1664. #if defined(ENDSTOP_NOISE_THRESHOLD) && !WITHIN(ENDSTOP_NOISE_THRESHOLD, 2, 7)
  1665. #error "ENDSTOP_NOISE_THRESHOLD must be an integer from 2 to 7."
  1666. #endif
  1667. /**
  1668. * emergency-command parser
  1669. */
  1670. #if ENABLED(EMERGENCY_PARSER) && defined(__AVR__) && defined(USBCON)
  1671. #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
  1672. #endif
  1673. /**
  1674. * I2C bus
  1675. */
  1676. #if ENABLED(EXPERIMENTAL_I2CBUS) && I2C_SLAVE_ADDRESS > 0
  1677. #if I2C_SLAVE_ADDRESS < 8
  1678. #error "I2C_SLAVE_ADDRESS can't be less than 8. (Addresses 0 - 7 are reserved.)"
  1679. #elif I2C_SLAVE_ADDRESS > 127
  1680. #error "I2C_SLAVE_ADDRESS can't be over 127. (Only 7 bits allowed.)"
  1681. #endif
  1682. #endif
  1683. /**
  1684. * G38 Probe Target
  1685. */
  1686. #if ENABLED(G38_PROBE_TARGET)
  1687. #if !HAS_BED_PROBE
  1688. #error "G38_PROBE_TARGET requires a bed probe."
  1689. #elif !IS_CARTESIAN
  1690. #error "G38_PROBE_TARGET requires a Cartesian machine."
  1691. #endif
  1692. #endif
  1693. /**
  1694. * RGB_LED Requirements
  1695. */
  1696. #define _RGB_TEST (PIN_EXISTS(RGB_LED_R, RGB_LED_G, RGB_LED_B))
  1697. #if ENABLED(PRINTER_EVENT_LEDS) && !HAS_COLOR_LEDS
  1698. #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9533, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
  1699. #elif ENABLED(RGB_LED)
  1700. #if !_RGB_TEST
  1701. #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
  1702. #elif ENABLED(RGBW_LED)
  1703. #error "Please enable only one of RGB_LED and RGBW_LED."
  1704. #endif
  1705. #elif ENABLED(RGBW_LED)
  1706. #if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W))
  1707. #error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN."
  1708. #endif
  1709. #elif ENABLED(NEOPIXEL_LED)
  1710. #if !(PIN_EXISTS(NEOPIXEL) && NEOPIXEL_PIXELS > 0)
  1711. #error "NEOPIXEL_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS."
  1712. #endif
  1713. #endif
  1714. #undef _RGB_TEST
  1715. /**
  1716. * Auto Fan check for PWM pins
  1717. */
  1718. #if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255
  1719. #define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
  1720. #if HAS_AUTO_FAN_0
  1721. static_assert(PWM_PIN(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);
  1722. #elif HAS_AUTO_FAN_1
  1723. static_assert(PWM_PIN(E1_AUTO_FAN_PIN), "E1" AF_ERR_SUFF);
  1724. #elif HAS_AUTO_FAN_2
  1725. static_assert(PWM_PIN(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF);
  1726. #elif HAS_AUTO_FAN_3
  1727. static_assert(PWM_PIN(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF);
  1728. #endif
  1729. #endif
  1730. /**
  1731. * Make sure only one display is enabled
  1732. */
  1733. #if 1 < 0 \
  1734. + (ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && DISABLED(IS_RRD_SC)) \
  1735. + (ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(IS_RRD_FG_SC)) \
  1736. + (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
  1737. + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
  1738. + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)) \
  1739. + (ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(IS_RRW_KEYPAD)) \
  1740. + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
  1741. + (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
  1742. + ENABLED(RADDS_DISPLAY) \
  1743. + ENABLED(ULTIMAKERCONTROLLER) \
  1744. + ENABLED(PANEL_ONE) \
  1745. + ENABLED(G3D_PANEL) \
  1746. + ENABLED(RIGIDBOT_PANEL) \
  1747. + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
  1748. + ENABLED(ZONESTAR_LCD) \
  1749. + ENABLED(RA_CONTROL_PANEL) \
  1750. + ENABLED(LCD_SAINSMART_I2C_1602) \
  1751. + ENABLED(LCD_SAINSMART_I2C_2004) \
  1752. + ENABLED(LCM1602) \
  1753. + ENABLED(LCD_I2C_PANELOLU2) \
  1754. + ENABLED(LCD_I2C_VIKI) \
  1755. + ENABLED(SAV_3DLCD) \
  1756. + ENABLED(FF_INTERFACEBOARD) \
  1757. + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \
  1758. + ENABLED(VIKI2) \
  1759. + ENABLED(miniVIKI) \
  1760. + ENABLED(MAKRPANEL) \
  1761. + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
  1762. + ENABLED(BQ_LCD_SMART_CONTROLLER) \
  1763. + ENABLED(CARTESIO_UI) \
  1764. + ENABLED(LCD_FOR_MELZI) \
  1765. + ENABLED(ULTI_CONTROLLER) \
  1766. + ENABLED(MKS_MINI_12864) \
  1767. + ENABLED(FYSETC_MINI_12864_X_X) \
  1768. + ENABLED(FYSETC_MINI_12864_1_2) \
  1769. + ENABLED(FYSETC_MINI_12864_2_0) \
  1770. + ENABLED(FYSETC_MINI_12864_2_1) \
  1771. + ENABLED(CR10_STOCKDISPLAY) \
  1772. + ENABLED(ANET_FULL_GRAPHICS_LCD) \
  1773. + ENABLED(AZSMZ_12864) \
  1774. + ENABLED(SILVER_GATE_GLCD_CONTROLLER) \
  1775. + ENABLED(SAV_3DGLCD) \
  1776. + ENABLED(OLED_PANEL_TINYBOY2) \
  1777. + ENABLED(MKS_12864OLED) \
  1778. + ENABLED(MKS_12864OLED_SSD1306) \
  1779. + ENABLED(U8GLIB_SH1106_EINSTART) \
  1780. + ENABLED(OVERLORD_OLED) \
  1781. + ENABLED(DGUS_LCD) \
  1782. + ENABLED(MALYAN_LCD) \
  1783. + ENABLED(LULZBOT_TOUCH_UI) \
  1784. + ENABLED(FSMC_GRAPHICAL_TFT)
  1785. #error "Please select no more than one LCD controller option."
  1786. #endif
  1787. #undef IS_RRD_SC
  1788. #undef IS_RRD_FG_SC
  1789. #undef IS_ULTRA_LCD
  1790. #undef IS_U8GLIB_SSD1306
  1791. #undef IS_RRW_KEYPAD
  1792. #undef IS_EXTUI
  1793. #undef IS_ULTIPANEL
  1794. /**
  1795. * FYSETC Mini 12864 RGB backlighting required
  1796. */
  1797. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
  1798. #error "RGB_LED is required for FYSETC_MINI_12864 1.2 and 2.0."
  1799. #elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
  1800. #error "LED_USER_PRESET_STARTUP is required for FYSETC_MINI_12864 2.x displays."
  1801. #endif
  1802. /**
  1803. * Check existing CS pins against enabled TMC SPI drivers.
  1804. */
  1805. #define INVALID_TMC_SPI(ST) (AXIS_HAS_SPI && !PIN_EXISTS(ST##_CS))
  1806. #if INVALID_TMC_SPI(X)
  1807. #error "An SPI driven TMC driver on X requires X_CS_PIN."
  1808. #elif INVALID_TMC_SPI(X2)
  1809. #error "An SPI driven TMC driver on X2 requires X2_CS_PIN."
  1810. #elif INVALID_TMC_SPI(Y)
  1811. #error "An SPI driven TMC driver on Y requires Y_CS_PIN."
  1812. #elif INVALID_TMC_SPI(Y2)
  1813. #error "An SPI driven TMC driver on Y2 requires Y2_CS_PIN."
  1814. #elif INVALID_TMC_SPI(Z)
  1815. #error "An SPI driven TMC driver on Z requires Z_CS_PIN."
  1816. #elif INVALID_TMC_SPI(Z2)
  1817. #error "An SPI driven TMC driver on Z2 requires Z2_CS_PIN."
  1818. #elif INVALID_TMC_SPI(Z3)
  1819. #error "An SPI driven TMC driver on Z3 requires Z3_CS_PIN."
  1820. #elif INVALID_TMC_SPI(E0)
  1821. #error "An SPI driven TMC driver on E0 requires E0_CS_PIN."
  1822. #elif INVALID_TMC_SPI(E1)
  1823. #error "An SPI driven TMC driver on E1 requires E1_CS_PIN."
  1824. #elif INVALID_TMC_SPI(E2)
  1825. #error "An SPI driven TMC driver on E2 requires E2_CS_PIN."
  1826. #elif INVALID_TMC_SPI(E3)
  1827. #error "An SPI driven TMC driver on E3 requires E3_CS_PIN."
  1828. #elif INVALID_TMC_SPI(E4)
  1829. #error "An SPI driven TMC driver on E4 requires E4_CS_PIN."
  1830. #elif INVALID_TMC_SPI(E5)
  1831. #error "An SPI driven TMC driver on E5 requires E5_CS_PIN."
  1832. #endif
  1833. #undef INVALID_TMC_SPI
  1834. /**
  1835. * Check existing RX/TX pins against enable TMC UART drivers.
  1836. */
  1837. #define INVALID_TMC_UART(ST) (AXIS_HAS_UART(ST) && !(defined(ST##_HARDWARE_SERIAL) || (PIN_EXISTS(ST##_SERIAL_RX, ST##_SERIAL_TX))))
  1838. #if INVALID_TMC_UART(X)
  1839. #error "TMC2208 or TMC2209 on X requires X_HARDWARE_SERIAL or X_SERIAL_(RX|TX)_PIN."
  1840. #elif INVALID_TMC_UART(X2)
  1841. #error "TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN."
  1842. #elif INVALID_TMC_UART(Y)
  1843. #error "TMC2208 or TMC2209 on Y requires Y_HARDWARE_SERIAL or Y_SERIAL_(RX|TX)_PIN."
  1844. #elif INVALID_TMC_UART(Y2)
  1845. #error "TMC2208 or TMC2209 on Y2 requires Y2_HARDWARE_SERIAL or Y2_SERIAL_(RX|TX)_PIN."
  1846. #elif INVALID_TMC_UART(Z)
  1847. #error "TMC2208 or TMC2209 on Z requires Z_HARDWARE_SERIAL or Z_SERIAL_(RX|TX)_PIN."
  1848. #elif INVALID_TMC_UART(Z2)
  1849. #error "TMC2208 or TMC2209 on Z2 requires Z2_HARDWARE_SERIAL or Z2_SERIAL_(RX|TX)_PIN."
  1850. #elif INVALID_TMC_UART(Z3)
  1851. #error "TMC2208 or TMC2209 on Z3 requires Z3_HARDWARE_SERIAL or Z3_SERIAL_(RX|TX)_PIN."
  1852. #elif INVALID_TMC_UART(E0)
  1853. #error "TMC2208 or TMC2209 on E0 requires E0_HARDWARE_SERIAL or E0_SERIAL_(RX|TX)_PIN."
  1854. #elif INVALID_TMC_UART(E1)
  1855. #error "TMC2208 or TMC2209 on E1 requires E1_HARDWARE_SERIAL or E1_SERIAL_(RX|TX)_PIN."
  1856. #elif INVALID_TMC_UART(E2)
  1857. #error "TMC2208 or TMC2209 on E2 requires E2_HARDWARE_SERIAL or E2_SERIAL_(RX|TX)_PIN."
  1858. #elif INVALID_TMC_UART(E3)
  1859. #error "TMC2208 or TMC2209 on E3 requires E3_HARDWARE_SERIAL or E3_SERIAL_(RX|TX)_PIN."
  1860. #elif INVALID_TMC_UART(E4)
  1861. #error "TMC2208 or TMC2209 on E4 requires E4_HARDWARE_SERIAL or E4_SERIAL_(RX|TX)_PIN."
  1862. #elif INVALID_TMC_UART(E5)
  1863. #error "TMC2208 or TMC2209 on E5 requires E5_HARDWARE_SERIAL or E5_SERIAL_(RX|TX)_PIN."
  1864. #endif
  1865. #undef INVALID_TMC_UART
  1866. /**
  1867. * TMC2209 slave address values
  1868. */
  1869. #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")
  1870. #if AXIS_DRIVER_TYPE_X(TMC2209)
  1871. INVALID_TMC_ADDRESS(X);
  1872. #elif AXIS_DRIVER_TYPE_X2(TMC2209)
  1873. INVALID_TMC_ADDRESS(X2);
  1874. #elif AXIS_DRIVER_TYPE_Y(TMC2209)
  1875. INVALID_TMC_ADDRESS(Y);
  1876. #elif AXIS_DRIVER_TYPE_Y2(TMC2209)
  1877. INVALID_TMC_ADDRESS(Y2);
  1878. #elif AXIS_DRIVER_TYPE_Z(TMC2209)
  1879. INVALID_TMC_ADDRESS(Z);
  1880. #elif AXIS_DRIVER_TYPE_Z2(TMC2209)
  1881. INVALID_TMC_ADDRESS(Z2);
  1882. #elif AXIS_DRIVER_TYPE_Z3(TMC2209)
  1883. INVALID_TMC_ADDRESS(Z3);
  1884. #elif AXIS_DRIVER_TYPE_E0(TMC2209)
  1885. INVALID_TMC_ADDRESS(E0);
  1886. #elif AXIS_DRIVER_TYPE_E1(TMC2209)
  1887. INVALID_TMC_ADDRESS(E1);
  1888. #elif AXIS_DRIVER_TYPE_E2(TMC2209)
  1889. INVALID_TMC_ADDRESS(E2);
  1890. #elif AXIS_DRIVER_TYPE_E3(TMC2209)
  1891. INVALID_TMC_ADDRESS(E3);
  1892. #elif AXIS_DRIVER_TYPE_E4(TMC2209)
  1893. INVALID_TMC_ADDRESS(E4);
  1894. #elif AXIS_DRIVER_TYPE_E5(TMC2209)
  1895. INVALID_TMC_ADDRESS(E5);
  1896. #endif
  1897. #undef INVALID_TMC_ADDRESS
  1898. /**
  1899. * TMC2208/2209 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
  1900. */
  1901. #if HAS_TMC220x && !defined(TARGET_LPC1768) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
  1902. defined(X_HARDWARE_SERIAL ) || defined(X2_HARDWARE_SERIAL) \
  1903. || defined(Y_HARDWARE_SERIAL ) || defined(Y2_HARDWARE_SERIAL) \
  1904. || defined(Z_HARDWARE_SERIAL ) || defined(Z2_HARDWARE_SERIAL) \
  1905. || defined(Z3_HARDWARE_SERIAL) || defined(E0_HARDWARE_SERIAL) \
  1906. || defined(E1_HARDWARE_SERIAL) || defined(E2_HARDWARE_SERIAL) \
  1907. || defined(E3_HARDWARE_SERIAL) || defined(E4_HARDWARE_SERIAL) \
  1908. || defined(E5_HARDWARE_SERIAL) )
  1909. #error "Select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
  1910. #endif
  1911. /**
  1912. * TMC2208/2209 software UART is only supported on AVR, LPC, STM32F1 and STM32F4
  1913. */
  1914. #if HAS_TMC220x && !defined(__AVR__) && !defined(TARGET_LPC1768) && !defined(TARGET_STM32F1) && !defined(TARGET_STM32F4) && !( \
  1915. defined(X_HARDWARE_SERIAL ) || defined(X2_HARDWARE_SERIAL) \
  1916. || defined(Y_HARDWARE_SERIAL ) || defined(Y2_HARDWARE_SERIAL) \
  1917. || defined(Z_HARDWARE_SERIAL ) || defined(Z2_HARDWARE_SERIAL) \
  1918. || defined(Z3_HARDWARE_SERIAL) || defined(E0_HARDWARE_SERIAL) \
  1919. || defined(E1_HARDWARE_SERIAL) || defined(E2_HARDWARE_SERIAL) \
  1920. || defined(E3_HARDWARE_SERIAL) || defined(E4_HARDWARE_SERIAL) \
  1921. || defined(E5_HARDWARE_SERIAL) )
  1922. #error "TMC2208 Software Serial is supported only on AVR, LPC1768, STM32F1 and STM32F4 platforms."
  1923. #endif
  1924. #if ENABLED(SENSORLESS_HOMING)
  1925. // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop
  1926. // is necessary in order to reset the stallGuard indication between the initial movement of all three
  1927. // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of
  1928. // clearing the stallGuard activated status is found.
  1929. // Stall detection DIAG = HIGH : TMC2209
  1930. // Stall detection DIAG = LOW : TMC2130/TMC2160/TMC2660/TMC5130/TMC5160
  1931. #define X_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(X,TMC2209)
  1932. #define Y_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Y,TMC2209)
  1933. #define Z_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Z,TMC2209)
  1934. #if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z)
  1935. #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z."
  1936. #elif X_SENSORLESS && X_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_XMIN)
  1937. #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) when homing to X_MIN."
  1938. #elif X_SENSORLESS && X_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_XMAX)
  1939. #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) when homing to X_MAX."
  1940. #elif Y_SENSORLESS && Y_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_YMIN)
  1941. #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) when homing to Y_MIN."
  1942. #elif Y_SENSORLESS && Y_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_YMAX)
  1943. #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) when homing to Y_MAX."
  1944. #elif Z_SENSORLESS && Z_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN)
  1945. #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN."
  1946. #elif Z_SENSORLESS && Z_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMAX)
  1947. #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX."
  1948. #elif X_SENSORLESS && X_HOME_DIR < 0 && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
  1949. #if X_ENDSTOP_INVERTING
  1950. #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = true when homing to X_MIN."
  1951. #else
  1952. #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to X_MIN."
  1953. #endif
  1954. #elif X_SENSORLESS && X_HOME_DIR > 0 && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING
  1955. #if X_ENDSTOP_INVERTING
  1956. #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = true when homing to X_MAX."
  1957. #else
  1958. #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to X_MAX."
  1959. #endif
  1960. #elif Y_SENSORLESS && Y_HOME_DIR < 0 && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
  1961. #if Y_ENDSTOP_INVERTING
  1962. #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = true when homing to Y_MIN."
  1963. #else
  1964. #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MIN."
  1965. #endif
  1966. #elif Y_SENSORLESS && Y_HOME_DIR > 0 && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING
  1967. #if Y_ENDSTOP_INVERTING
  1968. #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = true when homing to Y_MAX."
  1969. #else
  1970. #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MAX."
  1971. #endif
  1972. #elif Z_SENSORLESS && Z_HOME_DIR < 0 && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
  1973. #if Z_ENDSTOP_INVERTING
  1974. #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = true when homing to Z_MIN."
  1975. #else
  1976. #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MIN."
  1977. #endif
  1978. #elif Z_SENSORLESS && Z_HOME_DIR > 0 && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING
  1979. #if Z_ENDSTOP_INVERTING
  1980. #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = true when homing to Z_MAX."
  1981. #else
  1982. #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MAX."
  1983. #endif
  1984. #elif ENDSTOP_NOISE_THRESHOLD
  1985. #error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_THRESHOLD."
  1986. #elif !(X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS)
  1987. #error "SENSORLESS_HOMING requires a TMC stepper driver with StallGuard on X, Y, or Z axes."
  1988. #endif
  1989. #undef X_ENDSTOP_INVERTING
  1990. #undef Y_ENDSTOP_INVERTING
  1991. #undef Z_ENDSTOP_INVERTING
  1992. #endif
  1993. // Sensorless probing requirements
  1994. #if ENABLED(SENSORLESS_PROBING)
  1995. #if ENABLED(DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS)
  1996. #error "SENSORLESS_PROBING for DELTA requires TMC stepper drivers with StallGuard on X, Y, and Z axes."
  1997. #elif !Z_SENSORLESS
  1998. #error "SENSORLESS_PROBING requires a TMC stepper driver with StallGuard on Z."
  1999. #endif
  2000. #endif
  2001. // Sensorless homing is required for both combined steppers in an H-bot
  2002. #if CORE_IS_XY && X_SENSORLESS != Y_SENSORLESS
  2003. #error "CoreXY requires both X and Y to use sensorless homing if either does."
  2004. #elif CORE_IS_XZ && X_SENSORLESS != Z_SENSORLESS
  2005. #error "CoreXZ requires both X and Z to use sensorless homing if either does."
  2006. #elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS
  2007. #error "CoreYZ requires both Y and Z to use sensorless homing if either does."
  2008. #endif
  2009. // Other TMC feature requirements
  2010. #if ENABLED(HYBRID_THRESHOLD) && !STEALTHCHOP_ENABLED
  2011. #error "Enable STEALTHCHOP_(XY|Z|E) to use HYBRID_THRESHOLD."
  2012. #elif ENABLED(SENSORLESS_HOMING) && !HAS_STALLGUARD
  2013. #error "SENSORLESS_HOMING requires TMC2130, TMC2160, TMC2209, TMC2660, or TMC5160 stepper drivers."
  2014. #elif ENABLED(SENSORLESS_PROBING) && !HAS_STALLGUARD
  2015. #error "SENSORLESS_PROBING requires TMC2130, TMC2160, TMC2209, TMC2660, or TMC5160 stepper drivers."
  2016. #elif STEALTHCHOP_ENABLED && !HAS_STEALTHCHOP
  2017. #error "STEALTHCHOP requires TMC2130, TMC2160, TMC2208, TMC2209, or TMC5160 stepper drivers."
  2018. #endif
  2019. #define IN_CHAIN(A) (A##_CHAIN_POS > 0)
  2020. // TMC SPI Chaining
  2021. #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)
  2022. #if (IN_CHAIN(X) && !PIN_EXISTS(X_CS) ) || (IN_CHAIN(Y) && !PIN_EXISTS(Y_CS) ) \
  2023. || (IN_CHAIN(Z) && !PIN_EXISTS(Z_CS) ) || (IN_CHAIN(X2) && !PIN_EXISTS(X2_CS)) \
  2024. || (IN_CHAIN(Y2) && !PIN_EXISTS(Y2_CS)) || (IN_CHAIN(Z2) && !PIN_EXISTS(Z2_CS)) \
  2025. || (IN_CHAIN(Z3) && !PIN_EXISTS(Z3_CS)) || (IN_CHAIN(E0) && !PIN_EXISTS(E0_CS)) \
  2026. || (IN_CHAIN(E1) && !PIN_EXISTS(E1_CS)) || (IN_CHAIN(E2) && !PIN_EXISTS(E2_CS)) \
  2027. || (IN_CHAIN(E3) && !PIN_EXISTS(E3_CS)) || (IN_CHAIN(E4) && !PIN_EXISTS(E4_CS)) \
  2028. || (IN_CHAIN(E5) && !PIN_EXISTS(E5_CS))
  2029. #error "All chained TMC drivers need a CS pin."
  2030. #else
  2031. #if IN_CHAIN(X)
  2032. #define CS_COMPARE X_CS_PIN
  2033. #elif IN_CHAIN(Y)
  2034. #define CS_COMPARE Y_CS_PIN
  2035. #elif IN_CHAIN(Z)
  2036. #define CS_COMPARE Z_CS_PIN
  2037. #elif IN_CHAIN(X2)
  2038. #define CS_COMPARE X2_CS_PIN
  2039. #elif IN_CHAIN(Y2)
  2040. #define CS_COMPARE Y2_CS_PIN
  2041. #elif IN_CHAIN(Z2)
  2042. #define CS_COMPARE Z2_CS_PIN
  2043. #elif IN_CHAIN(Z3)
  2044. #define CS_COMPARE Z3_CS_PIN
  2045. #elif IN_CHAIN(E0)
  2046. #define CS_COMPARE E0_CS_PIN
  2047. #elif IN_CHAIN(E1)
  2048. #define CS_COMPARE E1_CS_PIN
  2049. #elif IN_CHAIN(E2)
  2050. #define CS_COMPARE E2_CS_PIN
  2051. #elif IN_CHAIN(E3)
  2052. #define CS_COMPARE E3_CS_PIN
  2053. #elif IN_CHAIN(E4)
  2054. #define CS_COMPARE E4_CS_PIN
  2055. #elif IN_CHAIN(E5)
  2056. #define CS_COMPARE E5_CS_PIN
  2057. #endif
  2058. #if (IN_CHAIN(X) && X_CS_PIN != CS_COMPARE) || (IN_CHAIN(Y) && Y_CS_PIN != CS_COMPARE) \
  2059. || (IN_CHAIN(Z) && Z_CS_PIN != CS_COMPARE) || (IN_CHAIN(X2) && X2_CS_PIN != CS_COMPARE) \
  2060. || (IN_CHAIN(Y2) && Y2_CS_PIN != CS_COMPARE) || (IN_CHAIN(Z2) && Z2_CS_PIN != CS_COMPARE) \
  2061. || (IN_CHAIN(Z3) && Z3_CS_PIN != CS_COMPARE) || (IN_CHAIN(E0) && E0_CS_PIN != CS_COMPARE) \
  2062. || (IN_CHAIN(E1) && E1_CS_PIN != CS_COMPARE) || (IN_CHAIN(E2) && E2_CS_PIN != CS_COMPARE) \
  2063. || (IN_CHAIN(E3) && E3_CS_PIN != CS_COMPARE) || (IN_CHAIN(E4) && E4_CS_PIN != CS_COMPARE) \
  2064. || (IN_CHAIN(E5) && E5_CS_PIN != CS_COMPARE)
  2065. #error "All chained TMC drivers must use the same CS pin."
  2066. #endif
  2067. #endif
  2068. #undef CS_COMPARE
  2069. #endif
  2070. #undef IN_CHAIN
  2071. #if ENABLED(DELTA) && (ENABLED(STEALTHCHOP_XY) != ENABLED(STEALTHCHOP_Z))
  2072. #error "STEALTHCHOP_XY and STEALTHCHOP_Z must be the same on DELTA."
  2073. #endif
  2074. /**
  2075. * Digipot requirement
  2076. */
  2077. #if ENABLED(DIGIPOT_MCP4018)
  2078. #if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
  2079. || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
  2080. #error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
  2081. #endif
  2082. #endif
  2083. /**
  2084. * Check per-axis initializers for errors
  2085. */
  2086. constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT,
  2087. sanity_arr_2[] = DEFAULT_MAX_FEEDRATE,
  2088. sanity_arr_3[] = DEFAULT_MAX_ACCELERATION;
  2089. #define _ARR_TEST(N,I) (sanity_arr_##N[_MIN(I,int(COUNT(sanity_arr_##N))-1)] > 0)
  2090. static_assert(COUNT(sanity_arr_1) >= XYZE, "DEFAULT_AXIS_STEPS_PER_UNIT requires X, Y, Z and E elements.");
  2091. 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?)");
  2092. static_assert( _ARR_TEST(1,0) && _ARR_TEST(1,1) && _ARR_TEST(1,2)
  2093. && _ARR_TEST(1,3) && _ARR_TEST(1,4) && _ARR_TEST(1,5)
  2094. && _ARR_TEST(1,6) && _ARR_TEST(1,7) && _ARR_TEST(1,8),
  2095. "DEFAULT_AXIS_STEPS_PER_UNIT values must be positive.");
  2096. static_assert(COUNT(sanity_arr_2) >= XYZE, "DEFAULT_MAX_FEEDRATE requires X, Y, Z and E elements.");
  2097. static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)");
  2098. static_assert( _ARR_TEST(2,0) && _ARR_TEST(2,1) && _ARR_TEST(2,2)
  2099. && _ARR_TEST(2,3) && _ARR_TEST(2,4) && _ARR_TEST(2,5)
  2100. && _ARR_TEST(2,6) && _ARR_TEST(2,7) && _ARR_TEST(2,8),
  2101. "DEFAULT_MAX_FEEDRATE values must be positive.");
  2102. static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires X, Y, Z and E elements.");
  2103. static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)");
  2104. static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
  2105. && _ARR_TEST(3,3) && _ARR_TEST(3,4) && _ARR_TEST(3,5)
  2106. && _ARR_TEST(3,6) && _ARR_TEST(3,7) && _ARR_TEST(3,8),
  2107. "DEFAULT_MAX_ACCELERATION values must be positive.");
  2108. #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
  2109. #ifdef MAX_ACCEL_EDIT_VALUES
  2110. constexpr float sanity_arr_4[] = MAX_ACCEL_EDIT_VALUES;
  2111. static_assert(COUNT(sanity_arr_4) >= XYZE, "MAX_ACCEL_EDIT_VALUES requires X, Y, Z and E elements.");
  2112. static_assert(COUNT(sanity_arr_4) <= XYZE, "MAX_ACCEL_EDIT_VALUES has too many elements. X, Y, Z and E elements only.");
  2113. static_assert( _ARR_TEST(4,0) && _ARR_TEST(4,1) && _ARR_TEST(4,2)
  2114. && _ARR_TEST(4,3) && _ARR_TEST(4,4) && _ARR_TEST(4,5)
  2115. && _ARR_TEST(4,6) && _ARR_TEST(4,7) && _ARR_TEST(4,8),
  2116. "MAX_ACCEL_EDIT_VALUES values must be positive.");
  2117. #endif
  2118. #endif
  2119. #if ENABLED(LIMITED_MAX_FR_EDITING)
  2120. #ifdef MAX_FEEDRATE_EDIT_VALUES
  2121. constexpr float sanity_arr_5[] = MAX_FEEDRATE_EDIT_VALUES;
  2122. static_assert(COUNT(sanity_arr_5) >= XYZE, "MAX_FEEDRATE_EDIT_VALUES requires X, Y, Z and E elements.");
  2123. static_assert(COUNT(sanity_arr_5) <= XYZE, "MAX_FEEDRATE_EDIT_VALUES has too many elements. X, Y, Z and E elements only.");
  2124. static_assert( _ARR_TEST(5,0) && _ARR_TEST(5,1) && _ARR_TEST(5,2)
  2125. && _ARR_TEST(5,3) && _ARR_TEST(5,4) && _ARR_TEST(5,5)
  2126. && _ARR_TEST(5,6) && _ARR_TEST(5,7) && _ARR_TEST(5,8),
  2127. "MAX_FEEDRATE_EDIT_VALUES values must be positive.");
  2128. #endif
  2129. #endif
  2130. #if ENABLED(LIMITED_JERK_EDITING)
  2131. #ifdef MAX_JERK_EDIT_VALUES
  2132. constexpr float sanity_arr_6[] = MAX_JERK_EDIT_VALUES;
  2133. static_assert(COUNT(sanity_arr_6) >= XYZE, "MAX_JERK_EDIT_VALUES requires X, Y, Z and E elements.");
  2134. static_assert(COUNT(sanity_arr_6) <= XYZE, "MAX_JERK_EDIT_VALUES has too many elements. X, Y, Z and E elements only.");
  2135. static_assert( _ARR_TEST(6,0) && _ARR_TEST(6,1) && _ARR_TEST(6,2)
  2136. && _ARR_TEST(6,3) && _ARR_TEST(6,4) && _ARR_TEST(6,5)
  2137. && _ARR_TEST(6,6) && _ARR_TEST(6,7) && _ARR_TEST(6,8),
  2138. "MAX_JERK_EDIT_VALUES values must be positive.");
  2139. #endif
  2140. #endif
  2141. #undef _ARR_TEST
  2142. #if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS)
  2143. #error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS."
  2144. #endif
  2145. #if !BLOCK_BUFFER_SIZE || !IS_POWER_OF_2(BLOCK_BUFFER_SIZE)
  2146. #error "BLOCK_BUFFER_SIZE must be a power of 2."
  2147. #endif
  2148. #if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
  2149. #error "LED_CONTROL_MENU requires an LCD controller."
  2150. #endif
  2151. #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) && DISABLED(NEOPIXEL_LED)
  2152. #error "CASE_LIGHT_USE_NEOPIXEL requires NEOPIXEL_LED."
  2153. #endif
  2154. #if ENABLED(SKEW_CORRECTION)
  2155. #if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
  2156. #error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
  2157. #endif
  2158. #if ENABLED(SKEW_CORRECTION_FOR_Z)
  2159. #if !defined(XZ_SKEW_FACTOR) && !(defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD))
  2160. #error "SKEW_CORRECTION requires XZ_SKEW_FACTOR or XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD."
  2161. #endif
  2162. #if !defined(YZ_SKEW_FACTOR) && !(defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD))
  2163. #error "SKEW_CORRECTION requires YZ_SKEW_FACTOR or YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD."
  2164. #endif
  2165. #endif
  2166. #endif
  2167. #if ENABLED(POWER_LOSS_RECOVERY) && DISABLED(ULTIPANEL)
  2168. #error "POWER_LOSS_RECOVERY currently requires an LCD Controller."
  2169. #endif
  2170. #if ENABLED(Z_STEPPER_AUTO_ALIGN)
  2171. #if !Z_MULTI_STEPPER_DRIVERS
  2172. #error "Z_STEPPER_AUTO_ALIGN requires Z_DUAL_STEPPER_DRIVERS or Z_TRIPLE_STEPPER_DRIVERS."
  2173. #elif !HAS_BED_PROBE
  2174. #error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
  2175. #endif
  2176. #endif
  2177. #if ENABLED(PRINTCOUNTER) && DISABLED(EEPROM_SETTINGS)
  2178. #error "PRINTCOUNTER requires EEPROM_SETTINGS. Please update your Configuration."
  2179. #endif
  2180. #if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !PIN_EXISTS(USB_CS, USB_INTR)
  2181. #error "USB_CS_PIN and USB_INTR_PIN are required for USB_FLASH_DRIVE_SUPPORT."
  2182. #endif
  2183. #if ENABLED(SD_FIRMWARE_UPDATE) && !defined(__AVR_ATmega2560__)
  2184. #error "SD_FIRMWARE_UPDATE requires an ATmega2560-based (Arduino Mega) board."
  2185. #endif
  2186. #if ENABLED(GCODE_MACROS) && !WITHIN(GCODE_MACROS_SLOTS, 1, 10)
  2187. #error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
  2188. #endif
  2189. #if ENABLED(CUSTOM_USER_MENUS)
  2190. #ifdef USER_GCODE_1
  2191. constexpr char _chr1 = USER_GCODE_1[strlen(USER_GCODE_1) - 1];
  2192. static_assert(_chr1 != '\n' && _chr1 != '\r', "USER_GCODE_1 cannot have a newline at the end. Please remove it.");
  2193. #endif
  2194. #ifdef USER_GCODE_2
  2195. constexpr char _chr2 = USER_GCODE_2[strlen(USER_GCODE_2) - 1];
  2196. static_assert(_chr2 != '\n' && _chr2 != '\r', "USER_GCODE_2 cannot have a newline at the end. Please remove it.");
  2197. #endif
  2198. #ifdef USER_GCODE_3
  2199. constexpr char _chr3 = USER_GCODE_3[strlen(USER_GCODE_3) - 1];
  2200. static_assert(_chr3 != '\n' && _chr3 != '\r', "USER_GCODE_3 cannot have a newline at the end. Please remove it.");
  2201. #endif
  2202. #ifdef USER_GCODE_4
  2203. constexpr char _chr4 = USER_GCODE_4[strlen(USER_GCODE_4) - 1];
  2204. static_assert(_chr4 != '\n' && _chr4 != '\r', "USER_GCODE_4 cannot have a newline at the end. Please remove it.");
  2205. #endif
  2206. #ifdef USER_GCODE_5
  2207. constexpr char _chr5 = USER_GCODE_5[strlen(USER_GCODE_5) - 1];
  2208. static_assert(_chr5 != '\n' && _chr5 != '\r', "USER_GCODE_5 cannot have a newline at the end. Please remove it.");
  2209. #endif
  2210. #endif
  2211. #if ENABLED(BACKLASH_COMPENSATION)
  2212. #if IS_CORE
  2213. #error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
  2214. #endif
  2215. #ifndef BACKLASH_DISTANCE_MM
  2216. #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM"
  2217. #endif
  2218. #ifndef BACKLASH_CORRECTION
  2219. #error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION"
  2220. #endif
  2221. #endif
  2222. #if ENABLED(GRADIENT_MIX) && MIXING_VIRTUAL_TOOLS < 2
  2223. #error "GRADIENT_MIX requires 2 or more MIXING_VIRTUAL_TOOLS."
  2224. #endif
  2225. /**
  2226. * Photo G-code requirements
  2227. */
  2228. #if ENABLED(PHOTO_GCODE)
  2229. #if (PIN_EXISTS(CHDK) + PIN_EXISTS(PHOTOGRAPH) + defined(PHOTO_SWITCH_POSITION)) > 1
  2230. #error "Please define only one of CHDK_PIN, PHOTOGRAPH_PIN, or PHOTO_SWITCH_POSITION."
  2231. #elif defined(PHOTO_SWITCH_POSITION) && !defined(PHOTO_POSITION)
  2232. #error "PHOTO_SWITCH_POSITION requires PHOTO_POSITION. Please update your Configuration_adv.h."
  2233. #elif PIN_EXISTS(CHDK) && defined(CHDK_DELAY)
  2234. #error "CHDK_DELAY has been replaced by PHOTO_SWITCH_MS. Please update your Configuration_adv.h."
  2235. #elif PIN_EXISTS(CHDK) && !defined(PHOTO_SWITCH_MS)
  2236. #error "PHOTO_SWITCH_MS is required with CHDK_PIN. Please update your Configuration_adv.h."
  2237. #elif defined(PHOTO_RETRACT_MM)
  2238. static_assert(PHOTO_RETRACT_MM + 0 >= 0, "PHOTO_RETRACT_MM must be >= 0.");
  2239. #endif
  2240. #endif
  2241. /**
  2242. * Prusa MMU2 requirements
  2243. */
  2244. #if ENABLED(PRUSA_MMU2)
  2245. #if DISABLED(NOZZLE_PARK_FEATURE)
  2246. #error "PRUSA_MMU2 requires NOZZLE_PARK_FEATURE."
  2247. #elif EXTRUDERS != 5
  2248. #error "PRUSA_MMU2 requires EXTRUDERS = 5."
  2249. #elif DISABLED(ADVANCED_PAUSE_FEATURE)
  2250. static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2.");
  2251. #endif
  2252. #endif
  2253. /**
  2254. * Advanced PRINTCOUNTER settings
  2255. */
  2256. #if ENABLED(PRINTCOUNTER)
  2257. #if defined(SERVICE_INTERVAL_1) != defined(SERVICE_NAME_1)
  2258. #error "Both SERVICE_NAME_1 and SERVICE_INTERVAL_1 are required."
  2259. #elif defined(SERVICE_INTERVAL_2) != defined(SERVICE_NAME_2)
  2260. #error "Both SERVICE_NAME_2 and SERVICE_INTERVAL_2 are required."
  2261. #elif defined(SERVICE_INTERVAL_3) != defined(SERVICE_NAME_3)
  2262. #error "Both SERVICE_NAME_3 and SERVICE_INTERVAL_3 are required."
  2263. #endif
  2264. #endif
  2265. /**
  2266. * Require soft endstops for certain setups
  2267. */
  2268. #if !BOTH(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
  2269. #if ENABLED(DUAL_X_CARRIAGE)
  2270. #error "DUAL_X_CARRIAGE requires both MIN_ and MAX_SOFTWARE_ENDSTOPS."
  2271. #elif HAS_HOTEND_OFFSET
  2272. #error "MIN_ and MAX_SOFTWARE_ENDSTOPS are both required with offset hotends."
  2273. #endif
  2274. #endif
  2275. /**
  2276. * Ensure this option is set intentionally
  2277. */
  2278. #if ENABLED(PSU_CONTROL) && !defined(PSU_ACTIVE_HIGH)
  2279. #error "PSU_CONTROL requires PSU_ACTIVE_HIGH to be defined as 'true' or 'false'."
  2280. #endif
  2281. #if HAS_CUTTER
  2282. #define _PIN_CONFLICT(P) (PIN_EXISTS(P) && P##_PIN == SPINDLE_LASER_PWM_PIN)
  2283. #if BOTH(SPINDLE_FEATURE, LASER_FEATURE)
  2284. #error "Enable only one of SPINDLE_FEATURE or LASER_FEATURE."
  2285. #elif !PIN_EXISTS(SPINDLE_LASER_ENA)
  2286. #error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN."
  2287. #elif ENABLED(SPINDLE_CHANGE_DIR) && !PIN_EXISTS(SPINDLE_DIR)
  2288. #error "SPINDLE_DIR_PIN is required for SPINDLE_CHANGE_DIR."
  2289. #elif ENABLED(SPINDLE_LASER_PWM)
  2290. #if !defined(SPINDLE_LASER_PWM_PIN) || SPINDLE_LASER_PWM_PIN < 0
  2291. #error "SPINDLE_LASER_PWM_PIN is required for SPINDLE_LASER_PWM."
  2292. #elif !PWM_PIN(SPINDLE_LASER_PWM_PIN)
  2293. #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
  2294. #elif SPINDLE_LASER_POWERUP_DELAY < 1
  2295. #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
  2296. #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
  2297. #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
  2298. #elif !defined(SPINDLE_LASER_PWM_INVERT)
  2299. #error "SPINDLE_LASER_PWM_INVERT is required for (SPINDLE|LASER)_FEATURE."
  2300. #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
  2301. #error "SPINDLE_LASER_PWM equation constant(s) missing."
  2302. #elif _PIN_CONFLICT(X_MIN)
  2303. #error "SPINDLE_LASER_PWM pin conflicts with X_MIN_PIN."
  2304. #elif _PIN_CONFLICT(X_MAX)
  2305. #error "SPINDLE_LASER_PWM pin conflicts with X_MAX_PIN."
  2306. #elif _PIN_CONFLICT(Z_STEP)
  2307. #error "SPINDLE_LASER_PWM pin conflicts with Z_STEP_PIN."
  2308. #elif _PIN_CONFLICT(CASE_LIGHT)
  2309. #error "SPINDLE_LASER_PWM_PIN conflicts with CASE_LIGHT_PIN."
  2310. #elif _PIN_CONFLICT(E0_AUTO_FAN)
  2311. #error "SPINDLE_LASER_PWM_PIN conflicts with E0_AUTO_FAN_PIN."
  2312. #elif _PIN_CONFLICT(E1_AUTO_FAN)
  2313. #error "SPINDLE_LASER_PWM_PIN conflicts with E1_AUTO_FAN_PIN."
  2314. #elif _PIN_CONFLICT(E2_AUTO_FAN)
  2315. #error "SPINDLE_LASER_PWM_PIN conflicts with E2_AUTO_FAN_PIN."
  2316. #elif _PIN_CONFLICT(E3_AUTO_FAN)
  2317. #error "SPINDLE_LASER_PWM_PIN conflicts with E3_AUTO_FAN_PIN."
  2318. #elif _PIN_CONFLICT(E4_AUTO_FAN)
  2319. #error "SPINDLE_LASER_PWM_PIN conflicts with E4_AUTO_FAN_PIN."
  2320. #elif _PIN_CONFLICT(E5_AUTO_FAN)
  2321. #error "SPINDLE_LASER_PWM_PIN conflicts with E5_AUTO_FAN_PIN."
  2322. #elif _PIN_CONFLICT(FAN)
  2323. #error "SPINDLE_LASER_PWM_PIN conflicts with FAN_PIN."
  2324. #elif _PIN_CONFLICT(FAN1)
  2325. #error "SPINDLE_LASER_PWM_PIN conflicts with FAN1_PIN."
  2326. #elif _PIN_CONFLICT(FAN2)
  2327. #error "SPINDLE_LASER_PWM_PIN conflicts with FAN2_PIN."
  2328. #elif _PIN_CONFLICT(CONTROLLERFAN)
  2329. #error "SPINDLE_LASER_PWM_PIN conflicts with CONTROLLERFAN_PIN."
  2330. #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_XY)
  2331. #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_XY."
  2332. #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_Z)
  2333. #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_Z."
  2334. #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_E)
  2335. #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_E."
  2336. #endif
  2337. #endif
  2338. #undef _PIN_CONFLICT
  2339. #endif