Marlin Configuration for MKS Robin Nano V3

Hi,
I’m having troubles to fix Marlin config to fit MKS Robin Nano V3 Motherboard.

It throws multiple errors while compiling:

While using mks_robin_nano_v3 enviroment in Marlin Auto Build i get:

*** [%USER%\.platformio\packages\framework-arduinoststm32\variants\MARLIN_F4x7Vx\PeripheralPins.c] %BUILD_FOLDER%\.pio\build\mks_robin_nano_v3.sconsign37.dblite: No such file or directory

I don’t know the difference exactly but when using mks_robin_usb_flash_drive environment I get:

In file included from Marlin\src\HAL\STM32../…/inc/MarlinConfigPre.h:56,
from Marlin\src\HAL\STM32../…/inc/MarlinConfig.h:28,
from Marlin\src\HAL\STM32\MarlinSerial.cpp:21:
Marlin\src\HAL\STM32../…/inc/…/…/Configuration_adv.h:3730: warning: “HOMING_FEEDRATE_MM_M” redefined
3730 | #define HOMING_FEEDRATE_MM_M { (30*60), (30*60), (3*60) }
|
In file included from Marlin\src\HAL\STM32../…/inc/MarlinConfigPre.h:39,
from Marlin\src\HAL\STM32../…/inc/MarlinConfig.h:28,
from Marlin\src\HAL\STM32\MarlinSerial.cpp:21:
Marlin\src\HAL\STM32../…/inc/…/…/Configuration.h:1510: note: this is the location of the previous definition
1510 | #define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
|

Where I don’t know how to define homing feedrate properly.
and:

In file included from Marlin\src\HAL\STM32../…/inc/MarlinConfig.h:49,
from Marlin\src\HAL\STM32\MarlinSerial.cpp:21:
Marlin\src\HAL\STM32../…/inc/SanityCheck.h:2087:6: error: #error “Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!”
2087 | #error “Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!”

Where I understand that I haven’t defined endstops properly but again have no idea how to fix it.

In Configuration.h I have them defined this way:

#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
#define USE_XMAX_PLUG
#define USE_YMAX_PLUG
#define USE_ZMAX_PLUG

and in Configuration_adv.h I have dual endstops defined this way:

//#define X_DUAL_STEPPER_DRIVERS
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
#define INVERT_X2_VS_X_DIR true // Enable if X2 direction signal is opposite to X
//#define X_DUAL_ENDSTOPS
#if ENABLED(X_DUAL_ENDSTOPS)
#define X2_USE_ENDSTOP _XMAX_
#define X2_ENDSTOP_ADJUSTMENT 0
#endif
#endif
#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define INVERT_Y2_VS_Y_DIR false // Enable if Y2 direction signal is opposite to Y
#define Y_DUAL_ENDSTOPS
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP _YMAX_
#define Y2_ENDSTOP_ADJUSTMENT 0
#endif
#endif
//
// For Z set the number of stepper drivers
//
#define NUM_Z_STEPPER_DRIVERS 2 // (1-4) Z options change based on how many
#if NUM_Z_STEPPER_DRIVERS > 1
// Enable if Z motor direction signals are the opposite of Z1
//#define INVERT_Z2_VS_Z_DIR
//#define INVERT_Z3_VS_Z_DIR
//#define INVERT_Z4_VS_Z_DIR
#define Z_MULTI_ENDSTOPS
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP _XMAX_
#define Z2_ENDSTOP_ADJUSTMENT 0
#if NUM_Z_STEPPER_DRIVERS >= 3
#define Z3_USE_ENDSTOP _YMAX_
#define Z3_ENDSTOP_ADJUSTMENT 0
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#define Z4_USE_ENDSTOP _ZMAX_
#define Z4_ENDSTOP_ADJUSTMENT 0
#endif
#endif
#endif

complete config files are on GitHub.

Can somebody help me with it? Or I should ask at a different place?

I haven’t tried working with that board before. The configs in MarlinBuilder releases are known to work. I would start with one of those. Either a V1CNC serial or dual lr (which homes Z up).

That’s what I’ve done. I took config files V1CNC_SkrPro_DualLR_2209-2.0.7.2 and compared them with Firmware for MKS Robin Nano V2 which included UI for their TFT display. They even provide MKS Tool which should use your configuration files and create build for their boards. It doesn’t work so I’ve done it by hand and took pieces of code from both config files (board related from one, machine related from other). And then I tried to build it via Marlin Auto Build in VSCode.

I think found a related topic on Github for SKR V1.3 (https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/issues/175). I guess the problem is in fact that there are X, Y, Z+, Z- endstops and other are named PW_DET, MT_DET1, MT_DET2, PW_OFF. And I guess I have to force Marlin to use one of those for Y2 endstop. Which i have no clue how.

Solution:
in V1CNC_SkrPro_DualLR_2209-2.0.7.2 HOMING_FEEDRATE_MM_M is defined in Configuration_adv.h. It should be in Configuration.h for version I have.

For Endstop Problem I haven’t found a solution yet but I guess it si pins related.

2 Likes

Hello, did you solve it? I have the same problems.

I could only use the source code at “github Mks-Robin-Nano-Marlin2.0-Firmware” in order to stop throwing errors. The errors are because of the TFT_LVGL_UI interface. I found that interface impossible to use anyway. If you change to the TFT_COLOR_UI the errors will probably go away. I am having trouble getting the fans to turn on automatically. I am using the FAN 0 (PC14) port for the part cooling, and the Extruder 1 port (PB0) for the extruder cooling.

I solved the endstop problem in Configuration.h by swapping the X_MIN_ENDSTOP_INVERTING from “true” to “false”. Check with how they are set in the example configuration for your printer, and set it the same way. That should fix it.

1 Like

Well it’s been 7 months since the last reply. Have you guys gotten the Robin Nano working?