🔨 FYSETC S6 small bootloader target (#22207)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
George Fu 2021-07-07 08:40:11 +08:00 committed by Scott Lahteine
parent 2753b4eeaa
commit cae391bb48
6 changed files with 64 additions and 8 deletions

View File

@ -610,11 +610,11 @@
#elif MB(VAKE403D) #elif MB(VAKE403D)
#include "stm32f4/pins_VAKE403D.h" // STM32F4 #include "stm32f4/pins_VAKE403D.h" // STM32F4
#elif MB(FYSETC_S6) #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) #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) #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) #elif MB(FLYF407ZG)
#include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG #include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
#elif MB(MKS_ROBIN2) #elif MB(MKS_ROBIN2)

View File

@ -56,7 +56,9 @@
// //
// Servos // Servos
// //
#define SERVO0_PIN PA3 #ifndef SERVO0_PIN
#define SERVO0_PIN PA3
#endif
// //
// Limit Switches // Limit Switches

View File

@ -68,6 +68,12 @@
// //
#define X_ENABLE_PIN PE9 #define X_ENABLE_PIN PE9
//
// Servos
// Z_MAX_PIN only works in input mode
//
#define SERVO0_PIN PA2
#if HAS_TMC_UART #if HAS_TMC_UART
#define X_SERIAL_TX_PIN PE7 #define X_SERIAL_TX_PIN PE7
#define X_SERIAL_RX_PIN PE7 #define X_SERIAL_RX_PIN PE7

View File

@ -21,7 +21,7 @@
"name": "3D Printer control board", "name": "3D Printer control board",
"upload": { "upload": {
"maximum_ram_size": 131072, "maximum_ram_size": 131072,
"maximum_size": 524288, "maximum_size": 458752,
"protocol": "stlink", "protocol": "stlink",
"protocols": [ "protocols": [
"jlink", "jlink",

View File

@ -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"
}

View File

@ -76,15 +76,28 @@ platform = ${common_stm32.platform}
extends = common_stm32 extends = common_stm32
platform_packages = tool-stm32duino platform_packages = tool-stm32duino
board = marlin_fysetc_s6 board = marlin_fysetc_s6
build_flags = ${common_stm32.build_flags} build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x10000 -DHAL_PCD_MODULE_ENABLED
-DVECT_TAB_OFFSET=0x10000
-DHAL_PCD_MODULE_ENABLED
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
debug_tool = stlink debug_tool = stlink
upload_protocol = dfu upload_protocol = dfu
upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" 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 # STM32F407VET6 with RAMPS-like shield
# 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407 # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407