Skip to content

Commit 4a89ef6

Browse files
authored
Fix Creality E3 "Free-runs" (MarlinFirmware#26533)
Followup to MarlinFirmware#25636
1 parent 145ab7b commit 4a89ef6

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

Marlin/src/inc/Conditionals_adv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@
12771277
#if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT)
12781278
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, AQUILA_V101)
12791279
#define LCD_SERIAL_PORT 1
1280-
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO)
1280+
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, CREALITY_CR4NTXXC10, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO)
12811281
#define LCD_SERIAL_PORT 2
12821282
#else
12831283
#define LCD_SERIAL_PORT 3

Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@
100100
#define X_STEP_PIN PC2
101101
#define X_DIR_PIN PB9
102102

103-
#define Y_ENABLE_PIN PC3
103+
#define Y_ENABLE_PIN X_ENABLE_PIN
104104
#define Y_STEP_PIN PB8
105105
#define Y_DIR_PIN PB7
106106

107-
#define Z_ENABLE_PIN PC3
107+
#define Z_ENABLE_PIN X_ENABLE_PIN
108108
#define Z_STEP_PIN PB6
109109
#define Z_DIR_PIN PB5
110110

111-
#define E0_ENABLE_PIN PC3
111+
#define E0_ENABLE_PIN X_ENABLE_PIN
112112
#define E0_STEP_PIN PB4
113113
#define E0_DIR_PIN PB3
114114

@@ -142,21 +142,21 @@
142142
* If undefined software serial is used according to the pins below
143143
*/
144144
#define X_HARDWARE_SERIAL Serial6
145-
#define Y_HARDWARE_SERIAL Serial6
146-
#define Z_HARDWARE_SERIAL Serial6
147-
#define E0_HARDWARE_SERIAL Serial6
145+
#define Y_HARDWARE_SERIAL X_HARDWARE_SERIAL
146+
#define Z_HARDWARE_SERIAL X_HARDWARE_SERIAL
147+
#define E0_HARDWARE_SERIAL X_HARDWARE_SERIAL
148148

149149
#ifndef X_SLAVE_ADDRESS
150-
#define X_SLAVE_ADDRESS 0
150+
#define X_SLAVE_ADDRESS 0
151151
#endif
152152
#ifndef Y_SLAVE_ADDRESS
153-
#define Y_SLAVE_ADDRESS 1
153+
#define Y_SLAVE_ADDRESS 1
154154
#endif
155155
#ifndef Z_SLAVE_ADDRESS
156-
#define Z_SLAVE_ADDRESS 2
156+
#define Z_SLAVE_ADDRESS 2
157157
#endif
158158
#ifndef E0_SLAVE_ADDRESS
159-
#define E0_SLAVE_ADDRESS 3
159+
#define E0_SLAVE_ADDRESS 3
160160
#endif
161161

162162
// Software serial

buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@
5151
ENTRY(Reset_Handler)
5252

5353
/* Highest address of the user mode stack */
54-
_estack = 0x20017FFB; /* end of RAM */
54+
_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */
5555

5656
/* Generate a link error if heap and stack don't fit into RAM */
57-
_Min_Heap_Size = 0x200; /* required amount of heap */
58-
_Min_Stack_Size = 0x400; /* required amount of stack */
57+
_Min_Heap_Size = 0x200; /* required amount of heap */
58+
_Min_Stack_Size = 0x400; /* required amount of stack */
5959

6060
/* Specify the memory areas */
6161
MEMORY
6262
{
63-
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
64-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
63+
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
64+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
6565
}
6666

6767
/* Define output sections */

ini/stm32f4.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,10 @@ board = genericSTM32F401RE
746746
board_build.variant = marlin_STM32F401RE_freeruns
747747
board_build.offset = 0x10000
748748
board_upload.offset_address = 0x08010000
749+
board_build.rename = firmware-{date}-{time}.bin
749750
build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RE -DSTM32F4
750751
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
751-
-DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
752+
-DTRANSFER_CLOCK_DIV=8
752753
build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC
753754
extra_scripts = ${stm32_variant.extra_scripts}
754755
pre:buildroot/share/PlatformIO/scripts/random-bin.py

0 commit comments

Comments
 (0)