From 982f67cae64b0cc0cf1ba2e9e2da5528203f6130 Mon Sep 17 00:00:00 2001 From: EvilGremlin <22657714+EvilGremlin@users.noreply.github.com> Date: Fri, 27 Oct 2023 02:12:18 +0300 Subject: [PATCH 1/3] uart 2 and nobootloader --- Marlin/src/inc/Conditionals_adv.h | 2 +- Marlin/src/pins/pins.h | 2 +- ini/stm32f4.ini | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index baba95267ecf..1997556197da 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1240,7 +1240,7 @@ #if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT) #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_E3_TURBO, BTT_OCTOPUS_V1_1) #define LCD_SERIAL_PORT 1 - #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) + #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, BOARD_CREALITY_F401RE, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) #define LCD_SERIAL_PORT 2 #else #define LCD_SERIAL_PORT 3 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 122c9b937c47..5961933327d7 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -791,7 +791,7 @@ #elif MB(ARTILLERY_RUBY) #include "stm32f4/pins_ARTILLERY_RUBY.h" // STM32F4 env:Artillery_Ruby #elif MB(CREALITY_V24S1_301F4) - #include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4 env:STM32F401RC_creality env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink + #include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4 env:STM32F401RC_creality env:STM32F401RC_creality_nobootloader env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink #elif MB(OPULO_LUMEN_REV4) #include "stm32f4/pins_OPULO_LUMEN_REV4.h" // STM32F4 env:Opulo_Lumen_REV4 #elif MB(FYSETC_SPIDER_KING407) diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index b8e989642c8f..5f181d1fc95a 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -694,6 +694,14 @@ build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RC -DS build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC monitor_speed = 115200 +[env:STM32F401RC_creality_nobootloader] +extends = env:STM32F401RC_creality +board_build.offset = 0x0000 +board_upload.offset_address = 0x08000000 +board_build.rename = firmware.bin +debug_tool = stlink +upload_protocol = stlink + [env:STM32F401RC_creality_jlink] extends = env:STM32F401RC_creality debug_tool = jlink From 529b569f7aafad862197c943511c56048d258cd5 Mon Sep 17 00:00:00 2001 From: EvilGremlin <22657714+EvilGremlin@users.noreply.github.com> Date: Fri, 27 Oct 2023 02:41:48 +0300 Subject: [PATCH 2/3] whoopsie --- Marlin/src/inc/Conditionals_adv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 1997556197da..b56fa7d3f08f 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1240,7 +1240,7 @@ #if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT) #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_E3_TURBO, BTT_OCTOPUS_V1_1) #define LCD_SERIAL_PORT 1 - #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, BOARD_CREALITY_F401RE, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) + #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) #define LCD_SERIAL_PORT 2 #else #define LCD_SERIAL_PORT 3 From 92a6bd769ead4df2fc3990c70118ab996161a3f6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 16 Nov 2023 15:17:00 -0600 Subject: [PATCH 3/3] use common base --- ini/stm32f4.ini | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 5f181d1fc95a..48e068875508 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -681,24 +681,26 @@ extra_scripts = ${common_stm32.extra_scripts} # # Ender-3 S1 STM32F401RC_creality # -[env:STM32F401RC_creality] +[STM32F401RC_creality_base] extends = stm32_variant board = genericSTM32F401RC board_build.variant = MARLIN_CREALITY_STM32F401RC -board_build.offset = 0x10000 -board_upload.offset_address = 0x08010000 -board_build.rename = firmware-{date}-{time}.bin build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RC -DSTM32F4 -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC monitor_speed = 115200 +[env:STM32F401RC_creality] +extends = STM32F401RC_creality_base +board_build.offset = 0x10000 +board_upload.offset_address = 0x08010000 +board_build.rename = firmware-{date}-{time}.bin + [env:STM32F401RC_creality_nobootloader] -extends = env:STM32F401RC_creality +extends = STM32F401RC_creality_base board_build.offset = 0x0000 board_upload.offset_address = 0x08000000 -board_build.rename = firmware.bin debug_tool = stlink upload_protocol = stlink