From 873b5db13dc1064d83a60b55622139aa14886ed5 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Wed, 23 Sep 2020 17:06:36 -0300 Subject: [PATCH] Include pins.h in dependencies script (#19468) --- Marlin/src/pins/esp32/pins_E4D.h | 2 +- Marlin/src/pins/esp32/pins_ESP32.h | 2 +- Marlin/src/pins/esp32/pins_MRR_ESPA.h | 2 +- Marlin/src/pins/esp32/pins_MRR_ESPE.h | 2 +- Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 2 +- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 2 +- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 4 ++++ Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 4 ++-- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 2 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 4 ++-- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 2 +- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 2 +- Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 2 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 2 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 2 +- .../src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h | 2 +- Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h | 2 +- Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h | 2 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN.h | 2 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 2 +- Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 2 +- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 2 +- Marlin/src/pins/mega/pins_CHEAPTRONIC.h | 2 +- Marlin/src/pins/mega/pins_CHEAPTRONICv2.h | 2 +- Marlin/src/pins/mega/pins_CNCONTROLS_11.h | 2 +- Marlin/src/pins/mega/pins_CNCONTROLS_12.h | 2 +- Marlin/src/pins/mega/pins_CNCONTROLS_15.h | 2 +- Marlin/src/pins/mega/pins_EINSTART-S.h | 2 +- Marlin/src/pins/mega/pins_ELEFU_3.h | 2 +- Marlin/src/pins/mega/pins_GT2560_REV_A.h | 2 +- Marlin/src/pins/mega/pins_GT2560_V3.h | 2 +- Marlin/src/pins/mega/pins_HJC2560C_REV2.h | 2 +- Marlin/src/pins/mega/pins_INTAMSYS40.h | 2 +- Marlin/src/pins/mega/pins_LEAPFROG.h | 2 +- Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h | 2 +- Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 2 +- Marlin/src/pins/mega/pins_MEGATRONICS.h | 2 +- Marlin/src/pins/mega/pins_MEGATRONICS_2.h | 2 +- Marlin/src/pins/mega/pins_MEGATRONICS_3.h | 2 +- Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 2 +- Marlin/src/pins/mega/pins_MINITRONICS.h | 2 +- Marlin/src/pins/mega/pins_OVERLORD.h | 2 +- Marlin/src/pins/mega/pins_PICA.h | 2 +- Marlin/src/pins/mega/pins_SILVER_GATE.h | 2 +- Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h | 2 +- Marlin/src/pins/pins.h | 7 +++++++ Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 2 +- Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 2 +- Marlin/src/pins/rambo/pins_MINIRAMBO.h | 2 +- Marlin/src/pins/rambo/pins_RAMBO.h | 2 +- Marlin/src/pins/rambo/pins_SCOOVO_X9H.h | 2 +- Marlin/src/pins/ramps/pins_AZTEEG_X3.h | 2 +- Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h | 2 +- Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h | 2 +- Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 2 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 2 +- Marlin/src/pins/ramps/pins_K8800.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 9 +++++---- Marlin/src/pins/ramps/pins_RAMPS_OLD.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS_PLUS.h | 2 +- Marlin/src/pins/ramps/pins_RUMBA.h | 2 +- Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 2 +- Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h | 2 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 2 +- Marlin/src/pins/ramps/pins_ULTIMAIN_2.h | 2 +- Marlin/src/pins/ramps/pins_ULTIMAKER.h | 2 +- Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h | 2 +- Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h | 2 +- Marlin/src/pins/sam/pins_ADSK.h | 2 +- Marlin/src/pins/sam/pins_ALLIGATOR_R2.h | 2 +- Marlin/src/pins/sam/pins_ARCHIM1.h | 2 +- Marlin/src/pins/sam/pins_ARCHIM2.h | 2 +- Marlin/src/pins/sam/pins_CNCONTROLS_15D.h | 2 +- Marlin/src/pins/sam/pins_DUE3DOM.h | 2 +- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 2 +- Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h | 2 +- Marlin/src/pins/sam/pins_RADDS.h | 2 +- Marlin/src/pins/sam/pins_RAMPS4DUE.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_DUO.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_SMART.h | 2 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 2 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 2 +- Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h | 2 +- Marlin/src/pins/samd/pins_RAMPS_144.h | 2 +- Marlin/src/pins/sanguino/pins_ANET_10.h | 2 +- Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h | 2 +- Marlin/src/pins/sanguino/pins_GEN3_PLUS.h | 2 +- Marlin/src/pins/sanguino/pins_GEN6.h | 2 +- Marlin/src/pins/sanguino/pins_GEN7_12.h | 2 +- Marlin/src/pins/sanguino/pins_GEN7_14.h | 2 +- Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h | 2 +- Marlin/src/pins/sanguino/pins_OMCA.h | 2 +- Marlin/src/pins/sanguino/pins_OMCA_A.h | 2 +- Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h | 2 +- Marlin/src/pins/sanguino/pins_SETHI.h | 2 +- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 2 +- Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h | 2 +- Marlin/src/pins/stm32f0/pins_MALYAN_M300.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 2 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 2 +- Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CHITU3D.h | 2 +- Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h | 2 +- Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V427.h | 2 +- Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h | 2 +- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 2 +- .../src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 2 +- Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h | 2 +- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 2 +- Marlin/src/pins/stm32f1/pins_MALYAN_M200.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 4 ++-- .../src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 4 ++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 2 +- Marlin/src/pins/stm32f1/pins_MORPHEUS.h | 2 +- Marlin/src/pins/stm32f1/pins_STM32F1R.h | 2 +- Marlin/src/pins/stm32f1/pins_STM3R_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 2 +- Marlin/src/pins/stm32f4/pins_ARMED.h | 2 +- Marlin/src/pins/stm32f4/pins_BEAST.h | 2 +- Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h | 2 +- Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 2 +- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 2 +- .../src/pins/stm32f4/pins_BTT_SKR_PRO_common.h | 2 +- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 2 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 2 +- Marlin/src/pins/stm32f4/pins_GENERIC_STM32F4.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h | 2 +- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 2 +- Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h | 2 +- Marlin/src/pins/stm32f4/pins_VAKE403D.h | 2 +- Marlin/src/pins/stm32f7/pins_REMRAM_V1.h | 2 +- Marlin/src/pins/stm32f7/pins_THE_BORG.h | 2 +- Marlin/src/pins/teensy2/pins_5DPRINT.h | 2 +- Marlin/src/pins/teensy2/pins_BRAINWAVE.h | 2 +- Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h | 2 +- Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 2 +- Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 2 +- Marlin/src/pins/teensy2/pins_SAV_MKI.h | 2 +- Marlin/src/pins/teensy2/pins_TEENSY2.h | 2 +- Marlin/src/pins/teensy2/pins_TEENSYLU.h | 2 +- Marlin/src/pins/teensy3/pins_TEENSY31_32.h | 2 +- Marlin/src/pins/teensy3/pins_TEENSY35_36.h | 2 +- Marlin/src/pins/teensy4/pins_T41U5XBB.h | 8 ++++---- Marlin/src/pins/teensy4/pins_TEENSY41.h | 16 ++++++++-------- .../scripts/common-dependencies-post.py | 16 ++++++++++++++++ .../PlatformIO/scripts/common-dependencies.h | 3 +++ .../PlatformIO/scripts/common-dependencies.py | 2 +- platformio.ini | 1 + 169 files changed, 213 insertions(+), 181 deletions(-) create mode 100644 buildroot/share/PlatformIO/scripts/common-dependencies-post.py diff --git a/Marlin/src/pins/esp32/pins_E4D.h b/Marlin/src/pins/esp32/pins_E4D.h index e66bb669f..7b5595444 100644 --- a/Marlin/src/pins/esp32/pins_E4D.h +++ b/Marlin/src/pins/esp32/pins_E4D.h @@ -27,7 +27,7 @@ * for more info check https://atbox.tech/ and join to Facebook page E4d@box. */ -#ifndef ARDUINO_ARCH_ESP32 +#if NOT_TARGET(ARDUINO_ARCH_ESP32) #error "Oops! Select an ESP32 board in 'Tools > Board.'" #elif EXTRUDERS > 1 || E_STEPPERS > 1 #error "E4d@box only supports one E Stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/esp32/pins_ESP32.h b/Marlin/src/pins/esp32/pins_ESP32.h index 5f793f1cf..d54a92b9c 100644 --- a/Marlin/src/pins/esp32/pins_ESP32.h +++ b/Marlin/src/pins/esp32/pins_ESP32.h @@ -25,7 +25,7 @@ * Espressif ESP32 (Tensilica Xtensa LX6) pin assignments */ -#ifndef ARDUINO_ARCH_ESP32 +#if NOT_TARGET(ARDUINO_ARCH_ESP32) "Oops! Select an ESP32 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPA.h b/Marlin/src/pins/esp32/pins_MRR_ESPA.h index 8a5b11ed7..0457b0afc 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPA.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPA.h @@ -27,7 +27,7 @@ * Supports 4 stepper drivers, heated bed, single hotend. */ -#ifndef ARDUINO_ARCH_ESP32 +#if NOT_TARGET(ARDUINO_ARCH_ESP32) #error "Oops! Select an ESP32 board in 'Tools > Board.'" #elif EXTRUDERS > 1 || E_STEPPERS > 1 #error "MRR ESPA only supports one E Stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index b38a88351..459d00e3e 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -28,7 +28,7 @@ * single hotend, and LCD controller. */ -#ifndef ARDUINO_ARCH_ESP32 +#if NOT_TARGET(ARDUINO_ARCH_ESP32) #error "Oops! Select an ESP32 board in 'Tools > Board.'" #elif EXTRUDERS > 2 || E_STEPPERS > 2 #error "MRR ESPE only supports two E Steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index ffc149279..78e742667 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -25,7 +25,7 @@ * AZSMZ MINI pin assignments */ -#ifndef MCU_LPC1768 +#if NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 6ccfca1ca..13e30b961 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -30,7 +30,7 @@ * */ -#ifndef MCU_LPC1768 +#if NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 20edcb07a..ed5fd530e 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -30,7 +30,7 @@ * */ -#ifndef MCU_LPC1768 +#if NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index ce1372ed7..1846b16e4 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -25,6 +25,10 @@ #define BOARD_INFO_NAME "BTT SKR V1.4" #endif +#ifndef BOARD_CUSTOM_BUILD_FLAGS + #define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28 +#endif + // // SD Connection // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index bfae569cc..9fade582e 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -22,10 +22,10 @@ #pragma once #ifdef SKR_HAS_LPC1769 - #ifndef MCU_LPC1769 + #if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif -#elif !defined(MCU_LPC1768) +#elif NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index 6bba067cb..5132081a5 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef MCU_LPC1768 +#if NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 54f3dfd95..7d0745aa2 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -25,9 +25,9 @@ * MKS SBASE pin assignments */ -#if defined(MKS_HAS_LPC1769) && !defined(MCU_LPC1769) +#if defined(MKS_HAS_LPC1769) && NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#elif !defined(MKS_HAS_LPC1769) && !defined(MCU_LPC1768) +#elif NOT_TARGET(MKS_HAS_LPC1769, MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 59d6a06cf..c57c987a7 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -25,7 +25,7 @@ * MKS SGEN-L pin assignments */ -#ifndef MCU_LPC1768 +#if NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 32c9ad271..7b87c95f8 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -36,7 +36,7 @@ // Numbers in parentheses () are the corresponding mega2560 pin numbers -#ifndef MCU_LPC1768 +#if NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index e717511c1..f9b9db918 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -25,7 +25,7 @@ * Selena Compact pin assignments */ -#ifndef MCU_LPC1768 +#if NOT_TARGET(MCU_LPC1768) #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index 83cf17eee..adf908526 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -25,7 +25,7 @@ * Azteeg X5 GT pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 8d5080b28..d798e3873 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -25,7 +25,7 @@ * Azteeg X5 MINI pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h index 592f666e3..99ff0fd25 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h @@ -25,7 +25,7 @@ * Azteeg X5 MINI pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index d5c7d9868..0314c5049 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -25,7 +25,7 @@ * Cohesion3D Mini pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 387090288..9dc870a35 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -25,7 +25,7 @@ * Cohesion3D ReMix pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index c9f3ff7aa..19c2d5032 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -29,7 +29,7 @@ * */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index b6f11a133..3df10a41d 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -25,7 +25,7 @@ * MKS SGen pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index de148995c..696270b41 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -25,7 +25,7 @@ * Smoothieboard pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 81f5b7501..75c899fe0 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -25,7 +25,7 @@ * TH3D EZBoard pin assignments */ -#ifndef MCU_LPC1769 +#if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h index 90d4340ba..98427d9e5 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h @@ -25,7 +25,7 @@ * Cheaptronic v1.0 pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h index 18bcc9e40..3a84f4395 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -27,7 +27,7 @@ * www.reprapobchod.cz */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index 6f792ad5f..675d4b726 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -25,7 +25,7 @@ * CartesioV11 pin assignments */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h index 7040c2bab..35426a453 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h @@ -25,7 +25,7 @@ * CartesioV12 pin assignments */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h index 4af0d991e..8bafbdf00 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h @@ -25,7 +25,7 @@ * CNControls V15 for HMS434 pin assignments */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/src/pins/mega/pins_EINSTART-S.h index eeaf0c419..40d65c353 100644 --- a/Marlin/src/pins/mega/pins_EINSTART-S.h +++ b/Marlin/src/pins/mega/pins_EINSTART-S.h @@ -26,7 +26,7 @@ * PCB Silkscreen: 3DPrinterCon_v3.5 */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_ELEFU_3.h b/Marlin/src/pins/mega/pins_ELEFU_3.h index 685611f78..af93c408a 100644 --- a/Marlin/src/pins/mega/pins_ELEFU_3.h +++ b/Marlin/src/pins/mega/pins_ELEFU_3.h @@ -25,7 +25,7 @@ * Elefu RA Board Pin Assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h index ebfdd24bb..2fb112f5a 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -27,7 +27,7 @@ * Richard Smith */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index 9b396d8db..d71a19541 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -25,7 +25,7 @@ * GT2560 RevB + GT2560 V3.0 + GT2560 V3.1 + GT2560 V4.0 pin assignment */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h index 2cbac0723..d21cd22e5 100644 --- a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -25,7 +25,7 @@ * HJC2560-C Rev2.x pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_INTAMSYS40.h b/Marlin/src/pins/mega/pins_INTAMSYS40.h index b6ff30a4f..3dc9c9a6b 100644 --- a/Marlin/src/pins/mega/pins_INTAMSYS40.h +++ b/Marlin/src/pins/mega/pins_INTAMSYS40.h @@ -27,7 +27,7 @@ * 2208 version exists and may or may not work */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_LEAPFROG.h b/Marlin/src/pins/mega/pins_LEAPFROG.h index 99872e1fb..9e6802b24 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG.h @@ -25,7 +25,7 @@ * Leapfrog Driver board pin assignments */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h index 61f5508cd..9c316aa75 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h @@ -29,7 +29,7 @@ * printer models. As such this file is currently specific to the Xeed. */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 6b90b884c..938ad82ef 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -25,7 +25,7 @@ * Mega controller pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Mega Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h index 2d98256fe..1c37b21ab 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -25,7 +25,7 @@ * MegaTronics pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h index 481dc35fa..9005ac2ac 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h @@ -25,7 +25,7 @@ * MegaTronics v2.0 pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h index 093889674..45ebd163a 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -25,7 +25,7 @@ * MegaTronics v3.0 / v3.1 / v3.2 pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index 526c9bfc6..74a45eac0 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -37,7 +37,7 @@ * number (B5) agrees with the schematic but B5 is assigned to logical pin 11. */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/src/pins/mega/pins_MINITRONICS.h index 138d4b443..9cb4401da 100644 --- a/Marlin/src/pins/mega/pins_MINITRONICS.h +++ b/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -32,7 +32,7 @@ * */ -#ifndef __AVR_ATmega1281__ +#if NOT_TARGET(__AVR_ATmega1281__) #error "Oops! Select 'Minitronics' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Minitronics supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index bbccc9356..9589fa585 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -25,7 +25,7 @@ * Dreammaker Overlord v1.1 pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Overlord Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 40ef3a610..acaeefe17 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -42,7 +42,7 @@ AD12 = 66; AD13 = 67; AD14 = 68; AD15 = 69; */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index a67725d9b..e339b0472 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(__AVR_ATmega1281__) && !defined(__AVR_ATmega2561__) +#if NOT_TARGET(__AVR_ATmega1281__, __AVR_ATmega2561__) #error "Oops! Select 'Silvergate' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h index ba7f64768..52e757c53 100644 --- a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h +++ b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h @@ -25,7 +25,7 @@ * Wanhao 0ne+ pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 861810d95..bf95c8731 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -51,6 +51,13 @@ #define HAS_FREE_AUX2_PINS !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) +// Test the target within the included pins file +#ifdef __MARLIN_PREBUILD__ + #define NOT_TARGET(V...) 0 +#else + #define NOT_TARGET(V...) NONE(V) +#endif + // // RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560 // diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index e2a4940e8..21e43bb36 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -25,7 +25,7 @@ * Einsy-Rambo pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 672c37241..39ba3ddf0 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -25,7 +25,7 @@ * Einsy-Retro pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index 0c14d9f46..c41a6ac17 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -25,7 +25,7 @@ * Mini-RAMBo pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'RAMBo' in 'Tools > Board' or the Mega2560 environment in PlatformIO." #endif diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index 5abf1f2d9..2109eb615 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -41,7 +41,7 @@ * Rambo pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h index bba628f30..4af38e1de 100644 --- a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h @@ -25,7 +25,7 @@ * Rambo pin assignments MODIFIED FOR Scoovo X9H ************************************************/ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h index d142fb903..e919b30cf 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h @@ -25,7 +25,7 @@ * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h index 5eee450fc..9ba6a0c1a 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h @@ -25,7 +25,7 @@ * AZTEEG_X3_PRO (Arduino Mega) pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 5 || E_STEPPERS > 5 #error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 1420aaaa5..967fec7b4 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -25,7 +25,7 @@ * bq ZUM Mega 3D board definition */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h index de80851df..3fa738e32 100644 --- a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h +++ b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h @@ -25,7 +25,7 @@ * Wanhao Duplicator i3 Plus pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index f1e6e6727..0877d168d 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -25,7 +25,7 @@ * Formbot Raptor pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 3 || E_STEPPERS > 3 #error "Formbot supports up to 3 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 4a9b9e1d5..362ff7ae4 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -25,7 +25,7 @@ * Formbot pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index a804df4ed..0470fc47e 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -25,7 +25,7 @@ * Formbot pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index ffaa72d98..3f7575497 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -25,7 +25,7 @@ // FYSETC F6 1.3 (and 1.4) pin assignments // -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'FYSETC F6' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_K8800.h b/Marlin/src/pins/ramps/pins_K8800.h index 64e3c2566..f526b9b22 100644 --- a/Marlin/src/pins/ramps/pins_K8800.h +++ b/Marlin/src/pins/ramps/pins_K8800.h @@ -25,7 +25,7 @@ * Velleman K8800 (Vertex) */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index e32c79afa..b2d394e61 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -51,12 +51,13 @@ #error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1." #endif -#if NONE(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768) - #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" - #endif +#if NOT_TARGET(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768, __AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif +// Custom flags and defines for the build +//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__ + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "RAMPS 1.4" #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index d154b2fdd..6d2dad231 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -25,7 +25,7 @@ * Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index bdd53abbc..19209f1e2 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -38,7 +38,7 @@ * */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 5b4f83032..5be2896e1 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -25,7 +25,7 @@ * RUMBA pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 3 || E_STEPPERS > 3 #error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index 98a20fb3f..e7a59a69d 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -25,7 +25,7 @@ * Tenlog pin assignments */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Tenlog supports up to 2 hotends / E-steppers. Comment out this line to continue." 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 d02a063e8..f342eff8a 100644 --- a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h +++ b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h @@ -25,7 +25,7 @@ * Arduino Mega for Tronxy X5S-2E, etc. */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "TRONXY-V3-1.0 supports only 2 hotends/E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index ab3dc1a32..33b2a60d6 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -20,7 +20,7 @@ * */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h index cbf9523ea..c6251ae81 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h @@ -33,7 +33,7 @@ * case light */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index f316fad77..2dfde42ba 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -33,7 +33,7 @@ * case light */ -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index a44baf26e..c5bbd02bf 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -60,7 +60,7 @@ //#define BOARD_REV_1_0 //#define BOARD_REV_1_5 -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #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 4bf63f348..096d97087 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -25,7 +25,7 @@ * Z-Bolt X Series board – based on Arduino Mega2560 */ -#ifndef __AVR_ATmega2560__ +#if NOT_TARGET(__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." diff --git a/Marlin/src/pins/sam/pins_ADSK.h b/Marlin/src/pins/sam/pins_ADSK.h index 289fa462c..c4d7c0794 100644 --- a/Marlin/src/pins/sam/pins_ADSK.h +++ b/Marlin/src/pins/sam/pins_ADSK.h @@ -27,7 +27,7 @@ #define BOARD_INFO_NAME "ADSK" -#if !defined(__SAM3X8E__) && !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h index 4d08ed784..8d6906117 100644 --- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h +++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h @@ -26,7 +26,7 @@ * https://reprap.org/wiki/Alligator_Board */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_ARCHIM1.h b/Marlin/src/pins/sam/pins_ARCHIM1.h index 134049781..8c54cad3b 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM1.h +++ b/Marlin/src/pins/sam/pins_ARCHIM1.h @@ -37,7 +37,7 @@ * https://github.com/ultimachine/Archim/wiki */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Archim' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index b527b5118..3223ac7a0 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -37,7 +37,7 @@ * https://github.com/ultimachine/Archim/wiki */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Archim' in 'Tools > Board.'" #elif DISABLED(TMC_USE_SW_SPI) #error "Archim2 requires Software SPI. Enable TMC_USE_SW_SPI in Configuration_adv.h." diff --git a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h index a2094bee4..fcd2bb4c6 100644 --- a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h +++ b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h @@ -24,7 +24,7 @@ * CNControls V15 for HMS434 with DUE pin assignments */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index 260a2810f..b7c01f843 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -25,7 +25,7 @@ * DUE3DOM pin assignments */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index 946cadcfa..7f559f119 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -25,7 +25,7 @@ * DUE3DOM MINI pin assignments */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h index be6b0fb2e..2cfbecc08 100644 --- a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h @@ -25,7 +25,7 @@ * PRINTRBOARD_G2 */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index bbbfb2e55..c82c7e9c5 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -25,7 +25,7 @@ * RADDS */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_RAMPS4DUE.h b/Marlin/src/pins/sam/pins_RAMPS4DUE.h index 2bd894f9a..54548333b 100644 --- a/Marlin/src/pins/sam/pins_RAMPS4DUE.h +++ b/Marlin/src/pins/sam/pins_RAMPS4DUE.h @@ -39,7 +39,7 @@ * A15 | NC */ -#if !defined(__SAM3X8E__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index 5f8864ab1..94f1b5077 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -43,7 +43,7 @@ * A15 | A11 */ -#if !defined(__SAM3X8E__) && !defined(__AVR_ATmega2560__) +#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index eb9889607..5662590e2 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -28,7 +28,7 @@ * Use 4k7 thermistor tables */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_RAMPS_SMART.h b/Marlin/src/pins/sam/pins_RAMPS_SMART.h index 06eee2d97..9b76ee290 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_SMART.h +++ b/Marlin/src/pins/sam/pins_RAMPS_SMART.h @@ -60,7 +60,7 @@ * (Search the web for "Arduino DUE Board Pinout" to see the correct header.) */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 3ecd64aa8..524c14d19 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -32,7 +32,7 @@ * | */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 2b52338d3..187473b3d 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -32,7 +32,7 @@ * | */ -#ifndef __SAM3X8E__ +#if NOT_TARGET(__SAM3X8E__) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index 75b29629e..0b91ba61d 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -26,7 +26,7 @@ * https://reprapworld.com/documentation/datasheet_ultratronics10_05.pdf */ -#ifndef ARDUINO_ARCH_SAM +#if NOT_TARGET(ARDUINO_ARCH_SAM) #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 93e758b3a..388ac1a33 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -25,7 +25,7 @@ * AGCM4 with RAMPS v1.4.4 pin assignments */ -#ifndef ARDUINO_GRAND_CENTRAL_M4 +#if NOT_TARGET(ARDUINO_GRAND_CENTRAL_M4) #error "Oops! Select 'Adafruit Grand Central M4' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index d1ac131c0..3978198ee 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -89,7 +89,7 @@ * Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community. */ -#ifndef __AVR_ATmega1284P__ +#if NOT_TARGET(__AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'melzi' or 'melzi_optiboot.')" #endif diff --git a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h index 901e32674..e927aac12 100644 --- a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h +++ b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h @@ -50,7 +50,7 @@ * */ -#ifndef __AVR_ATmega644P__ +#if NOT_TARGET(__AVR_ATmega644P__) #error "Oops! Select 'Sanguino' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h b/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h index a28b4c039..1961446e2 100644 --- a/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h +++ b/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h @@ -50,7 +50,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_GEN6.h b/Marlin/src/pins/sanguino/pins_GEN6.h index ad54f3cd7..98eb61689 100644 --- a/Marlin/src/pins/sanguino/pins_GEN6.h +++ b/Marlin/src/pins/sanguino/pins_GEN6.h @@ -52,7 +52,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_GEN7_12.h b/Marlin/src/pins/sanguino/pins_GEN7_12.h index 75b75cdc6..ed550624f 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_12.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_12.h @@ -52,7 +52,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_GEN7_14.h b/Marlin/src/pins/sanguino/pins_GEN7_14.h index af0d82415..752fe3074 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_14.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_14.h @@ -52,7 +52,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h index 27ec622fc..1a19c33de 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h @@ -55,7 +55,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_OMCA.h b/Marlin/src/pins/sanguino/pins_OMCA.h index 8e4c6d2b6..d9f43995d 100644 --- a/Marlin/src/pins/sanguino/pins_OMCA.h +++ b/Marlin/src/pins/sanguino/pins_OMCA.h @@ -77,7 +77,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__) #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega644' or 'ATmega644P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_OMCA_A.h b/Marlin/src/pins/sanguino/pins_OMCA_A.h index 922ef69b5..1b4c9b68b 100644 --- a/Marlin/src/pins/sanguino/pins_OMCA_A.h +++ b/Marlin/src/pins/sanguino/pins_OMCA_A.h @@ -76,7 +76,7 @@ * */ -#ifndef __AVR_ATmega644__ +#if NOT_TARGET(__AVR_ATmega644__) #error "Oops! Select 'Sanguino' in 'Tools > Board' and ATmega644 in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 83c2d56d2..4b4fb1d70 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -52,7 +52,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_SETHI.h b/Marlin/src/pins/sanguino/pins_SETHI.h index 19fea9ff5..e0a060461 100644 --- a/Marlin/src/pins/sanguino/pins_SETHI.h +++ b/Marlin/src/pins/sanguino/pins_SETHI.h @@ -50,7 +50,7 @@ * */ -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index 262199e31..838ffe38a 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) +#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" #endif diff --git a/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h b/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h index 0e5bd5898..abdd088f9 100644 --- a/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h +++ b/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h @@ -22,7 +22,7 @@ #pragma once -#ifndef STM32F0xx +#if NOT_TARGET(STM32F0xx) #error "Oops! Select an STM32F0 board in your IDE." #endif diff --git a/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h b/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h index d6a83aca1..dfa413b63 100644 --- a/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h +++ b/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h @@ -22,7 +22,7 @@ #pragma once -#if NONE(__STM32F1__, STM32F1xx, STM32F0xx) +#if NOT_TARGET(__STM32F1__, STM32F1xx, STM32F0xx) #error "Oops! Select a 'Malyan M300' board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index cff34daf2..e4f8e614b 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef TARGET_STM32F1 +#if NOT_TARGET(TARGET_STM32F1) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 923b0fa4c..85c5f646d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef TARGET_STM32F1 +#if NOT_TARGET(TARGET_STM32F1) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 4a12d5d32..09dff2ef3 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef TARGET_STM32F1 +#if NOT_TARGET(TARGET_STM32F1) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index 5254166fa..420ffc631 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef TARGET_STM32F1 +#if NOT_TARGET(TARGET_STM32F1) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "CCROBOT-ONLINE MEEB_3DP only supports 1 hotend / E-stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index bf9a7d8e0..2521359e5 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(__STM32F1__) && !defined(__STM32F4__) +#if NOT_TARGET(__STM32F1__, __STM32F4__) #error "Oops! Select an STM32F1/4 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h index 54ff9a779..10c615e52 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(__STM32F1__) && !defined(__STM32F4__) +#if NOT_TARGET(__STM32F1__, __STM32F4__) #error "Oops! Select an STM32F1/4 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h index a825db275..f8f3225f3 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(__STM32F1__) && !defined(__STM32F4__) +#if NOT_TARGET(__STM32F1__, __STM32F4__) #error "Oops! Select an STM32F1/4 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index f122a2b7c..c1f1e315d 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -24,7 +24,7 @@ * CREALITY (STM32F103) board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h index 9453a6d51..5b51ece07 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h @@ -24,7 +24,7 @@ * CREALITY v4.2.7 (STM32F103) board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h index ca9364a57..b7db592e7 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index 1f5e70a15..24aa83d94 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h index f07320db4..5e8bd11b4 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index fe6c0b132..b6520d563 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -26,7 +26,7 @@ * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index 716de610a..7dbee215a 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -26,7 +26,7 @@ * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index fe6c0b132..b6520d563 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -26,7 +26,7 @@ * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index 1fc4fa942..7731ffb5e 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -26,7 +26,7 @@ * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h index d474eb25f..64948039b 100644 --- a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h @@ -28,7 +28,7 @@ * Pin assignments for 32-bit JGAurora A5S & A1 */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "JGAurora 32-bit board only supports 1 hotend / E-stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index d08045ec1..799477ac1 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -22,7 +22,7 @@ * Longer3D LK1/LK2 & Alfawise U20/U30 (STM32F103VET6) board pin assignments */ -#if !defined(__STM32F1__) && !defined(STM32F1xx) +#if NOT_TARGET(__STM32F1__, STM32F1xx) #error "Oops! Select a STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "Longer3D board only supports 1 hotend / E-stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h b/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h index 39c52ab0d..d3c26c497 100644 --- a/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h +++ b/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h @@ -25,7 +25,7 @@ * MALYAN M200 pin assignments */ -#if NONE(__STM32F1__, STM32F1xx, STM32F0xx) +#if NOT_TARGET(__STM32F1__, STM32F1xx, STM32F0xx) #error "Oops! Select an STM32 board in your IDE." #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 1ab916583..e39c8f234 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -27,7 +27,7 @@ * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware */ -#if !defined(STM32F1) && !defined(STM32F1xx) +#if NOT_TARGET(STM32F1, STM32F1xx) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 3f4dee0f6..19f3c3efd 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -25,7 +25,7 @@ * MKS Robin nano (STM32F130VET6) board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "MKS Robin e3p supports up to 1 hotends / E-steppers. Comment out this line to continue." @@ -184,7 +184,7 @@ #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE - + #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 9461a828a..f6a3b555c 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -25,7 +25,7 @@ * MKS Robin E3 & E3D (STM32F103RCT6) common board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 3cf0bce06..2bd417951 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "MKS Robin Lite supports only 1 hotend / E-stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h index 6ce6c6010..bcb731df7 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h @@ -25,7 +25,7 @@ * MKS Robin Lite 3 (STM32F103RCT6) board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin Lite3 supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index 19b04c9e7..a7e6a6e22 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -25,7 +25,7 @@ * MKS Robin mini (STM32F130VET6) board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "MKS Robin mini only supports 1 hotend / E-stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 88333e9b9..e705b7b57 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -25,7 +25,7 @@ * MKS Robin nano (STM32F130VET6) board pin assignments */ -#if !defined(STM32F1) && !defined(STM32F1xx) +#if NOT_TARGET(STM32F1, STM32F1xx) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index d911ab2b5..ccb07b35f 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -25,7 +25,7 @@ * MKS Robin nano (STM32F130VET6) board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue." @@ -204,7 +204,7 @@ #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN #define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE - + #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 9b3817df8..2e74b6b15 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -25,7 +25,7 @@ * MKS Robin pro (STM32F103ZET6) board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 3 || E_STEPPERS > 3 #error "MKS Robin pro supports up to 3 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h index 1cd3780ec..28262eaa8 100644 --- a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h +++ b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h @@ -30,7 +30,7 @@ * MORPHEUS Board pin assignments */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_STM32F1R.h b/Marlin/src/pins/stm32f1/pins_STM32F1R.h index 63fb383c9..79f53f02c 100644 --- a/Marlin/src/pins/stm32f1/pins_STM32F1R.h +++ b/Marlin/src/pins/stm32f1/pins_STM32F1R.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h index c18642fb1..468ee5394 100644 --- a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(__STM32F1__) && !defined(__STM32F4__) +#if NOT_TARGET(__STM32F1__, __STM32F4__) #error "Oops! Select an STM32F1/4 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index 598db026f..4745641ea 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -28,7 +28,7 @@ * https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf */ -#ifndef __STM32F1__ +#if NOT_TARGET(__STM32F1__) #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "Trigorilla Pro supports up to 2 hotends / E-steppers. Comment out this line to continue." diff --git a/Marlin/src/pins/stm32f4/pins_ARMED.h b/Marlin/src/pins/stm32f4/pins_ARMED.h index 696241693..db57db14d 100644 --- a/Marlin/src/pins/stm32f4/pins_ARMED.h +++ b/Marlin/src/pins/stm32f4/pins_ARMED.h @@ -24,7 +24,7 @@ #pragma once -#ifndef STM32F4 +#if NOT_TARGET(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." diff --git a/Marlin/src/pins/stm32f4/pins_BEAST.h b/Marlin/src/pins/stm32f4/pins_BEAST.h index 691b468c3..d23442cce 100644 --- a/Marlin/src/pins/stm32f4/pins_BEAST.h +++ b/Marlin/src/pins/stm32f4/pins_BEAST.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(__STM32F1__) && !defined(__STM32F4__) +#if NOT_TARGET(__STM32F1__, __STM32F4__) #error "Oops! Select an STM32F1/4 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h index dc0dab1cd..b13d49554 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h +++ b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h @@ -27,7 +27,7 @@ * Shield - https://github.com/jmz52/Hardware */ -#if !defined(STM32F4) && !defined(STM32F4xx) +#if NOT_TARGET(STM32F4, 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." diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 009b1b65f..7843572e1 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef STM32F4 +#if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "BIGTREE BTT002 V1.0 supports up to 1 hotends / E-steppers." diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index 8cc1ca5e9..ddca719e5 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef STM32F4 +#if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 8 || E_STEPPERS > 8 #error "BIGTREE GTR V1.0 supports up to 8 hotends / E-steppers." diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index b45914284..e9abd6679 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef STM32F4 +#if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index a3a5ccdff..808751d7a 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(STM32F4) && !defined(STM32F4xx) +#if NOT_TARGET(STM32F4, STM32F4xx) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 6 || E_STEPPERS > 6 #error "FLYF407ZG supports up to 6 hotends / E-steppers." diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 9ffedc2ac..a6d7f8a49 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef STM32F4 +#if NOT_TARGET(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." diff --git a/Marlin/src/pins/stm32f4/pins_GENERIC_STM32F4.h b/Marlin/src/pins/stm32f4/pins_GENERIC_STM32F4.h index 44b2e6b27..ae469365a 100644 --- a/Marlin/src/pins/stm32f4/pins_GENERIC_STM32F4.h +++ b/Marlin/src/pins/stm32f4/pins_GENERIC_STM32F4.h @@ -25,7 +25,7 @@ * To build with Arduino IDE use "Discovery F407VG" * To build with PlatformIO use environment "STM32F4" */ -#if !defined(STM32F4) && !defined(STM32F4xx) +#if NOT_TARGET(STM32F4, 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." diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 0f0d3d048..48973688a 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -18,7 +18,7 @@ */ #pragma once -#if !defined(STM32F4) && !defined(STM32F4xx) +#if NOT_TARGET(STM32F4, STM32F4xx) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "LERDGE K supports up to 2 hotends / E-steppers." diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index 2e55782ed..0600ed433 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -18,7 +18,7 @@ */ #pragma once -#if !defined(STM32F4) && !defined(STM32F4xx) +#if NOT_TARGET(STM32F4, STM32F4xx) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "LERDGE S supports up to 2 hotends / E-steppers." diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index da2851c13..bed51ca66 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -18,7 +18,7 @@ */ #pragma once -#if !defined(STM32F4) && !defined(STM32F4xx) +#if NOT_TARGET(STM32F4, STM32F4xx) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "LERDGE X supports only one hotend / E-steppers" diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h index bb04cb82e..c2f5f324b 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef STM32F4 +#if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 2 || E_STEPPERS > 2 #error "MKS_ROBIN2 supports up to 2 hotends / E-steppers." diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index 90f9e5001..338fda1e5 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -26,7 +26,7 @@ * */ -#ifndef STM32F4 +#if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 3 || E_STEPPERS > 3 #error "RUMBA32 boards support up to 3 hotends / E-steppers." diff --git a/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h b/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h index a0bd38b6a..0278dd843 100644 --- a/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h +++ b/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h @@ -40,7 +40,7 @@ #pragma once -#ifndef STM32F4 +#if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index 1ffe25b49..6c826b068 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -21,7 +21,7 @@ */ #pragma once -#if !defined(STM32F4) && !defined(STM32F4xx) +#if NOT_TARGET(STM32F4, 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." diff --git a/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h b/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h index 6706d26f6..c3dc00472 100644 --- a/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h +++ b/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef STM32F7xx +#if NOT_TARGET(STM32F7xx) #error "Oops! Select an STM32F7 board in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/stm32f7/pins_THE_BORG.h b/Marlin/src/pins/stm32f7/pins_THE_BORG.h index 756f495e4..c050824a8 100644 --- a/Marlin/src/pins/stm32f7/pins_THE_BORG.h +++ b/Marlin/src/pins/stm32f7/pins_THE_BORG.h @@ -21,7 +21,7 @@ */ #pragma once -#ifndef STM32F7 +#if NOT_TARGET(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." diff --git a/Marlin/src/pins/teensy2/pins_5DPRINT.h b/Marlin/src/pins/teensy2/pins_5DPRINT.h index 7ba1fbcf8..908e12e0b 100644 --- a/Marlin/src/pins/teensy2/pins_5DPRINT.h +++ b/Marlin/src/pins/teensy2/pins_5DPRINT.h @@ -68,7 +68,7 @@ * https://bitbucket.org/makible/5dprint-d8-controller-board */ -#ifndef __AVR_AT90USB1286__ +#if NOT_TARGET(__AVR_AT90USB1286__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h index ce1b4e3bb..97d210a0f 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h @@ -68,7 +68,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#ifndef __AVR_AT90USB646__ +#if NOT_TARGET(__AVR_AT90USB646__) #error "Oops! Select 'AT90USB646_TEENSYPP' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h index eeca39c14..e41fcaab9 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h @@ -75,7 +75,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#ifndef __AVR_AT90USB1286__ +#if NOT_TARGET(__AVR_AT90USB1286__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index 7d96bd12f..ffecc03b4 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -62,7 +62,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#ifndef __AVR_AT90USB1286__ +#if NOT_TARGET(__AVR_AT90USB1286__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 83b17b656..3fb8c7f25 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -63,7 +63,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#ifndef __AVR_AT90USB1286__ +#if NOT_TARGET(__AVR_AT90USB1286__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/src/pins/teensy2/pins_SAV_MKI.h index cdd9b634b..4d083ecd1 100644 --- a/Marlin/src/pins/teensy2/pins_SAV_MKI.h +++ b/Marlin/src/pins/teensy2/pins_SAV_MKI.h @@ -62,7 +62,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#ifndef __AVR_AT90USB1286__ +#if NOT_TARGET(__AVR_AT90USB1286__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index 9ef31e84b..4efd83d9b 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -107,7 +107,7 @@ * E DIR 35 a7 a3 31 Y DIR */ -#ifndef __AVR_AT90USB1286__ +#if NOT_TARGET(__AVR_AT90USB1286__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h index c69a1c06a..09bbeebdd 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSYLU.h +++ b/Marlin/src/pins/teensy2/pins_TEENSYLU.h @@ -73,7 +73,7 @@ * The pin assignments in this file match the silkscreen. */ -#if !defined(__AVR_AT90USB1286__) && !defined(__AVR_AT90USB1286P__) +#if NOT_TARGET(__AVR_AT90USB1286__, __AVR_AT90USB1286P__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h index 863137e9c..18d158295 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h @@ -27,7 +27,7 @@ * https://www.pjrc.com/teensy/teensyduino.html */ -#if !IS_32BIT_TEENSY +#if NOT_TARGET(IS_32BIT_TEENSY) #error "Oops! Select 'Teensy 3.1' or 'Teensy 3.2' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h index 02d8374f2..6de50f099 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h @@ -27,7 +27,7 @@ * https://www.pjrc.com/teensy/teensyduino.html ****************************************************************************************/ -#if !IS_32BIT_TEENSY +#if NOT_TARGET(IS_32BIT_TEENSY) #error "Oops! Select 'Teensy 3.5' or 'Teensy 3.6' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/teensy4/pins_T41U5XBB.h b/Marlin/src/pins/teensy4/pins_T41U5XBB.h index 1541bfbd6..b985d0bd9 100644 --- a/Marlin/src/pins/teensy4/pins_T41U5XBB.h +++ b/Marlin/src/pins/teensy4/pins_T41U5XBB.h @@ -27,7 +27,7 @@ * https://www.pjrc.com/teensy/teensyduino.html ****************************************************************************************/ -#if !IS_32BIT_TEENSY || !IS_TEENSY41 +#if NOT_TARGET(IS_32BIT_TEENSY) || NOT_TARGET(IS_TEENSY41) #error "Oops! Select 'Teensy 4.1' in 'Tools > Board.'" #else #define BOARD_INFO_NAME "Teensy4.1" @@ -42,7 +42,7 @@ GND |-----#####-----| VIN (3.65 TO 5.5V) RX1 CS1 RX1 PWM 0 | ##### | GND TX1 MISO1 TX1 PWM 1 | | 3.3V - STPX PWM 2 | | 23 A9 PWM + STPX PWM 2 | | 23 A9 PWM DIRX PWM 3 | | 22 A8 PWM LIMZ STPY PWM 4 | | 21 A7 RX5 LIMY DIRY PWM 5 | | 20 A6 TX5 LIMX @@ -58,13 +58,13 @@ SDA PWM 25 | | 40 A16 STENY STPB MOSI1 26 | | 39 A15 MISO1 STENZ DIRB SCK1 27 | * * * * * | 38 A14 STENA - LIMB RX7 PWM 28 | | 37 PWM STENB + LIMB RX7 PWM 28 | | 37 PWM STENB DOOR TX7 PWM 29 | | 36 PWM ST0 ST1 30 | | 35 TX8 ST3 AUX0 31 | SDCARD | 34 RX8 ST2 AUX1 32 |_______________| 33 PWM AUX2 - + */ // diff --git a/Marlin/src/pins/teensy4/pins_TEENSY41.h b/Marlin/src/pins/teensy4/pins_TEENSY41.h index 08a3f5e0d..c06fdc83e 100644 --- a/Marlin/src/pins/teensy4/pins_TEENSY41.h +++ b/Marlin/src/pins/teensy4/pins_TEENSY41.h @@ -27,7 +27,7 @@ * https://www.pjrc.com/teensy/teensyduino.html ****************************************************************************************/ -#if !IS_32BIT_TEENSY || !IS_TEENSY41 +#if NOT_TARGET(IS_32BIT_TEENSY) || NOT_TARGET(IS_TEENSY41) #error "Oops! Select 'Teensy 4.1' in 'Tools > Board.'" #else #define BOARD_INFO_NAME "Teensy4.1" @@ -44,27 +44,27 @@ X_DIR_PIN MISO1 TX1 PWM 1 | | 3.3V Y_STEP_PIN PWM 2 | | 23 A9 PWM SERVO1_PIN Y_DIR_PIN PWM 3 | | 22 A8 PWM SERVO0_PIN - Z_STEP_PIN PWM 4 | | 21 A7 RX5 + Z_STEP_PIN PWM 4 | | 21 A7 RX5 Z_DIR_PIN PWM 5 | | 20 A6 TX5 FILWIDTH_PIN - X_ENABLE_PIN PWM 6 | | 19 A5 PWM SCL0 + X_ENABLE_PIN PWM 6 | | 19 A5 PWM SCL0 Y_ENABLE_PIN RX2 PWM 7 | | 18 A4 PWM SDA0 HEATER_1_PIN - Z_ENABLE_PIN TX2 PWM 8 | | 17 A3 RX4 SDA1 + Z_ENABLE_PIN TX2 PWM 8 | | 17 A3 RX4 SDA1 E0_STEP_PIN PWM 9 | | 16 A2 TX4 SCL1 TEMP_0_PIN E0_DIR_PIN PWM 10 | | 15 A1 PWM RX3 TEMP_BED_PIN MOSI_PIN MOSI0 PWM 11 | | 14 A0 PWM TX3 TEMP_1_PIN MISO_PIN MISO0 PWM 12 | | 13 LED PWM SCK0 SCK_PIN 3.3V | | GND - Z_STOP_PIN PWM 24 | | 41 A17 - E0_ENABLE_PIN PWM 25 | | 40 A16 + Z_STOP_PIN PWM 24 | | 41 A17 + E0_ENABLE_PIN PWM 25 | | 40 A16 FAN_PIN MOSI1 26 | | 39 A15 MISO1 X_STOP_PIN Z-PROBE PWR SCK1 27 | * * * * * | 38 A14 Y_STOP_PIN - SOL1_PIN RX7 PWM 28 | | 37 PWM HEATER_0_PIN + SOL1_PIN RX7 PWM 28 | | 37 PWM HEATER_0_PIN FAN_PIN TX7 PWM 29 | | 36 PWM HEATER_BED_PIN X_CS_PIN 30 | | 35 TX8 E1_ENABLE_PIN y_CS_PIN 31 | SDCARD | 34 RX8 E1_DIR_PIN Z_CS_PIN 32 |_______________| 33 PWM E1_STEP_PIN - + */ // diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies-post.py b/buildroot/share/PlatformIO/scripts/common-dependencies-post.py new file mode 100644 index 000000000..2b1b94811 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/common-dependencies-post.py @@ -0,0 +1,16 @@ +# +# common-dependencies-post.py +# Convenience script to add build flags for Marlin Enabled Features +# + +Import("env") +Import("projenv") + +def apply_board_build_flags(): + if not 'BOARD_CUSTOM_BUILD_FLAGS' in env['MARLIN_FEATURES']: + return + projenv.Append(CCFLAGS=env['MARLIN_FEATURES']['BOARD_CUSTOM_BUILD_FLAGS'].split()) + +# We need to add the board build flags in a post script +# so the platform build script doesn't overwrite the custom CCFLAGS +apply_board_build_flags() diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.h b/buildroot/share/PlatformIO/scripts/common-dependencies.h index e88e74e81..344dce9f1 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.h +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.h @@ -149,3 +149,6 @@ #define HAS_MENU_UBL #endif #endif + +// Include pins for the current board. Platform tests will be skipped. No HAL-defined pins. +#include "../../../../Marlin/src/pins/pins.h" diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py index def3bf40c..600585515 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.py +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py @@ -238,7 +238,7 @@ def load_marlin_features(): else: cmd += ['-D' + s] - cmd += ['-w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h'] + cmd += ['-D__MARLIN_PREBUILD__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h'] cmd = ' '.join(cmd) blab(cmd) define_list = subprocess.check_output(cmd, shell=True).splitlines() diff --git a/platformio.ini b/platformio.ini index c68daf2c7..f8ec029de 100644 --- a/platformio.ini +++ b/platformio.ini @@ -184,6 +184,7 @@ default_src_filter = + - - + extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py + post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants lib_deps =