Skip to content

Commit 09fbe37

Browse files
authored
🔨 Elegoo Neptune boards ("elegoo.bin") (#24895)
1 parent 279a393 commit 09fbe37

File tree

11 files changed

+575
-3
lines changed

11 files changed

+575
-3
lines changed

Marlin/src/core/boards.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,10 @@
473473
#define BOARD_BLACKBEEZMINI_V1 5251 // BlackBeezMini V1 (STM32F401CCU6)
474474
#define BOARD_XTLW_CLIMBER_8TH 5252 // XTLW Climber-8th (STM32F407VGT6)
475475
#define BOARD_FLY_RRF_E3_V1 5253 // Fly RRF E3 V1.0 (STM32F407VG)
476+
#define BOARD_ZNP_ROBIN_NANO 5254 // Elegoo Neptune 2 v1.2 board
477+
#define BOARD_ZNP_ROBIN_NANO_V1_3 5255 // Elegoo Neptune 2 v1.3 board
478+
#define BOARD_MKS_NEPTUNE_X 5256 // Elegoo Neptune X
479+
#define BOARD_MKS_NEPTUNE_3 5257 // Elegoo Neptune 3
476480

477481
//
478482
// Other ARM Cortex-M4

Marlin/src/pins/mega/pins_WEEDO_62A.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
*
2121
*/
22+
#pragma once
2223

2324
/**
2425
* Based on WEEDO 62A pin configuration
2526
* Copyright (c) 2019 WEEDO3D Perron
2627
* ATmega2560
2728
*/
28-
#pragma once
2929

3030
#include "env_validate.h"
3131

Marlin/src/pins/pins.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,14 @@
845845
#include "stm32f4/pins_XTLW_CLIMBER_8TH.h" // STM32F4 env:XTLW_CLIMBER_8TH
846846
#elif MB(FLY_RRF_E3_V1)
847847
#include "stm32f4/pins_FLY_RRF_E3_V1.h" // STM32F4 env:FLY_RRF_E3_V1
848+
#elif MB(ZNP_ROBIN_NANO)
849+
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:znp_robin_nano35
850+
#elif MB(ZNP_ROBIN_NANO_V1_3)
851+
#include "stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h" // STM32F4 env:znp_robin_nano_v1_3
852+
#elif MB(MKS_NEPTUNE_X)
853+
#include "stm32f4/pins_MKS_NEPTUNE_X.h" // STM32F4 env:mks_neptune_x
854+
#elif MB(MKS_NEPTUNE_3)
855+
#include "stm32f4/pins_MKS_NEPTUNE_3.h" // STM32F4 env:mks_neptune_3
848856

849857
//
850858
// Other ARM Cortex-M4

Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
*
2121
*/
22+
#pragma once
2223

2324
/**
2425
* Pxmalion Core i3 - https://github.com/Pxmalion

Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
*
2121
*/
22+
#pragma once
2223

2324
/**
2425
* Creality CREALITY_CR4NTXXC10 (STM32F401RET6) board pin assignments
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2024 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+
//
25+
// MKS Neptune 3
26+
//
27+
28+
// Avoid conflict with TIMER_TONE
29+
#define ALLOW_STM32F4
30+
#include "env_validate.h"
31+
32+
#define BOARD_INFO_NAME "MKS Neptune 3"
33+
34+
//
35+
// Release PB4 (Z_DIR_PIN) from JTAG NRST role
36+
//
37+
//#define DISABLE_DEBUG
38+
39+
// Use one of these or SDCard-based Emulation will be used
40+
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
41+
//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
42+
#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM)
43+
#define I2C_EEPROM
44+
#define MARLIN_EEPROM_SIZE 0x1000U // 4KB
45+
#define I2C_SCL_PIN PB6
46+
#define I2C_SDA_PIN PB7
47+
#endif
48+
49+
//
50+
// Servos
51+
//
52+
#define SERVO0_PIN PA8 // BLTOUCH
53+
54+
//
55+
// Limit Switches
56+
//
57+
//#define ZNP_TEST
58+
#ifdef ZNP_TEST
59+
#define X_DIAG_PIN PC14 // Z+
60+
#else
61+
#define X_DIAG_PIN PA13 // X-
62+
#endif
63+
64+
#define Y_DIAG_PIN PB8
65+
#define Z_DIAG_PIN PC13
66+
67+
#define X_STOP_PIN X_DIAG_PIN
68+
#define Y_STOP_PIN Y_DIAG_PIN
69+
#define Z_STOP_PIN Z_DIAG_PIN
70+
71+
//
72+
// Z Probe (when not Z_MIN_PIN)
73+
//
74+
#ifndef Z_MIN_PROBE_PIN
75+
#define Z_MIN_PROBE_PIN PC14 // PB9
76+
#endif
77+
78+
//
79+
// Steppers
80+
//
81+
#define X_ENABLE_PIN PD2
82+
#define X_STEP_PIN PC12
83+
#define X_DIR_PIN PB3
84+
85+
#define Y_ENABLE_PIN PC10
86+
#define Y_STEP_PIN PC11
87+
#define Y_DIR_PIN PA15
88+
89+
#define Z_ENABLE_PIN PC8
90+
#define Z_STEP_PIN PC7
91+
#define Z_DIR_PIN PC9
92+
93+
#define E0_ENABLE_PIN PC6
94+
#define E0_STEP_PIN PB10
95+
#define E0_DIR_PIN PB1
96+
97+
#define E1_ENABLE_PIN PC5
98+
#define E1_STEP_PIN PC4
99+
#define E1_DIR_PIN PA4
100+
101+
//
102+
// Temperature Sensors
103+
//
104+
#define TEMP_0_PIN PC1 // TH1
105+
#define TEMP_1_PIN PC2 // TH2
106+
#define TEMP_BED_PIN PC0 // TB1
107+
108+
//
109+
// Heaters / Fans
110+
//
111+
#define HEATER_0_PIN PA6 // HEATER1
112+
#define HEATER_BED_PIN PA5 // HOT BED
113+
114+
#define FAN_PIN PB0 // FAN
115+
//#define FAN1_PIN PA7 // FAN1
116+
117+
#if NEED_TOUCH_PINS
118+
#define TOUCH_CS_PIN PA7 // SPI2_NSS
119+
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
120+
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
121+
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
122+
#endif
123+
124+
//
125+
// SD Support
126+
//
127+
#ifndef SDCARD_CONNECTION
128+
#define SDCARD_CONNECTION ONBOARD
129+
#endif
130+
131+
#if SD_CONNECTION_IS(ONBOARD)
132+
#define ENABLE_SPI3
133+
#define SD_SS_PIN -1
134+
#define SDSS PB12
135+
#define SD_SCK_PIN PB13
136+
#define SD_MISO_PIN PB14
137+
#define SD_MOSI_PIN PB15
138+
#define SD_SPI_SPEED SPI_HALF_SPEED
139+
#if ENABLED(NO_SD_HOST_DRIVE)
140+
// Detect pin doesn't work when NO_SD_HOST_DRIVE disabled
141+
#define SD_DETECT_PIN PC3
142+
#endif
143+
#endif
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2024 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+
#define ALLOW_STM32DUINO
25+
#include "env_validate.h"
26+
27+
#if HOTENDS > 2 || E_STEPPERS > 2
28+
#error "MKS Neptune X supports up to 2 hotends / E steppers."
29+
#endif
30+
31+
#define BOARD_INFO_NAME "MKS Neptune X"
32+
33+
//
34+
// Software SPI pins for TMC2130 stepper drivers
35+
// This board only supports SW SPI for stepper drivers
36+
//
37+
#if HAS_TMC_SPI && DISABLED(TMC_USE_SW_SPI)
38+
#warning "TMC_USE_SW_SPI is required for MKS Neptune X with TMC drivers."
39+
#endif
40+
#if ENABLED(TMC_USE_SW_SPI)
41+
#ifndef TMC_SW_MOSI
42+
#define TMC_SW_MOSI PD14
43+
#endif
44+
#ifndef TMC_SW_MISO
45+
#define TMC_SW_MISO PD1
46+
#endif
47+
#ifndef TMC_SW_SCK
48+
#define TMC_SW_SCK PD0
49+
#endif
50+
#endif
51+
52+
#include "pins_MKS_NEPTUNE_X_common.h"

0 commit comments

Comments
 (0)