diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 88dd170a9e..1f53227553 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -610,11 +610,11 @@ #elif MB(VAKE403D) #include "stm32f4/pins_VAKE403D.h" // STM32F4 #elif MB(FYSETC_S6) - #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FYSETC_S6_V2_0) - #include "stm32f4/pins_FYSETC_S6_V2_0.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_S6_V2_0.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FYSETC_SPIDER) - #include "stm32f4/pins_FYSETC_SPIDER.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_SPIDER.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FLYF407ZG) #include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG #elif MB(MKS_ROBIN2) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 7aeab0196a..504a86d7d0 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -56,7 +56,9 @@ // // Servos // -#define SERVO0_PIN PA3 +#ifndef SERVO0_PIN + #define SERVO0_PIN PA3 +#endif // // Limit Switches diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h index a33f35bd55..e90ac552ae 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h @@ -68,6 +68,12 @@ // #define X_ENABLE_PIN PE9 +// +// Servos +// Z_MAX_PIN only works in input mode +// +#define SERVO0_PIN PA2 + #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE7 #define X_SERIAL_RX_PIN PE7 diff --git a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json index 286e46ffbd..42a203786d 100644 --- a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json +++ b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json @@ -21,7 +21,7 @@ "name": "3D Printer control board", "upload": { "maximum_ram_size": 131072, - "maximum_size": 524288, + "maximum_size": 458752, "protocol": "stlink", "protocols": [ "jlink", diff --git a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json new file mode 100644 index 0000000000..1d808a23d7 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json @@ -0,0 +1,35 @@ +{ + "build": { + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F446xx", + "f_cpu": "180000000L", + "mcu": "stm32f446ret6", + "variant": "MARLIN_FYSETC_S6" + }, + "connectivity": [ + "can" + ], + "debug": { + "jlink_device": "STM32F446RE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F446x.svd" + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "3D Printer control board", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 491520, + "protocol": "stlink", + "protocols": [ + "jlink", + "stlink", + "blackmagic", + "serial" + ] + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html", + "vendor": "FYSETC" +} diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index e7695dcc7a..6067bbc3b8 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -76,15 +76,28 @@ platform = ${common_stm32.platform} extends = common_stm32 platform_packages = tool-stm32duino board = marlin_fysetc_s6 -build_flags = ${common_stm32.build_flags} - -DVECT_TAB_OFFSET=0x10000 - -DHAL_PCD_MODULE_ENABLED +build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x10000 -DHAL_PCD_MODULE_ENABLED extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py debug_tool = stlink upload_protocol = dfu upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" +# +# FYSETC S6 new bootloader +# +[env:FYSETC_S6_8000] +platform = ${common_stm32.platform} +extends = env:FYSETC_S6 +board = marlin_fysetc_s6_8000 +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 +build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py + buildroot/share/PlatformIO/scripts/stm32_bootloader.py +upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" + # # STM32F407VET6 with RAMPS-like shield # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407