diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index aac1620482..07fd91f73a 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "Mega Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/src/pins/mega/pins_MINITRONICS.h index a76682a896..ad1b737e02 100644 --- a/Marlin/src/pins/mega/pins_MINITRONICS.h +++ b/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -34,9 +34,7 @@ #ifndef __AVR_ATmega1281__ #error "Oops! Select 'Minitronics' in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "Minitronics supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h index 866aec0af7..06686a016b 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h index 777c748dd2..195f742ad4 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 5 || E_STEPPERS > 5 +#elif HOTENDS > 5 || E_STEPPERS > 5 #error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index 02b50da6a1..292e713af4 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 3 || E_STEPPERS > 3 +#elif HOTENDS > 3 || E_STEPPERS > 3 #error "Formbot supports up to 3 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index b3fd5428b5..319a415cd3 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index bda343cb08..111a10d645 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 41a0940fc4..606934fd66 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 3 || E_STEPPERS > 3 +#elif HOTENDS > 3 || E_STEPPERS > 3 #error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h index aaf276da78..a1202213e7 100644 --- a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h +++ b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h @@ -27,9 +27,7 @@ #ifndef __AVR_ATmega2560__ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "TRONXY-V3-1.0 supports only 2 hotends/E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index 45bad889ff..8c07fde35e 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -25,12 +25,10 @@ * Z-Bolt X Series board – based on Arduino Mega2560 */ -#if HOTENDS > 4 || E_STEPPERS > 4 - #error "Z-Bolt X Series board supports up to 4 hotends / E-steppers." -#endif - #if !defined(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#elif HOTENDS > 4 || E_STEPPERS > 4 + #error "Z-Bolt X Series board supports up to 4 hotends / E-steppers." #endif #define BOARD_NAME "Z-Bolt X Series" diff --git a/Marlin/src/pins/stm32/pins_ARMED.h b/Marlin/src/pins/stm32/pins_ARMED.h index c793d83da5..8bf8bb4faf 100644 --- a/Marlin/src/pins/stm32/pins_ARMED.h +++ b/Marlin/src/pins/stm32/pins_ARMED.h @@ -23,6 +23,8 @@ #ifndef STM32F4 #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "Arm'ed supports up to 2 hotends / E-steppers." #endif #ifndef ARMED_V1_0 @@ -38,10 +40,6 @@ #undef E2END // Defined in Arduino Core STM32 to be used with EEPROM emulation. This board uses a real EEPROM. #define E2END 0xFFF // 4KB -#if HOTENDS > 2 || E_STEPPERS > 2 - #error "Arm'ed supports up to 2 hotends / E-steppers." -#endif - // // Limit Switches // diff --git a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h index c84644f80f..2697bbe2da 100644 --- a/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h +++ b/Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h @@ -23,9 +23,7 @@ #ifndef TARGET_STM32F4 #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#endif - -#if HOTENDS > 3 || E_STEPPERS > 3 +#elif HOTENDS > 3 || E_STEPPERS > 3 #error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E-steppers." #endif diff --git a/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h index 6f4ab56a6c..a0b8f87093 100644 --- a/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h +++ b/Marlin/src/pins/stm32/pins_BLACK_STM32F407VE.h @@ -31,6 +31,8 @@ #if !defined(STM32F4) && !defined(STM32F4xx) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers." #endif #ifndef BOARD_NAME @@ -43,10 +45,6 @@ //#define E2END 0x1FFF // 8KB #define SRAM_EEPROM_EMULATION -#if HOTENDS > 2 || E_STEPPERS > 2 - #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers." -#endif - // // Servos // diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN.h index 6dac3f65c4..b0088a33a2 100644 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN.h @@ -27,9 +27,7 @@ #ifndef __STM32F1__ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h index b488955b89..e136bc5114 100755 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN_MINI.h @@ -27,9 +27,7 @@ #ifndef __STM32F1__ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif - -#if HOTENDS > 1 || E_STEPPERS > 1 +#elif HOTENDS > 1 || E_STEPPERS > 1 #error "MKS Robin mini supports up to 1 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h index d57ac33406..0f0edf8248 100755 --- a/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h @@ -27,9 +27,7 @@ #ifndef __STM32F1__ #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif - -#if HOTENDS > 2 || E_STEPPERS > 2 +#elif HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/stm32/pins_RUMBA32.h b/Marlin/src/pins/stm32/pins_RUMBA32.h index 4c5f4df39e..5ac70744ff 100644 --- a/Marlin/src/pins/stm32/pins_RUMBA32.h +++ b/Marlin/src/pins/stm32/pins_RUMBA32.h @@ -23,6 +23,8 @@ #ifndef STM32F4 #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 3 || E_STEPPERS > 3 + #error "RUMBA32 supports up to 3 hotends / E-steppers." #endif #define RUMBA32_V1_0 @@ -32,10 +34,6 @@ //#define I2C_EEPROM #define E2END 0xFFF // 4KB -#if HOTENDS > 3 || E_STEPPERS > 3 - #error "RUMBA32 supports up to 3 hotends / E-steppers." -#endif - // // Limit Switches // diff --git a/Marlin/src/pins/stm32/pins_STM32F4.h b/Marlin/src/pins/stm32/pins_STM32F4.h index 75c78d0de9..23c5b3c118 100644 --- a/Marlin/src/pins/stm32/pins_STM32F4.h +++ b/Marlin/src/pins/stm32/pins_STM32F4.h @@ -23,6 +23,8 @@ #if !defined(STM32F4) && !defined(STM32F4xx) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "STM32F4 supports up to 2 hotends / E-steppers." #endif #define BOARD_NAME "Misc. STM32F4" @@ -35,10 +37,6 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if HOTENDS > 2 || E_STEPPERS > 2 - #error "STM32F4 supports up to 2 hotends / E-steppers." -#endif - // // Limit Switches // diff --git a/Marlin/src/pins/stm32/pins_THE_BORG.h b/Marlin/src/pins/stm32/pins_THE_BORG.h index 364179bc02..9b3e2e4b0a 100644 --- a/Marlin/src/pins/stm32/pins_THE_BORG.h +++ b/Marlin/src/pins/stm32/pins_THE_BORG.h @@ -23,6 +23,8 @@ #if !defined(STM32F7) #error "Oops! Select an STM32F7 board in 'Tools > Board.'" +#elif HOTENDS > 3 || E_STEPPERS > 3 + #error "The-Borg supports up to 3 hotends / E-steppers." #endif #define BOARD_NAME "The-Borge" @@ -33,10 +35,6 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if HOTENDS > 3 || E_STEPPERS > 3 - #error "The-Borg supports up to 3 hotends / E-steppers." -#endif - // // Limit Switches //