Mks gen l v2.1 + 5 mks tmc 2209 en dual

Hola, estoy intentando hacer funcionar la combinación mencionada en el titulo y no lo consigo, no hay suficiente infirmación al tratarse de una placa madre tan reciente.
El caso es que con una compilación creada para la ender3 de marlin basada en la ultima versión on si que funcionan los tmc 2209 con la “board_mks_gen_l_v2” pero no consigo que funcione X2/yY2. He seguido las instrucciones que se mencionan en varios foros pero no funciona
Cambio lo siguiente:

#define TEMP_SENSOR_0 999

Descomento

#define TEMP_SENSOR_0 999

#define X2_DRIVE_TYPE TMC2209
#define Y2_DRIVE_TYPE TMC2209

#define X_DUAL_STEPPER_DRIVERS
#define Y_DUAL_STEPPER_DRIVERS

Y reasigno los pins de E0, E1 y creo las lineas de E2 como dicen en este foro:

"La variable EXTRUDERS no se puede dejar a 0 porque se usa en otros apartados como indice en variables indexadas (
En Configuration.h dejar EXTRUDERS a 1 y configurar el resto de parámetros excepto los ‘DUAL_STEPPER’ y compilar. Así nos aseguramos de que tenemos un Marlin ya configurado que compila correctamente.

Después de eso, en el fichero pins_RAMPS.h cambiar las líneas:

#define SERVO3_PIN 4

#define X_MAX_PIN 2
#define Y_MAX_PIN 15
#define Z_MAX_PIN 19

poniendo todos los pines a -1:

#define SERVO3_PIN -1
#define X_MAX_PIN -1
#define Y_MAX_PIN -1
#define Z_MAX_PIN -1

De esta manera, anulamos el SERVO 3 y los endstop de MAX de los tres ejes para liberar los pines 4,2,15 y 19 que vanos a utilizar para definir un E0 ‘falso’. Bajamos hasta el apartado donde definimos los extrusores y cambiamos los pines de E1 a E2, los de E0 a E1 y creamos el E0 con estos pines que hemos liberado:

#define E0_STEP_PIN 4

#define E0_DIR_PIN 2

#define E0_ENABLE_PIN 15

#define E0_CS_PIN 19

#define E1_STEP_PIN 26

#define E1_DIR_PIN 28

#define E1_ENABLE_PIN 24

#define E1_CS_PIN 42

#define E2_STEP_PIN 36

#define E2_DIR_PIN 34

#define E2_ENABLE_PIN 30
#define E2_CS_PIN 44

Ahora ya podemos definir en Configuration.h los DUAL_STEPPER’ para los dos ejes con lo que al compilar, nos asignará el Extrusor 0 a unos pines ‘falsos’, el doble stepper de X (X2) al E0 físico de la RAMPS (que será el E1 lógico para Marlin) y el doble stepper de Y (Y2) al E1 físico (E2 para Marlin) en la RAMPS. Esta asignación se hace en el pins.h"

Y poniendo en E0 todos al pin 70 tampoco funciona.
El error que lanza la compilacion es:

In file included from sketch\src\inc/MarlinConfig.h:32:0,

             from sketch\src\MarlinCore.h:24,

             from sketch\src\MarlinCore.cpp:31:

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\pins\pins.h:1274:8: error: #error “No E stepper plug left for Y2!”

   #error "No E stepper plug left for Y2!"

    ^~~~~

In file included from c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\marlinconfig.h:32:0,

             from sketch\src\HAL\AVR\eeprom.cpp:24:

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\pins\pins.h:1274:8: error: #error “No E stepper plug left for Y2!”

   #error "No E stepper plug left for Y2!"

    ^~~~~

In file included from c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\marlinconfig.h:40:0,

             from sketch\src\HAL\AVR\Servo.cpp:56:

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1863:6: error: #error “USE_XMAX_PLUG is required when X2_USE_ENDSTOP is XMAX.”

 #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."

  ^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1888:6: error: #error “USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is YMAX.”

 #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."

  ^~~~~

In file included from sketch\src\inc/MarlinConfig.h:40:0,

             from sketch\src\MarlinCore.h:24,

             from sketch\src\MarlinCore.cpp:31:

sketch\src\inc/SanityCheck.h:1863:6: error: #error “USE_XMAX_PLUG is required when X2_USE_ENDSTOP is XMAX.”

 #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."

  ^~~~~

In file included from c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\marlinconfig.h:40:0,

             from sketch\src\HAL\AVR\HAL_SPI.cpp:34:

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1863:6: error: #error “USE_XMAX_PLUG is required when X2_USE_ENDSTOP is XMAX.”

 #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."

  ^~~~~

sketch\src\inc/SanityCheck.h:1888:6: error: #error “USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is YMAX.”

 #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."

  ^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1888:6: error: #error “USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is YMAX.”

 #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."

  ^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:2171:4: error: #error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

#error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

^~~~~

sketch\src\inc/SanityCheck.h:2171:4: error: #error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

#error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:2171:4: error: #error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

#error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

^~~~~

In file included from c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\marlinconfig.h:40:0,

             from sketch\src\HAL\AVR\eeprom.cpp:24:

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1863:6: error: #error “USE_XMAX_PLUG is required when X2_USE_ENDSTOP is XMAX.”

 #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."

  ^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1888:6: error: #error “USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is YMAX.”

 #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."

  ^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:2171:4: error: #error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

#error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

^~~~~

