From fa2740d27c3478ce456a9f406f1882401e9e3734 Mon Sep 17 00:00:00 2001 From: EvilGremlin <22657714+EvilGremlin@users.noreply.github.com> Date: Fri, 17 Nov 2023 04:57:00 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Creality=20STM32F401RC=20w/out?= =?UTF-8?q?=20bootloader=20(#26373)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_adv.h | 2 +- Marlin/src/pins/pins.h | 2 +- ini/stm32f4.ini | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index baba95267ecf..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, 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 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index a631c4df99a3..d8fe329761e1 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -793,7 +793,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 99b2685787e7..5582a6349a78 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -681,19 +681,29 @@ 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 = STM32F401RC_creality_base +board_build.offset = 0x0000 +board_upload.offset_address = 0x08000000 +debug_tool = stlink +upload_protocol = stlink + [env:STM32F401RC_creality_jlink] extends = env:STM32F401RC_creality debug_tool = jlink