Skip to content

Commit

Permalink
🔨 FYSETC S6 small bootloader target (#22207)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
GerogeFu and thinkyhead authored Jul 7, 2021
1 parent b2f0913 commit 1093224
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/pins/stm32f4/pins_FYSETC_S6.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
//
// Servos
//
#define SERVO0_PIN PA3
#ifndef SERVO0_PIN
#define SERVO0_PIN PA3
#endif

//
// Limit Switches
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"name": "3D Printer control board",
"upload": {
"maximum_ram_size": 131072,
"maximum_size": 524288,
"maximum_size": 458752,
"protocol": "stlink",
"protocols": [
"jlink",
Expand Down
35 changes: 35 additions & 0 deletions buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json
Original file line number Diff line number Diff line change
@@ -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"
}
19 changes: 16 additions & 3 deletions ini/stm32f4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1093224

Please sign in to comment.