In file included from c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\marlinconfig.h:32:0,

             from sketch\src\HAL\AVR\watchdog.cpp:25:

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\pins\pins.h:1274:8: error: #error “No E stepper plug left for Y2!”

   #error "No E stepper plug left for Y2!"

    ^~~~~

In file included from c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\marlinconfig.h:40:0,

             from sketch\src\HAL\AVR\watchdog.cpp:25:

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1863:6: error: #error “USE_XMAX_PLUG is required when X2_USE_ENDSTOP is XMAX.”

 #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_."

  ^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:1888:6: error: #error “USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is YMAX.”

 #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_."

  ^~~~~

c:\users\mache\appdata\local\temp\arduino_build_642215\sketch\src\inc\SanityCheck.h:2171:4: error: #error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

#error “TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN.”

^~~~~

exit status 1

Error compilando para la tarjeta Arduino Mega or Mega 2560.

Por favor alguien que pueda ayudarme. Gracias

On newer versions of marlin, you can set EXTRUDERS=0. If you do that, you don’t have to do the socket pin swap.

Hola jeffb3 gracias por tu rapida respuesta.
acabo de probar cambiando:

#define EXTRUDERS 0

antes ponia

#define EXTRUDERS 1

#define X2_DRIVER_TYPE TMC2209
#define Y2_DRIVER_TYPE TMC2209

antes ponia

//#define x2_DRIVER_TYPE A4988
//#define y2_DRIVER_TYPE A4988

//#define E0_DRIVER_TYPE TMC2209

antes ponia

#define E0_DRIVER_TYPE TMC2209

y

#define X_DUAL_STEPPER_DRIVERS
#define Y_DUAL_STEPPER_DRIVERS

antes ponia

//#define X_DUAL_STEPPER_DRIVERS
//#define Y_DUAL_STEPPER_DRIVERS

y sigue dando error TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN. entre otros errores.
Sin cambiar estos parametros si que compila
Esta es la compilacion que quiero modificar " MKS-GEN-L-V2-Marlin-Firmware-para-Ender-3 que esta en github

Yeah. That makes sense. Are the E0 and E1 serial definitions in the pins file?

En “pins_RAMPS.h”

#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#ifndef X_CS_PIN
#define X_CS_PIN 53
#endif

#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#ifndef Y_CS_PIN
#define Y_CS_PIN 49
#endif

#ifndef Z_STEP_PIN
#define Z_STEP_PIN 46
#endif
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#ifndef Z_CS_PIN
#define Z_CS_PIN 40
#endif

#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
#ifndef E0_CS_PIN
#define E0_CS_PIN 42
#endif

#define E1_STEP_PIN 36
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
#ifndef E1_CS_PIN
#define E1_CS_PIN 44
#endif

//
// Software serial
//

#ifndef X_SERIAL_TX_PIN
#define X_SERIAL_TX_PIN 40
#endif
#ifndef X_SERIAL_RX_PIN
#define X_SERIAL_RX_PIN 63
#endif
#ifndef X2_SERIAL_TX_PIN
#define X2_SERIAL_TX_PIN -1
#endif
#ifndef X2_SERIAL_RX_PIN
#define X2_SERIAL_RX_PIN -1
#endif

#ifndef Y_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN 59
#endif
#ifndef Y_SERIAL_RX_PIN
#define Y_SERIAL_RX_PIN 64
#endif
#ifndef Y2_SERIAL_TX_PIN
#define Y2_SERIAL_TX_PIN -1
#endif
#ifndef Y2_SERIAL_RX_PIN
#define Y2_SERIAL_RX_PIN -1
#endif

#ifndef Z_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN 42
#endif
#ifndef Z_SERIAL_RX_PIN
#define Z_SERIAL_RX_PIN 65
#endif
#ifndef Z2_SERIAL_TX_PIN
#define Z2_SERIAL_TX_PIN -1
#endif
#ifndef Z2_SERIAL_RX_PIN
#define Z2_SERIAL_RX_PIN -1
#endif

#ifndef E0_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN 44
#endif
#ifndef E0_SERIAL_RX_PIN
#define E0_SERIAL_RX_PIN 66
#endif
#ifndef E1_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN -1
#endif
#ifndef E1_SERIAL_RX_PIN
#define E1_SERIAL_RX_PIN -1
#endif
#ifndef E2_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN -1
#endif
#ifndef E2_SERIAL_RX_PIN
#define E2_SERIAL_RX_PIN -1

En “pins_mks_gen_l_v2.h”

#ifndef X_CS_PIN
#define X_CS_PIN 63
#endif

#ifndef Y_CS_PIN
#define Y_CS_PIN 64
#endif

#ifndef Z_CS_PIN
#define Z_CS_PIN 65
#endif

#ifndef E0_CS_PIN
#define E0_CS_PIN 66
#endif

#ifndef E1_CS_PIN
#define E1_CS_PIN 21
#endif

// TMC2130 Diag Pins (currently just for reference)
#define X_DIAG_PIN 3
#define Y_DIAG_PIN 14
#define Z_DIAG_PIN 18
#define E0_DIAG_PIN 2
#define E1_DIAG_PIN 15

#ifndef SERVO1_PIN
#define SERVO1_PIN 12
#endif
#ifndef SERVO2_PIN
#define SERVO2_PIN 39
#endif
#ifndef SERVO3_PIN
#define SERVO3_PIN 32
#endif

#ifndef E1_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN 20
#endif
#ifndef E1_SERIAL_RX_PIN
#define E1_SERIAL_RX_PIN 21
#endif