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

SanityCheck.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * Test STM32-specific configuration values for errors at compile-time.
  25. */
  26. //#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
  27. // #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
  28. //#endif
  29. #if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT)
  30. #undef SDCARD_EEPROM_EMULATION // Avoid additional error noise
  31. #if USE_FALLBACK_EEPROM
  32. #warning "EEPROM type not specified. Fallback is SDCARD_EEPROM_EMULATION."
  33. #endif
  34. #error "SDCARD_EEPROM_EMULATION requires SDSUPPORT. Enable SDSUPPORT or choose another EEPROM emulation."
  35. #endif
  36. #if !defined(STM32F4xx) && ENABLED(FLASH_EEPROM_LEVELING)
  37. #error "FLASH_EEPROM_LEVELING is currently only supported on STM32F4 hardware."
  38. #endif
  39. #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
  40. #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on STM32."
  41. #elif ENABLED(SERIAL_STATS_DROPPED_RX)
  42. #error "SERIAL_STATS_DROPPED_RX is not supported on STM32."
  43. #endif
  44. #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) && NOT_TARGET(STM32H7xx, STM32F4xx, STM32F1xx)
  45. #error "TFT_COLOR_UI, TFT_LVGL_UI and TFT_CLASSIC_UI are currently only supported on STM32H7, STM32F4 and STM32F1 hardware."
  46. #endif
  47. /**
  48. * Check for common serial pin conflicts
  49. */
  50. #define _CHECK_SERIAL_PIN(N) (( \
  51. BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN_PIN == N || \
  52. SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N \
  53. ))
  54. #define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN)
  55. #if SERIAL_IN_USE(1)
  56. #if CHECK_SERIAL_PIN(TX,1)
  57. #error "Serial Port 1 TX IO pins conflict with another pin on the board."
  58. #endif
  59. #if CHECK_SERIAL_PIN(RX,1)
  60. #error "Serial Port 1 RX IO pins conflict with another pin on the board."
  61. #endif
  62. #endif
  63. #if SERIAL_IN_USE(2)
  64. #if CHECK_SERIAL_PIN(TX,2)
  65. #error "Serial Port 2 TX IO pins conflict with another pin on the board."
  66. #endif
  67. #if CHECK_SERIAL_PIN(RX,2)
  68. #error "Serial Port 2 RX IO pins conflict with another pin on the board."
  69. #endif
  70. #endif
  71. #if SERIAL_IN_USE(3)
  72. #if CHECK_SERIAL_PIN(TX,3)
  73. #error "Serial Port 3 TX IO pins conflict with another pin on the board."
  74. #endif
  75. #if CHECK_SERIAL_PIN(RX,3)
  76. #error "Serial Port 3 RX IO pins conflict with another pin on the board."
  77. #endif
  78. #endif
  79. #if SERIAL_IN_USE(4)
  80. #if CHECK_SERIAL_PIN(TX,4)
  81. #error "Serial Port 4 TX IO pins conflict with another pin on the board."
  82. #endif
  83. #if CHECK_SERIAL_PIN(RX,4)
  84. #error "Serial Port 4 RX IO pins conflict with another pin on the board."
  85. #endif
  86. #endif
  87. #if SERIAL_IN_USE(5)
  88. #if CHECK_SERIAL_PIN(TX,5)
  89. #error "Serial Port 5 TX IO pins conflict with another pin on the board."
  90. #endif
  91. #if CHECK_SERIAL_PIN(RX,5)
  92. #error "Serial Port 5 RX IO pins conflict with another pin on the board."
  93. #endif
  94. #endif
  95. #if SERIAL_IN_USE(6)
  96. #if CHECK_SERIAL_PIN(TX,6)
  97. #error "Serial Port 6 TX IO pins conflict with another pin on the board."
  98. #endif
  99. #if CHECK_SERIAL_PIN(RX,6)
  100. #error "Serial Port 6 RX IO pins conflict with another pin on the board."
  101. #endif
  102. #endif
  103. #undef CHECK_SERIAL_PIN
  104. #undef _CHECK_SERIAL_PIN