From 90bc1993b6811623dd9d0de00251e0c63415cb49 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 e66bb669f7..7b5595444c 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 5f793f1cf2..d54a92b9c4 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 8a5b11ed71..0457b0afca 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 b38a88351d..459d00e3e7 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 ffc149279c..78e7426674 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 6ccfca1cac..13e30b961c 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 20edcb07a7..ed5fd530e0 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 ce1372ed7a..1846b16e46 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 bfae569cc4..9fade582e9 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 6bba067cbe..5132081a55 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 54f3dfd95c..7d0745aa2d 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 59d6a06cf4..c57c987a75 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 32c9ad2711..7b87c95f84 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 e717511c12..f9b9db918d 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 83cf17eee9..adf9085262 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 8d5080b280..d798e38735 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 592f666e39..99ff0fd25a 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 d5c7d9868f..0314c5049f 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 3870902881..9dc870a353 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 c9f3ff7aae..19c2d50320 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 b6f11a133d..3df10a41d7 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 de148995ca..696270b417 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 81f5b75016..75c899fe01 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 90d4340ba8..98427d9e59 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 18bcc9e407..3a84f4395f 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 6f792ad5fa..675d4b7262 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 7040c2babb..35426a4531 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 4af0d991e9..8bafbdf000 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 eeaf0c4197..40d65c353e 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 685611f78d..af93c408a2 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 ebfdd24bb4..2fb112f5af 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 9b396d8db2..d71a195419 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 2cbac0723c..d21cd22e53 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 b6ff30a4fc..3dc9c9a6be 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 99872e1fb4..9e6802b24b 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 61f5508cdc..9c316aa759 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 6b90b884c2..938ad82eff 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 2d98256fe7..1c37b21ab7 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 481dc35fa3..9005ac2acf 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 0938896748..45ebd163a7 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 526c9bfc68..74a45eac01 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 138d4b4431..9cb4401da9 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 bbccc93561..9589fa5851 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 40ef3a610f..acaeefe178 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 a67725d9bc..e339b0472a 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 ba7f64768b..52e757c534 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 861810d95b..bf95c87312 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 e2a4940e87..21e43bb361 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 672c372414..39ba3ddf04 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 0c14d9f46b..c41a6ac179 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 5abf1f2d90..2109eb615b 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 bba628f307..4af38e1de3 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 d142fb903e..e919b30cf9 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 5eee450fc5..9ba6a0c1ac 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 1420aaaa56..967fec7b47 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 de80851df0..3fa738e322 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 f1e6e6727c..0877d168d6 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 4a9b9e1d59..362ff7ae43 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 a804df4ed3..0470fc47e9 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 ffaa72d988..3f7575497c 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 64e3c25660..f526b9b226 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 e32c79afa9..b2d394e61d 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 d154b2fdd0..6d2dad2314 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 bdd53abbc0..19209f1e23 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 5b4f830328..5be2896e18 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 98a20fb3fd..e7a59a69df 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 d02a063e80..f342eff8aa 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 ab3dc1a32b..33b2a60d64 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 cbf9523eac..c6251ae817 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 f316fad778..2dfde42bac 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 a44baf26e4..c5bbd02bf5 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 4bf63f348f..096d970871 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 289fa462cc..c4d7c07940 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 4d08ed784d..8d6906117d 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 134049781a..8c54cad3b6 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 b527b51183..3223ac7a0e 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 a2094bee4d..fcd2bb4c67 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 260a2810f5..b7c01f843a 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 946cadcfa9..7f559f1190 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 be6b0fb2ed..2cfbecc086 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 bbbfb2e558..c82c7e9c53 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 2bd894f9ae..54548333b5 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 5f8864ab14..94f1b50776 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 eb9889607d..5662590e26 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 06eee2d970..9b76ee290b 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 3ecd64aa8a..524c14d198 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 2b52338d35..187473b3dd 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 75b29629e9..0b91ba61d6 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 93e758b3ae..388ac1a331 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 d1ac131c03..3978198eef 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 901e326742..e927aac124 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 a28b4c039c..1961446e22 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 ad54f3cd76..98eb616892 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 75b75cdc6f..ed550624f7 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 af0d824151..752fe3074f 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 27ec622fce..1a19c33dea 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 8e4c6d2b64..d9f43995d4 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 922ef69b5e..1b4c9b68b2 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 83c2d56d2b..4b4fb1d70e 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 19fea9ff53..e0a0604619 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 262199e310..838ffe38aa 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 0e5bd58987..abdd088f9b 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 d6a83aca1a..dfa413b63f 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 cff34daf2f..e4f8e614bb 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 923b0fa4c1..85c5f646d9 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 4a12d5d32d..09dff2ef30 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 5254166fa5..420ffc631f 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 bf9a7d8e05..2521359e53 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 54ff9a779a..10c615e524 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 a825db275c..f8f3225f3c 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 f122a2b7c2..c1f1e315df 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 9453a6d515..5b51ece07f 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 ca9364a570..b7db592e78 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 1f5e70a15a..24aa83d948 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 f07320db40..5e8bd11b4b 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 fe6c0b1325..b6520d563c 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 716de610a7..7dbee215a0 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 fe6c0b1325..b6520d563c 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 1fc4fa9424..7731ffb5e7 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 d474eb25f6..64948039ba 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 d08045ec16..799477ac10 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 39c52ab0d3..d3c26c497d 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 1ab9165830..e39c8f2342 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 3f4dee0f68..19f3c3efda 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 9461a828af..f6a3b555c3 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 3cf0bce06d..2bd417951f 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 6ce6c60105..bcb731df71 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 19b04c9e7c..a7e6a6e227 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 88333e9b9f..e705b7b570 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 d911ab2b51..ccb07b35f8 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 9b3817df8c..2e74b6b15f 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 1cd3780ec5..28262eaa82 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 63fb383c9b..79f53f02c2 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 c18642fb1d..468ee5394a 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 598db026fd..4745641ea9 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 6962416936..db57db14d5 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 691b468c34..d23442cced 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 dc0dab1cd1..b13d495542 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 009b1b65f1..7843572e13 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 8cc1ca5e98..ddca719e53 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 b45914284a..e9abd66795 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 a3a5ccdff8..808751d7a5 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 9ffedc2ac4..a6d7f8a495 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 44b2e6b27c..ae469365a9 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 0f0d3d048c..48973688a0 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 2e55782edb..0600ed4338 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 da2851c131..bed51ca660 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 bb04cb82ec..c2f5f324ba 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 90f9e50013..338fda1e53 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 a0bd38b6ac..0278dd8434 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 1ffe25b499..6c826b068d 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 6706d26f64..c3dc004728 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 756f495e4b..c050824a83 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 7ba1fbcf8d..908e12e0ba 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 ce1b4e3bbf..97d210a0f8 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 eeca39c14c..e41fcaab94 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 7d96bd12ff..ffecc03b4a 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 83b17b6560..3fb8c7f259 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 cdd9b634bd..4d083ecd12 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 9ef31e84ba..4efd83d9bc 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 c69a1c06a7..09bbeebdd8 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 863137e9c8..18d158295a 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 02d8374f23..6de50f0991 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 1541bfbd62..b985d0bd9c 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 08a3f5e0d1..c06fdc83e8 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 0000000000..2b1b948119 --- /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 e88e74e81d..344dce9f13 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 def3bf40c2..6005855156 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 c68daf2c71..f8ec029de3 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 =