Skip to content

Commit 256565b

Browse files
hillsoftwareTracy Spiva
authored and
Tracy Spiva
committed
✨ Sovol v1.3.1 (Sovol SV06) (MarlinFirmware#25267)
1 parent f648cdf commit 256565b

File tree

7 files changed

+275
-0
lines changed

7 files changed

+275
-0
lines changed

Marlin/src/core/boards.h

+1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@
381381
#define BOARD_ZONESTAR_ZM3E4V2 5064 // Zonestar ZM3E4 V2 (STM32F103VC)
382382
#define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE)
383383
#define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC)
384+
#define BOARD_SOVOL_V131 5067 // Sovol V1.3.1 (GD32F103RET6)
384385

385386
//
386387
// ARM Cortex-M4F

Marlin/src/inc/Warnings.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,13 @@
777777
#warning "Define MK3_FAN_PINS to swap hotend and part cooling fan pins. (Define NO_MK3_FAN_PINS_WARNING to suppress this warning.)"
778778
#endif
779779

780+
/**
781+
* GD32 is not exactly like STM32
782+
*/
783+
#if MB(SOVOL_V131)
784+
#warning "GD32 based controllers may not be fully compatible with Maple Generic STM32F103RE. Please report any issues."
785+
#endif
786+
780787
/**
781788
* BD Sensor should always include BABYSTEPPING
782789
*/

Marlin/src/pins/pins.h

+2
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@
627627
#include "stm32f1/pins_ERYONE_ERY32_MINI.h" // STM32F103VET6 env:ERYONE_ERY32_MINI_maple
628628
#elif MB(PANDA_PI_V29)
629629
#include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29
630+
#elif MB(SOVOL_V131)
631+
#include "stm32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple
630632

631633
//
632634
// ARM Cortex-M4F

Marlin/src/pins/stm32f1/pins_CREALITY_V4.h

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#if NO_EEPROM_SELECTED
5454
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
5555
//#define SDCARD_EEPROM_EMULATION
56+
#undef NO_EEPROM_SELECTED
5657
#endif
5758

5859
#if ENABLED(IIC_BL24CXX_EEPROM)
+236
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2023 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+
* Sovol 1.3.1 (GD32F103RET6) board pin assignments
26+
*/
27+
28+
#include "env_validate.h"
29+
30+
#if HOTENDS > 1 || E_STEPPERS > 1
31+
#error "SOVOL V131 only supports 1 hotend / E-stepper."
32+
#endif
33+
34+
#ifndef BOARD_INFO_NAME
35+
#define BOARD_INFO_NAME "Sovol V131"
36+
#endif
37+
#ifndef DEFAULT_MACHINE_NAME
38+
#define DEFAULT_MACHINE_NAME "Sovol SV06"
39+
#endif
40+
41+
//#define BOARD_NO_NATIVE_USB
42+
43+
//
44+
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
45+
//
46+
#ifndef DISABLE_DEBUG
47+
#define DISABLE_DEBUG
48+
#endif
49+
50+
//
51+
// EEPROM
52+
//
53+
#if NO_EEPROM_SELECTED
54+
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
55+
//#define SDCARD_EEPROM_EMULATION
56+
#undef NO_EEPROM_SELECTED
57+
#endif
58+
59+
#if ENABLED(IIC_BL24CXX_EEPROM)
60+
#define IIC_EEPROM_SDA PA11
61+
#define IIC_EEPROM_SCL PA12
62+
#define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
63+
#elif ENABLED(SDCARD_EEPROM_EMULATION)
64+
#define MARLIN_EEPROM_SIZE 0x800 // 2K
65+
#endif
66+
67+
//
68+
// Servos
69+
//
70+
#ifndef SERVO0_PIN
71+
#ifndef HAS_PIN_27_BOARD
72+
#define SERVO0_PIN PB0 // BLTouch OUT
73+
#else
74+
#define SERVO0_PIN PC6
75+
#endif
76+
#endif
77+
78+
//
79+
// Limit Switches
80+
//
81+
#ifndef X_STOP_PIN
82+
#define X_STOP_PIN PA5
83+
#endif
84+
#ifndef Y_STOP_PIN
85+
#define Y_STOP_PIN PA6
86+
#endif
87+
#ifndef Z_STOP_PIN
88+
#define Z_STOP_PIN PA7
89+
#endif
90+
91+
#ifndef Z_MIN_PROBE_PIN
92+
#define Z_MIN_PROBE_PIN PB1 // BLTouch IN
93+
#endif
94+
95+
//
96+
// Filament Runout Sensor
97+
//
98+
#ifndef FIL_RUNOUT_PIN
99+
#define FIL_RUNOUT_PIN PA4 // "Pulled-high"
100+
#endif
101+
102+
//
103+
// Steppers
104+
//
105+
#ifndef X_STEP_PIN
106+
#define X_STEP_PIN PC2
107+
#endif
108+
#ifndef X_DIR_PIN
109+
#define X_DIR_PIN PB9
110+
#endif
111+
#define X_ENABLE_PIN PC3 // Shared
112+
113+
#ifndef Y_STEP_PIN
114+
#define Y_STEP_PIN PB8
115+
#endif
116+
#ifndef Y_DIR_PIN
117+
#define Y_DIR_PIN PB7
118+
#endif
119+
#define Y_ENABLE_PIN X_ENABLE_PIN
120+
121+
#ifndef Z_STEP_PIN
122+
#define Z_STEP_PIN PB6
123+
#endif
124+
#ifndef Z_DIR_PIN
125+
#define Z_DIR_PIN PB5
126+
#endif
127+
#define Z_ENABLE_PIN X_ENABLE_PIN
128+
129+
#ifndef E0_STEP_PIN
130+
#define E0_STEP_PIN PB4
131+
#endif
132+
#ifndef E0_DIR_PIN
133+
#define E0_DIR_PIN PB3
134+
#endif
135+
#define E0_ENABLE_PIN X_ENABLE_PIN
136+
137+
#if HAS_TMC_UART
138+
139+
/**
140+
* TMC2208/TMC2209 stepper drivers
141+
*
142+
* Hardware serial communication ports.
143+
* If undefined software serial is used according to the pins below
144+
*/
145+
146+
#define X_SERIAL_TX_PIN PC1
147+
#define X_SERIAL_RX_PIN PC1
148+
149+
#define Y_SERIAL_TX_PIN PC0
150+
#define Y_SERIAL_RX_PIN PC0
151+
152+
#define Z_SERIAL_TX_PIN PA15
153+
#define Z_SERIAL_RX_PIN PA15
154+
155+
#define E0_SERIAL_TX_PIN PC14
156+
#define E0_SERIAL_RX_PIN PC14
157+
158+
// Reduce baud rate to improve software serial reliability
159+
#define TMC_BAUD_RATE 19200
160+
161+
#endif // HAS_TMC_UART
162+
163+
//
164+
// Temperature Sensors
165+
//
166+
#define TEMP_0_PIN PC5 // TH1
167+
#define TEMP_BED_PIN PC4 // TB1
168+
169+
//
170+
// Heaters / Fans
171+
//
172+
#ifndef HEATER_0_PIN
173+
#define HEATER_0_PIN PA1 // HEATER1
174+
#endif
175+
#ifndef HEATER_BED_PIN
176+
#define HEATER_BED_PIN PA2 // HOT BED
177+
#endif
178+
#ifndef FAN_PIN
179+
#define FAN_PIN PA0 // FAN
180+
#endif
181+
#define FAN_SOFT_PWM_REQUIRED
182+
183+
//
184+
// SD Card
185+
//
186+
#define SD_DETECT_PIN PC7
187+
#define SDCARD_CONNECTION ONBOARD
188+
#define ONBOARD_SPI_DEVICE 1
189+
#define ONBOARD_SD_CS_PIN PA4 // SDSS
190+
#define SDIO_SUPPORT
191+
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
192+
193+
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
194+
/**
195+
* RET6 12864 LCD
196+
* ------
197+
* PC6 | 1 2 | PB2
198+
* PB10 | 3 4 | PB11
199+
* PB14 5 6 | PB13
200+
* PB12 | 7 8 | PB15
201+
* GND | 9 10 | 5V
202+
* ------
203+
*/
204+
#define EXP3_01_PIN PC6
205+
#define EXP3_02_PIN PB2
206+
#define EXP3_03_PIN PB10
207+
#define EXP3_04_PIN PB11
208+
#define EXP3_05_PIN PB14
209+
#define EXP3_06_PIN PB13
210+
#define EXP3_07_PIN PB12
211+
#define EXP3_08_PIN PB15
212+
#endif
213+
214+
#if ENABLED(CR10_STOCKDISPLAY)
215+
216+
#if ENABLED(RET6_12864_LCD)
217+
218+
#define LCD_PINS_RS EXP3_07_PIN
219+
#define LCD_PINS_ENABLE EXP3_08_PIN
220+
#define LCD_PINS_D4 EXP3_06_PIN
221+
222+
#define BTN_ENC EXP3_02_PIN
223+
#define BTN_EN1 EXP3_03_PIN
224+
#define BTN_EN2 EXP3_05_PIN
225+
226+
#ifndef HAS_PIN_27_BOARD
227+
#define BEEPER_PIN EXP3_01_PIN
228+
#endif
229+
230+
#else
231+
232+
#error "Only the RET6_12864_LCD variant of CR10_STOCKDISPLAY is supported."
233+
234+
#endif
235+
236+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MEMORY
2+
{
3+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - 40
4+
rom (rx) : ORIGIN = 0x08007000, LENGTH = 512K - 28K
5+
}
6+
7+
/* Provide memory region aliases for common.inc */
8+
REGION_ALIAS("REGION_TEXT", rom);
9+
REGION_ALIAS("REGION_DATA", ram);
10+
REGION_ALIAS("REGION_BSS", ram);
11+
REGION_ALIAS("REGION_RODATA", rom);
12+
13+
/* Let common.inc handle the real work. */
14+
INCLUDE common.inc

ini/stm32f1-maple.ini

+14
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,17 @@ board_build.variant = MARLIN_F103Vx
392392
board_build.ldscript = eryone_ery32_mini.ld
393393
board_build.address = 0x08004000
394394
build_unflags = ${STM32F1_maple.build_unflags}
395+
396+
#
397+
# Sovol (GD32F103RET6)
398+
#
399+
[env:GD32F103RET6_sovol_maple]
400+
extends = env:STM32F103RE_maple
401+
build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4
402+
board_build.address = 0x08007000
403+
board_build.ldscript = sovol.ld
404+
extra_scripts = ${STM32F1_maple.extra_scripts}
405+
pre:buildroot/share/PlatformIO/scripts/random-bin.py
406+
buildroot/share/PlatformIO/scripts/custom_board.py
407+
debug_tool = jlink
408+
upload_protocol = jlink

0 commit comments

Comments
 (0)