Enforce minimum TMC2130 / TMC2208 libs
This commit is contained in:
parent
75b381cd28
commit
a891af2f7a
3 changed files with 75 additions and 65 deletions
|
@ -1409,7 +1409,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TMC2130 Requirements
|
* Make sure HAVE_TMC2130 is warranted
|
||||||
*/
|
*/
|
||||||
#if ENABLED(HAVE_TMC2130)
|
#if ENABLED(HAVE_TMC2130)
|
||||||
#if !( ENABLED( X_IS_TMC2130 ) \
|
#if !( ENABLED( X_IS_TMC2130 ) \
|
||||||
|
@ -1476,10 +1476,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TMC2208 Requirements
|
* Make sure HAVE_TMC2208 is warranted
|
||||||
*/
|
*/
|
||||||
#if ENABLED(HAVE_TMC2208)
|
#if ENABLED(HAVE_TMC2208) && !( \
|
||||||
#if !( ENABLED( X_IS_TMC2208) \
|
ENABLED( X_IS_TMC2208 ) \
|
||||||
|| ENABLED( X2_IS_TMC2208 ) \
|
|| ENABLED( X2_IS_TMC2208 ) \
|
||||||
|| ENABLED( Y_IS_TMC2208 ) \
|
|| ENABLED( Y_IS_TMC2208 ) \
|
||||||
|| ENABLED( Y2_IS_TMC2208 ) \
|
|| ENABLED( Y2_IS_TMC2208 ) \
|
||||||
|
@ -1488,12 +1488,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
||||||
|| ENABLED( E0_IS_TMC2208 ) \
|
|| ENABLED( E0_IS_TMC2208 ) \
|
||||||
|| ENABLED( E1_IS_TMC2208 ) \
|
|| ENABLED( E1_IS_TMC2208 ) \
|
||||||
|| ENABLED( E2_IS_TMC2208 ) \
|
|| ENABLED( E2_IS_TMC2208 ) \
|
||||||
|| ENABLED(E3_IS_TMC2208) \
|
|| ENABLED( E3_IS_TMC2208 ) )
|
||||||
|| ENABLED(E4_IS_TMC2208 ) )
|
|
||||||
#error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set."
|
#error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set."
|
||||||
// Software UART and ENDSTOP_INTERRUPTS both use Pin Change interrupts (PCI)
|
#endif
|
||||||
#elif ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && \
|
|
||||||
!( defined( X_HARDWARE_SERIAL) \
|
/**
|
||||||
|
* TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
|
||||||
|
*/
|
||||||
|
#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
|
||||||
|
defined(X_HARDWARE_SERIAL ) \
|
||||||
|| defined(X2_HARDWARE_SERIAL) \
|
|| defined(X2_HARDWARE_SERIAL) \
|
||||||
|| defined(Y_HARDWARE_SERIAL ) \
|
|| defined(Y_HARDWARE_SERIAL ) \
|
||||||
|| defined(Y2_HARDWARE_SERIAL) \
|
|| defined(Y2_HARDWARE_SERIAL) \
|
||||||
|
@ -1504,8 +1507,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
||||||
|| defined(E2_HARDWARE_SERIAL) \
|
|| defined(E2_HARDWARE_SERIAL) \
|
||||||
|| defined(E3_HARDWARE_SERIAL) \
|
|| defined(E3_HARDWARE_SERIAL) \
|
||||||
|| defined(E4_HARDWARE_SERIAL) )
|
|| defined(E4_HARDWARE_SERIAL) )
|
||||||
#error "Select *_HARDWARE_SERIAL to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
|
#error "select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
|
#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
|
||||||
|
|
|
@ -135,6 +135,10 @@
|
||||||
#include "planner.h"
|
#include "planner.h"
|
||||||
#include "../core/enum.h"
|
#include "../core/enum.h"
|
||||||
|
|
||||||
|
#if TMC2130STEPPER_VERSION < 0x020201
|
||||||
|
#error "Update TMC2130Stepper library to 2.2.1 or newer."
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(TMC_USE_SW_SPI)
|
#if ENABLED(TMC_USE_SW_SPI)
|
||||||
#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK)
|
#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK)
|
||||||
#else
|
#else
|
||||||
|
@ -285,6 +289,10 @@
|
||||||
#include <TMC2208Stepper.h>
|
#include <TMC2208Stepper.h>
|
||||||
#include "planner.h"
|
#include "planner.h"
|
||||||
|
|
||||||
|
#if TMC2208STEPPER_VERSION < 0x000101
|
||||||
|
#error "Update TMC2208Stepper library to 0.1.1 or newer."
|
||||||
|
#endif
|
||||||
|
|
||||||
#define _TMC2208_DEFINE_HARDWARE(ST) TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL)
|
#define _TMC2208_DEFINE_HARDWARE(ST) TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL)
|
||||||
#define _TMC2208_DEFINE_SOFTWARE(ST) SoftwareSerial ST##_HARDWARE_SERIAL = SoftwareSerial(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN); \
|
#define _TMC2208_DEFINE_SOFTWARE(ST) SoftwareSerial ST##_HARDWARE_SERIAL = SoftwareSerial(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN); \
|
||||||
TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1)
|
TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1)
|
||||||
|
|
|
@ -31,7 +31,7 @@ lib_deps =
|
||||||
https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip
|
https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip
|
||||||
LiquidCrystal_I2C@1.1.2
|
LiquidCrystal_I2C@1.1.2
|
||||||
TMC2130Stepper
|
TMC2130Stepper
|
||||||
https://github.com/teemuatlut/TMC2208Stepper/archive/v0.0.4.zip
|
https://github.com/teemuatlut/TMC2208Stepper/archive/v0.1.1.zip
|
||||||
Adafruit NeoPixel@1.1.3
|
Adafruit NeoPixel@1.1.3
|
||||||
https://github.com/lincomatic/LiquidTWI2/archive/30aa480.zip
|
https://github.com/lincomatic/LiquidTWI2/archive/30aa480.zip
|
||||||
https://github.com/ameyer/Arduino-L6470/archive/0c5e5de.zip
|
https://github.com/ameyer/Arduino-L6470/archive/0c5e5de.zip
|
||||||
|
@ -126,7 +126,7 @@ lib_ldf_mode = off
|
||||||
lib_extra_dirs = frameworks
|
lib_extra_dirs = frameworks
|
||||||
lib_deps = CMSIS-LPC1768
|
lib_deps = CMSIS-LPC1768
|
||||||
https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip
|
https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip
|
||||||
TMC2130Stepper@>=2.2.0
|
TMC2130Stepper@>=2.2.1
|
||||||
extra_scripts = Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
|
extra_scripts = Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
|
||||||
src_filter = ${common.default_src_filter}
|
src_filter = ${common.default_src_filter}
|
||||||
monitor_baud = 250000
|
monitor_baud = 250000
|
||||||
|
|
Reference in a new issue