Tweak tests, consolidate pins target validation (#21254)
This commit is contained in:
35
Marlin/src/pins/ramps/env_validate.h
Normal file
35
Marlin/src/pins/ramps/env_validate.h
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if ENABLED(ALLOW_SAM3X8E)
|
||||
#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#elif ENABLED(REQUIRE_MEGA2560) && NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif DISABLED(REQUIRE_MEGA2560) && NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'"
|
||||
#endif
|
||||
|
||||
#undef ALLOW_SAM3X8E
|
||||
#undef REQUIRE_MEGA2560
|
@ -25,9 +25,10 @@
|
||||
* AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 2 || E_STEPPERS > 2
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,10 @@
|
||||
* AZTEEG_X3_PRO (Arduino Mega) pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 5 || E_STEPPERS > 5
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 5 || E_STEPPERS > 5
|
||||
#error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,8 @@
|
||||
* bq ZUM Mega 3D board definition
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "ZUM Mega 3D"
|
||||
|
||||
|
@ -25,9 +25,8 @@
|
||||
* Wanhao Duplicator i3 Plus pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "Duplicator i3 Plus"
|
||||
|
||||
|
@ -25,9 +25,10 @@
|
||||
* Formbot Raptor pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 3 || E_STEPPERS > 3
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "Formbot supports up to 3 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,10 @@
|
||||
* Formbot pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 2 || E_STEPPERS > 2
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,10 @@
|
||||
* Formbot pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 2 || E_STEPPERS > 2
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,7 @@
|
||||
* Velleman K8800 (Vertex)
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "K8800"
|
||||
#define DEFAULT_MACHINE_NAME "Vertex Delta"
|
||||
|
@ -25,9 +25,10 @@
|
||||
* Longer3D LK1/LK4/LK5 Pro board pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 1 || E_STEPPERS > 1
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 1 || E_STEPPERS > 1
|
||||
#error "Longer3D LGT KIT V1.0 board only supports one hotend / E-stepper. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
@ -42,9 +43,6 @@
|
||||
#warning "Serial 3 is originally reserved to Y limit switches. Hardware changes are required to use it."
|
||||
#endif
|
||||
|
||||
// Custom flags and defines for the build
|
||||
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
|
||||
|
||||
#define BOARD_INFO_NAME "LGT KIT V1.0"
|
||||
|
||||
//
|
||||
|
@ -45,18 +45,7 @@
|
||||
* 7 | 11
|
||||
*/
|
||||
|
||||
#ifdef TARGET_LPC1768
|
||||
#error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
|
||||
#elif defined(__STM32F1__)
|
||||
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
|
||||
#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' (or other appropriate target) in 'Tools > Board.'"
|
||||
#endif
|
||||
|
||||
// Custom flags and defines for the build
|
||||
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
|
||||
#include "env_validate.h"
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "RAMPS 1.4"
|
||||
|
@ -25,9 +25,7 @@
|
||||
* Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "RAMPS <1.2"
|
||||
|
||||
|
@ -37,9 +37,7 @@
|
||||
* RAMPS_PLUS_SF (Spindle, Controller Fan)
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "RAMPS 1.4 Plus"
|
||||
|
||||
|
@ -34,12 +34,7 @@
|
||||
* Other pins_MYBOARD.h files may override these defaults
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__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__
|
||||
#include "env_validate.h"
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "RAMPS S 1.2"
|
||||
|
@ -25,9 +25,10 @@
|
||||
* RUMBA pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 3 || E_STEPPERS > 3
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 3 || E_STEPPERS > 3
|
||||
#error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,10 @@
|
||||
* Tenlog pin assignments
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 2 || E_STEPPERS > 2
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "Tenlog supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,10 @@
|
||||
* Arduino Mega for Tronxy X5S-2E, etc.
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 2 || E_STEPPERS > 2
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||
#error "TRONXY-V3-1.0 supports only 2 hotends/E-steppers. Comment out this line to continue."
|
||||
#endif
|
||||
|
||||
|
@ -20,9 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 5 || E_STEPPERS > 5
|
||||
#error "TTOSCAR supports up to 5 hotends / E-steppers. Comment out this line to continue."
|
||||
|
@ -33,9 +33,8 @@
|
||||
* case light
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "Ultimaker 2.x"
|
||||
#define DEFAULT_MACHINE_NAME "Ultimaker"
|
||||
|
@ -33,9 +33,7 @@
|
||||
* case light
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "Ultimaker"
|
||||
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
|
||||
|
@ -60,9 +60,7 @@
|
||||
//#define BOARD_REV_1_0
|
||||
//#define BOARD_REV_1_5
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#endif
|
||||
#include "env_validate.h"
|
||||
|
||||
#ifdef BOARD_REV_1_1_TO_1_3
|
||||
#define BOARD_INFO_NAME "Ultimaker 1.1-1.3"
|
||||
|
@ -25,9 +25,10 @@
|
||||
* Z-Bolt X Series board – based on Arduino Mega2560
|
||||
*/
|
||||
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif HOTENDS > 4 || E_STEPPERS > 4
|
||||
#define REQUIRE_MEGA2560
|
||||
#include "env_validate.h"
|
||||
|
||||
#if HOTENDS > 4 || E_STEPPERS > 4
|
||||
#error "Z-Bolt X Series board supports up to 4 hotends / E-steppers."
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user