Browse Source

🔨 FYSETC S6 small bootloader target (#22207)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
George Fu 4 years ago
parent
commit
1093224ba2
No account linked to committer's email address

+ 3
- 3
Marlin/src/pins/pins.h View File

@@ -610,11 +610,11 @@
610 610
 #elif MB(VAKE403D)
611 611
   #include "stm32f4/pins_VAKE403D.h"            // STM32F4
612 612
 #elif MB(FYSETC_S6)
613
-  #include "stm32f4/pins_FYSETC_S6.h"           // STM32F4                                env:FYSETC_S6
613
+  #include "stm32f4/pins_FYSETC_S6.h"           // STM32F4                                env:FYSETC_S6 env:FYSETC_S6_8000
614 614
 #elif MB(FYSETC_S6_V2_0)
615
-  #include "stm32f4/pins_FYSETC_S6_V2_0.h"      // STM32F4                                env:FYSETC_S6
615
+  #include "stm32f4/pins_FYSETC_S6_V2_0.h"      // STM32F4                                env:FYSETC_S6 env:FYSETC_S6_8000
616 616
 #elif MB(FYSETC_SPIDER)
617
-  #include "stm32f4/pins_FYSETC_SPIDER.h"       // STM32F4                                env:FYSETC_S6
617
+  #include "stm32f4/pins_FYSETC_SPIDER.h"       // STM32F4                                env:FYSETC_S6 env:FYSETC_S6_8000
618 618
 #elif MB(FLYF407ZG)
619 619
   #include "stm32f4/pins_FLYF407ZG.h"           // STM32F4                                env:FLYF407ZG
620 620
 #elif MB(MKS_ROBIN2)

+ 3
- 1
Marlin/src/pins/stm32f4/pins_FYSETC_S6.h View File

@@ -56,7 +56,9 @@
56 56
 //
57 57
 // Servos
58 58
 //
59
-#define SERVO0_PIN                          PA3
59
+#ifndef SERVO0_PIN
60
+  #define SERVO0_PIN                        PA3
61
+#endif
60 62
 
61 63
 //
62 64
 // Limit Switches

+ 6
- 0
Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h View File

@@ -68,6 +68,12 @@
68 68
 //
69 69
 #define X_ENABLE_PIN                        PE9
70 70
 
71
+//
72
+// Servos
73
+// Z_MAX_PIN only works in input mode
74
+//
75
+#define SERVO0_PIN                          PA2
76
+
71 77
 #if HAS_TMC_UART
72 78
   #define X_SERIAL_TX_PIN                   PE7
73 79
   #define X_SERIAL_RX_PIN                   PE7

+ 1
- 1
buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json View File

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

+ 35
- 0
buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json View File

@@ -0,0 +1,35 @@
1
+{
2
+  "build": {
3
+    "cpu": "cortex-m4",
4
+    "extra_flags": "-DSTM32F446xx",
5
+    "f_cpu": "180000000L",
6
+    "mcu": "stm32f446ret6",
7
+    "variant": "MARLIN_FYSETC_S6"
8
+  },
9
+  "connectivity": [
10
+    "can"
11
+  ],
12
+  "debug": {
13
+    "jlink_device": "STM32F446RE",
14
+    "openocd_target": "stm32f4x",
15
+    "svd_path": "STM32F446x.svd"
16
+  },
17
+  "frameworks": [
18
+    "arduino",
19
+    "stm32cube"
20
+  ],
21
+  "name": "3D Printer control board",
22
+  "upload": {
23
+    "maximum_ram_size": 131072,
24
+    "maximum_size": 491520,
25
+    "protocol": "stlink",
26
+    "protocols": [
27
+      "jlink",
28
+      "stlink",
29
+      "blackmagic",
30
+      "serial"
31
+    ]
32
+  },
33
+  "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html",
34
+  "vendor": "FYSETC"
35
+}

+ 16
- 3
ini/stm32f4.ini View File

@@ -76,9 +76,7 @@ platform          = ${common_stm32.platform}
76 76
 extends           = common_stm32
77 77
 platform_packages = tool-stm32duino
78 78
 board             = marlin_fysetc_s6
79
-build_flags       = ${common_stm32.build_flags}
80
-  -DVECT_TAB_OFFSET=0x10000
81
-  -DHAL_PCD_MODULE_ENABLED
79
+build_flags       = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x10000 -DHAL_PCD_MODULE_ENABLED
82 80
 extra_scripts     = ${common.extra_scripts}
83 81
   pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
84 82
 debug_tool        = stlink
@@ -86,6 +84,21 @@ upload_protocol   = dfu
86 84
 upload_command    = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
87 85
 
88 86
 #
87
+# FYSETC S6 new bootloader
88
+#
89
+[env:FYSETC_S6_8000]
90
+platform                    = ${common_stm32.platform}
91
+extends                     = env:FYSETC_S6
92
+board                       = marlin_fysetc_s6_8000
93
+board_build.offset          = 0x8000
94
+board_upload.offset_address = 0x08008000
95
+build_flags                 = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED
96
+extra_scripts               = ${common.extra_scripts}
97
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
98
+  buildroot/share/PlatformIO/scripts/stm32_bootloader.py
99
+upload_command              = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE"
100
+
101
+#
89 102
 # STM32F407VET6 with RAMPS-like shield
90 103
 # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407
91 104
 # Shield - https://github.com/jmz52/Hardware

Loading…
Cancel
Save