瀏覽代碼

✨ MKS SKIPR board (#24791)

EvilGremlin 2 年之前
父節點
當前提交
26d01c5f2c
沒有連結到貢獻者的電子郵件帳戶。

+ 1
- 0
Marlin/src/core/boards.h 查看文件

@@ -425,6 +425,7 @@
425 425
 #define BOARD_CREALITY_V24S1_301F4    4240  // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
426 426
 #define BOARD_OPULO_LUMEN_REV4        4241  // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
427 427
 #define BOARD_FYSETC_SPIDER_KING407   4242  // FYSETC Spider King407 (STM32F407ZG)
428
+#define BOARD_MKS_SKIPR_V1            4243  // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
428 429
 
429 430
 //
430 431
 // ARM Cortex M7

+ 2
- 0
Marlin/src/pins/pins.h 查看文件

@@ -709,6 +709,8 @@
709 709
   #include "stm32f4/pins_OPULO_LUMEN_REV4.h"    // STM32F4                                env:Opulo_Lumen_REV4
710 710
 #elif MB(FYSETC_SPIDER_KING407)
711 711
   #include "stm32f4/pins_FYSETC_SPIDER_KING407.h" // STM32F4                              env:FYSETC_SPIDER_KING407
712
+#elif MB(MKS_SKIPR_V1)
713
+  #include "stm32f4/pins_MKS_SKIPR_V1_0.h"      // STM32F4                                env:mks_skipr_v1 env:mks_skipr_v1_nobootloader
712 714
 
713 715
 //
714 716
 // ARM Cortex M7

+ 381
- 0
Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h 查看文件

@@ -0,0 +1,381 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+#include "env_validate.h"
25
+
26
+#if HOTENDS > 4 || E_STEPPERS > 4
27
+  #error "MKS SKIPR supports up to 4 hotends / E steppers."
28
+#endif
29
+
30
+#define BOARD_INFO_NAME "MKS SKIPR V1.0"
31
+
32
+// Valid SERIAL_PORT values: -1 (USB-C), 1 (direct to RK3328), 3 (USART3 header)
33
+
34
+#define USES_DIAG_JUMPERS
35
+
36
+// Onboard I2C EEPROM
37
+#define I2C_EEPROM
38
+#define MARLIN_EEPROM_SIZE                0x1000  // 4KB (AT24C32)
39
+#define I2C_SCL_PIN                         PB8
40
+#define I2C_SDA_PIN                         PB9
41
+
42
+//
43
+// Servos
44
+//
45
+#define SERVO0_PIN                          PA8
46
+
47
+//
48
+// Trinamic Stallguard pins                       // Connector labels
49
+#define X_DIAG_PIN                          PA14  // X-
50
+#define Y_DIAG_PIN                          PA15  // Y-
51
+#define Z_DIAG_PIN                          PB15  // Z-
52
+#define E0_DIAG_PIN                         PA13  // MT-DET
53
+#define E1_DIAG_PIN                         PC5   // NEOPIXEL
54
+#define E2_DIAG_PIN                         PB14  // Z+
55
+
56
+//
57
+// Check for additional used endstop pins
58
+//
59
+#if HAS_EXTRA_ENDSTOPS
60
+  #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
61
+  #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
62
+    #define NEEDS_X_MINMAX 1
63
+  #endif
64
+  #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
65
+    #define NEEDS_Y_MINMAX 1
66
+  #endif
67
+  #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
68
+    #define NEEDS_Z_MINMAX 1
69
+  #endif
70
+  #undef _ENDSTOP_IS_ANY
71
+#endif
72
+
73
+//
74
+// Limit Switches
75
+//
76
+#ifdef X_STALL_SENSITIVITY
77
+  #define X_STOP_PIN                  X_DIAG_PIN  // X-
78
+#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX)
79
+  #ifndef X_MIN_PIN
80
+    #define X_MIN_PIN                 X_DIAG_PIN  // X-
81
+  #endif
82
+  #ifndef X_MAX_PIN
83
+    #define X_MAX_PIN                E0_DIAG_PIN  // MT-DET
84
+  #endif
85
+#else
86
+  #define X_STOP_PIN                  X_DIAG_PIN  // X-
87
+#endif
88
+
89
+#ifdef Y_STALL_SENSITIVITY
90
+  #define Y_STOP_PIN                  Y_DIAG_PIN  // Y-
91
+#elif NEEDS_Y_MINMAX
92
+  #ifndef Y_MIN_PIN
93
+    #define Y_MIN_PIN                 Y_DIAG_PIN  // Y-
94
+  #endif
95
+  #ifndef Y_MAX_PIN
96
+    #define Y_MAX_PIN                E1_DIAG_PIN  // NEOPIXEL
97
+  #endif
98
+#else
99
+  #define Y_STOP_PIN                  Y_DIAG_PIN  // Y-
100
+#endif
101
+
102
+#ifdef Z_STALL_SENSITIVITY
103
+  #define Z_STOP_PIN                  Z_DIAG_PIN  // Z-
104
+#elif NEEDS_Z_MINMAX
105
+  #ifndef Z_MIN_PIN
106
+    #define Z_MIN_PIN                 Z_DIAG_PIN  // Z-
107
+  #endif
108
+  #ifndef Z_MAX_PIN
109
+    #define Z_MAX_PIN                E2_DIAG_PIN  // Z+
110
+  #endif
111
+#else
112
+  #define Z_STOP_PIN                  Z_DIAG_PIN  // Z-
113
+#endif
114
+
115
+#if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) || ENABLED(USE_PROBE_FOR_Z_HOMING)
116
+  #ifndef Z_MIN_PROBE
117
+    #define Z_MIN_PROBE_PIN          E2_DIAG_PIN  // defaults to 'Z+' connector
118
+  #endif
119
+#endif
120
+
121
+#undef NEEDS_X_MINMAX
122
+#undef NEEDS_Y_MINMAX
123
+#undef NEEDS_Z_MINMAX
124
+
125
+//
126
+// Steppers
127
+//
128
+#define X_STEP_PIN                          PC14
129
+#define X_DIR_PIN                           PC13
130
+#define X_ENABLE_PIN                        PC15
131
+#ifndef X_CS_PIN
132
+  #define X_CS_PIN                          PE6
133
+#endif
134
+
135
+#define Y_STEP_PIN                          PE5
136
+#define Y_DIR_PIN                           PE4
137
+#define Y_ENABLE_PIN                        PD14
138
+#ifndef Y_CS_PIN
139
+  #define Y_CS_PIN                          PE3
140
+#endif
141
+
142
+#define Z_STEP_PIN                          PE1   // "Z1"
143
+#define Z_DIR_PIN                           PE0
144
+#define Z_ENABLE_PIN                        PE2
145
+#ifndef Z_CS_PIN
146
+  #define Z_CS_PIN                          PB7
147
+#endif
148
+
149
+#define E0_STEP_PIN                         PB5
150
+#define E0_DIR_PIN                          PB4
151
+#define E0_ENABLE_PIN                       PB6
152
+#ifndef E0_CS_PIN
153
+  #define E0_CS_PIN                         PB3
154
+#endif
155
+
156
+#define E1_STEP_PIN                         PD6   // "Z2"
157
+#define E1_DIR_PIN                          PD5
158
+#define E1_ENABLE_PIN                       PD7
159
+#ifndef E1_CS_PIN
160
+  #define E1_CS_PIN                         PD4
161
+#endif
162
+
163
+#define E2_STEP_PIN                         PD2   // "Z3"
164
+#define E2_DIR_PIN                          PD1
165
+#define E2_ENABLE_PIN                       PD3
166
+#ifndef E2_CS_PIN
167
+  #define E2_CS_PIN                         PD0
168
+#endif
169
+
170
+#define E3_STEP_PIN                         PC7   // "Z4"
171
+#define E3_DIR_PIN                          PC6
172
+#define E3_ENABLE_PIN                       PC8
173
+#ifndef E3_CS_PIN
174
+  #define E3_CS_PIN                         PD15
175
+#endif
176
+
177
+//
178
+// Temperature Sensors
179
+//
180
+#define TEMP_BED_PIN                        PC0   // TB
181
+#define TEMP_0_PIN                          PC1   // TH0
182
+#define TEMP_1_PIN                          PC2   // TH1
183
+#define TEMP_2_PIN                          PC3   // TH2
184
+
185
+//
186
+// Heaters / Fans
187
+//
188
+#define HEATER_BED_PIN                      PD12  // Hotbed
189
+#define HEATER_0_PIN                        PB1   // Heater0
190
+#define HEATER_1_PIN                        PB0   // Heater1
191
+#define HEATER_2_PIN                        PA3   // Heater2
192
+
193
+#define FAN_PIN                             PA2   // Fan0
194
+#define FAN1_PIN                            PA1   // Fan1
195
+#define FAN2_PIN                            PA0   // Fan2
196
+
197
+//
198
+// Software SPI pins for TMC2130 stepper drivers
199
+// This board doesn't support hardware SPI there
200
+//
201
+#if HAS_TMC_SPI
202
+  #define TMC_USE_SW_SPI
203
+  #define TMC_SW_MOSI                       PE14
204
+  #define TMC_SW_MISO                       PE13
205
+  #define TMC_SW_SCK                        PE12
206
+#endif
207
+
208
+//
209
+// TMC2208/TMC2209 stepper drivers
210
+// This board is routed for one-wire software serial
211
+//
212
+#if HAS_TMC_UART
213
+  #define X_SERIAL_TX_PIN                   PE6
214
+  #define X_SERIAL_RX_PIN        X_SERIAL_TX_PIN
215
+
216
+  #define Y_SERIAL_TX_PIN                   PE3
217
+  #define Y_SERIAL_RX_PIN        Y_SERIAL_TX_PIN
218
+
219
+  #define Z_SERIAL_TX_PIN                   PB7
220
+  #define Z_SERIAL_RX_PIN        Z_SERIAL_TX_PIN
221
+
222
+  #define E0_SERIAL_TX_PIN                  PB3
223
+  #define E0_SERIAL_RX_PIN      E0_SERIAL_TX_PIN
224
+
225
+  #define E1_SERIAL_TX_PIN                  PD4
226
+  #define E1_SERIAL_RX_PIN      E1_SERIAL_TX_PIN
227
+
228
+  #define E2_SERIAL_TX_PIN                  PD0
229
+  #define E2_SERIAL_RX_PIN      E2_SERIAL_TX_PIN
230
+
231
+  #define E3_SERIAL_TX_PIN                  PD15
232
+  #define E3_SERIAL_RX_PIN      E3_SERIAL_TX_PIN
233
+
234
+  // Reduce baud rate to improve software serial reliability
235
+  #define TMC_BAUD_RATE                    19200
236
+#endif
237
+
238
+/**               ------                                      ------
239
+ * (BEEPER) PB2  | 1  2 | PE10 (BTN_ENC)         (MISO) PA6  | 1  2 | PA5  (SCK)
240
+ * (LCD_EN) PE11 | 3  4 | PD10 (LCD_RS)       (BTN_EN1) PE9  | 3  4 | PA4  (SD_SS)
241
+ * (LCD_D4) PD9  | 5  6   PD8  (LCD_D5)       (BTN_EN2) PE8  | 5  6   PA7  (MOSI)
242
+ * (LCD_D6) PE15 | 7  8 | PE7  (LCD_D7)     (SD_DETECT) PD13 | 7  8 | RESET
243
+ *           GND | 9 10 | 5V                             GND | 9 10 | --
244
+ *                ------                                      ------
245
+ *                 EXP1                                        EXP2
246
+ */
247
+#define EXP1_01_PIN                         PB2
248
+#define EXP1_02_PIN                         PE10
249
+#define EXP1_03_PIN                         PE11
250
+#define EXP1_04_PIN                         PD10
251
+#define EXP1_05_PIN                         PD9
252
+#define EXP1_06_PIN                         PD8
253
+#define EXP1_07_PIN                         PE15
254
+#define EXP1_08_PIN                         PE7
255
+
256
+#define EXP2_01_PIN                         PA6
257
+#define EXP2_02_PIN                         PA5
258
+#define EXP2_03_PIN                         PE9
259
+#define EXP2_04_PIN                         PA4
260
+#define EXP2_05_PIN                         PE8
261
+#define EXP2_06_PIN                         PA7
262
+#define EXP2_07_PIN                         PD13
263
+#define EXP2_08_PIN                         -1    // connected to MCU reset
264
+
265
+//
266
+// SD Support
267
+// Onboard SD card use hardware SPI3 (defined in variant), LCD SD card use hardware SPI1
268
+//
269
+#if ENABLED(SDSUPPORT)
270
+  #ifndef SDCARD_CONNECTION
271
+    #define SDCARD_CONNECTION                LCD
272
+  #endif
273
+  #if SD_CONNECTION_IS(ONBOARD)
274
+    //#define SOFTWARE_SPI
275
+    //#define SD_SPI_SPEED        SPI_HALF_SPEED
276
+    #undef SD_DETECT_STATE
277
+    #define SD_DETECT_STATE                  LOW
278
+    #define SD_DETECT_PIN                   PC4
279
+  #elif SD_CONNECTION_IS(LCD)
280
+    //#define SOFTWARE_SPI
281
+    //#define SD_SPI_SPEED     SPI_QUARTER_SPEED
282
+    #define SD_SS_PIN                EXP2_04_PIN
283
+    #define SD_SCK_PIN               EXP2_02_PIN
284
+    #define SD_MISO_PIN              EXP2_01_PIN
285
+    #define SD_MOSI_PIN              EXP2_06_PIN
286
+    #define SD_DETECT_PIN            EXP2_07_PIN
287
+  #elif SD_CONNECTION_IS(CUSTOM_CABLE)
288
+    #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
289
+  #endif
290
+  #define SDSS                         SD_SS_PIN
291
+#endif
292
+
293
+//
294
+// LCDs and Controllers
295
+//
296
+#if IS_TFTGLCD_PANEL
297
+
298
+  #if ENABLED(TFTGLCD_PANEL_SPI)
299
+    #define TFTGLCD_CS               EXP2_03_PIN
300
+  #endif
301
+
302
+#elif HAS_WIRED_LCD
303
+
304
+  #define BEEPER_PIN                 EXP1_01_PIN
305
+  #define BTN_ENC                    EXP1_02_PIN
306
+
307
+  #if ENABLED(CR10_STOCKDISPLAY)
308
+
309
+    #define LCD_PINS_RS              EXP1_07_PIN
310
+
311
+    #define BTN_EN1                  EXP1_03_PIN
312
+    #define BTN_EN2                  EXP1_05_PIN
313
+
314
+    #define LCD_PINS_ENABLE          EXP1_08_PIN
315
+    #define LCD_PINS_D4              EXP1_06_PIN
316
+
317
+  #else
318
+
319
+    #define LCD_PINS_RS              EXP1_04_PIN
320
+
321
+    #define BTN_EN1                  EXP2_03_PIN
322
+    #define BTN_EN2                  EXP2_05_PIN
323
+
324
+    #define LCD_PINS_ENABLE          EXP1_03_PIN
325
+    #define LCD_PINS_D4              EXP1_05_PIN
326
+
327
+    #if ENABLED(FYSETC_MINI_12864)
328
+      #define DOGLCD_CS              EXP1_03_PIN
329
+      #define DOGLCD_A0              EXP1_04_PIN
330
+      //#define LCD_BACKLIGHT_PIN           -1
331
+      #define LCD_RESET_PIN          EXP1_05_PIN  // Must be high or open for LCD to operate normally.
332
+      #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
333
+        #ifndef RGB_LED_R_PIN
334
+          #define RGB_LED_R_PIN      EXP1_06_PIN
335
+        #endif
336
+        #ifndef RGB_LED_G_PIN
337
+          #define RGB_LED_G_PIN      EXP1_07_PIN
338
+        #endif
339
+        #ifndef RGB_LED_B_PIN
340
+          #define RGB_LED_B_PIN      EXP1_08_PIN
341
+        #endif
342
+      #elif ENABLED(FYSETC_MINI_12864_2_1)
343
+        #define NEOPIXEL_PIN         EXP1_06_PIN
344
+      #endif
345
+    #endif // !FYSETC_MINI_12864
346
+
347
+    #if IS_ULTIPANEL
348
+      #define LCD_PINS_D5            EXP1_06_PIN
349
+      #define LCD_PINS_D6            EXP1_07_PIN
350
+      #define LCD_PINS_D7            EXP1_08_PIN
351
+      #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
352
+        #define BTN_ENC_EN           LCD_PINS_D7  // Detect the presence of the encoder
353
+      #endif
354
+    #endif
355
+
356
+  #endif
357
+#endif  // HAS_WIRED_LCD
358
+
359
+// Alter timing for graphical display
360
+#if IS_U8GLIB_ST7920
361
+  #define BOARD_ST7920_DELAY_1               120
362
+  #define BOARD_ST7920_DELAY_2                80
363
+  #define BOARD_ST7920_DELAY_3               580
364
+#endif
365
+
366
+//
367
+// NeoPixel LED
368
+//
369
+#ifndef NEOPIXEL_PIN
370
+  #define NEOPIXEL_PIN                      PC5
371
+#endif
372
+
373
+//
374
+// MAX31865
375
+//
376
+#if HAS_MAX31865
377
+  #define TEMP_0_CS_PIN                     PD11
378
+  #define TEMP_0_SCK_PIN                    PE12
379
+  #define TEMP_0_MISO_PIN                   PE13
380
+  #define TEMP_0_MOSI_PIN                   PE14
381
+#endif

+ 55
- 0
buildroot/share/PlatformIO/boards/marlin_MKS_SKIPR_V1.json 查看文件

@@ -0,0 +1,55 @@
1
+{
2
+  "build": {
3
+    "core": "stm32",
4
+    "cpu": "cortex-m4",
5
+    "extra_flags": "-DSTM32F4 -DSTM32F407xx",
6
+    "f_cpu": "168000000L",
7
+    "offset": "0xC000",
8
+    "hwids": [
9
+      [
10
+        "0x1EAF",
11
+        "0x0003"
12
+      ],
13
+      [
14
+        "0x0483",
15
+        "0x3748"
16
+      ]
17
+    ],
18
+    "mcu": "stm32f407vet6",
19
+    "product_line": "STM32F407xx",
20
+    "variant": "MARLIN_MKS_SKIPR_V1"
21
+  },
22
+  "debug": {
23
+    "default_tools": [
24
+      "stlink"
25
+    ],
26
+    "jlink_device": "STM32F407VE",
27
+    "openocd_extra_args": [
28
+      "-c",
29
+      "reset_config none"
30
+    ],
31
+    "openocd_target": "stm32f4x",
32
+    "svd_path": "STM32F40x.svd"
33
+  },
34
+  "frameworks": [
35
+    "arduino"
36
+  ],
37
+  "name": "STM32F407VE (128k RAM, 64k CCM RAM, 512k Flash",
38
+  "upload": {
39
+    "disable_flushing": false,
40
+    "maximum_ram_size": 131072,
41
+    "maximum_size": 524288,
42
+    "protocol": "stlink",
43
+    "protocols": [
44
+      "stlink",
45
+      "dfu",
46
+      "jlink"
47
+    ],
48
+    "offset_address": "0x0800C000",
49
+    "require_upload_port": false,
50
+    "use_1200bps_touch": false,
51
+    "wait_for_upload_port": false
52
+  },
53
+  "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html",
54
+  "vendor": "ST"
55
+}

+ 92
- 92
buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h 查看文件

@@ -27,98 +27,98 @@ extern "C" {
27 27
  *        Pins
28 28
  *----------------------------------------------------------------------------*/
29 29
 
30
-//                  | DIGITAL | ANALOG IN  | ANALOG OUT | UART/USART            | TWI                  | SPI                               | SPECIAL   |
31
-//                  |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
32
-#define PA0  PIN_A0  // | 0       | A0 (ADC1)  |            | UART4_TX              |                      |                                   |           |
33
-#define PA1  PIN_A1  // | 1       | A1 (ADC1)  |            | UART4_RX              |                      |                                   |           |
34
-#define PA2  PIN_A2  // | 2       | A2 (ADC1)  |            | USART2_TX             |                      |                                   |           |
35
-#define PA3  PIN_A3  // | 3       | A3 (ADC1)  |            | USART2_RX             |                      |                                   |           |
36
-#define PA4  PIN_A4  // | 4       | A4 (ADC1)  | DAC_OUT1   |                       |                      | SPI1_SS, (SPI3_SS)                |           |
37
-#define PA5  PIN_A5  // | 5       | A5 (ADC1)  | DAC_OUT2   |                       |                      | SPI1_SCK                          |           |
38
-#define PA6  PIN_A6  // | 6       | A6 (ADC1)  |            |                       |                      | SPI1_MISO                         |           |
39
-#define PA7  PIN_A7  // | 7       | A7 (ADC1)  |            |                       |                      | SPI1_MOSI                         |           |
40
-#define PA8  8   // | 8       |            |            |                       | TWI3_SCL             |                                   |           |
41
-#define PA9  9   // | 9       |            |            | USART1_TX             |                      |                                   |           |
42
-#define PA10 10  // | 10      |            |            | USART1_RX             |                      |                                   |           |
43
-#define PA11 11  // | 11      |            |            |                       |                      |                                   |           |
44
-#define PA12 12  // | 12      |            |            |                       |                      |                                   |           |
45
-#define PA13 13  // | 13      |            |            |                       |                      |                                   | SWD_SWDIO |
46
-#define PA14 14  // | 14      |            |            |                       |                      |                                   | SWD_SWCLK |
47
-#define PA15 15  // | 15      |            |            |                       |                      | SPI3_SS, (SPI1_SS)                |           |
48
-//                  |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
49
-#define PB0  PIN_A8  // | 16      | A8 (ADC1)  |            |                       |                      |                                   |           |
50
-#define PB1  PIN_A9  // | 17      | A9 (ADC1)  |            |                       |                      |                                   |           |
51
-#define PB2  18  // | 18      |            |            |                       |                      |                                   | BOOT1     |
52
-#define PB3  19  // | 19      |            |            |                       |                      | SPI3_SCK,  (SPI1_SCK)             |           |
53
-#define PB4  20  // | 20      |            |            |                       |                      | SPI3_MISO, (SPI1_MISO)            |           |
54
-#define PB5  21  // | 21      |            |            |                       |                      | SPI3_MOSI, (SPI1_MOSI)            |           |
55
-#define PB6  22  // | 22      |            |            | USART1_TX             | TWI1_SCL             |                                   |           |
56
-#define PB7  23  // | 23      |            |            | USART1_RX             | TWI1_SDA             |                                   |           |
57
-#define PB8  24  // | 24      |            |            |                       | TWI1_SCL             |                                   |           |
58
-#define PB9  25  // | 25      |            |            |                       | TWI1_SDA             | SPI2_SS                           |           |
59
-#define PB10 26  // | 26      |            |            | USART3_TX, (UART4_TX) | TWI2_SCL             | SPI2_SCK                          |           |
60
-#define PB11 27  // | 27      |            |            | USART3_RX             | TWI2_SDA             |                                   |           |
61
-#define PB12 28  // | 28      |            |            |                       |                      | SPI2_SS                           |           |
62
-#define PB13 29  // | 29      |            |            |                       |                      | SPI2_SCK                          |           |
63
-#define PB14 30  // | 30      |            |            |                       |                      | SPI2_MISO                         |           |
64
-#define PB15 31  // | 31      |            |            |                       |                      | SPI2_MOSI                         |           |
65
-//                  |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
66
-#define PC0  PIN_A10 // | 32      | A10 (ADC1) |            |                       |                      |                                   |           |
67
-#define PC1  PIN_A11 // | 33      | A11 (ADC1) |            |                       |                      |                                   |           |
68
-#define PC2  PIN_A12 // | 34      | A12 (ADC1) |            |                       |                      | SPI2_MISO                         |           |
69
-#define PC3  PIN_A13 // | 35      | A13 (ADC1) |            |                       |                      | SPI2_MOSI                         |           |
70
-#define PC4  PIN_A14 // | 36      | A14 (ADC1) |            |                       |                      |                                   |           |
71
-#define PC5  PIN_A15 // | 37      | A15 (ADC1) |            | USART3_RX             |                      |                                   |           |
72
-#define PC6  38  // | 38      |            |            | USART6_TX             |                      |                                   |           |
73
-#define PC7  39  // | 39      |            |            | USART6_RX             |                      |                                   |           |
74
-#define PC8  40  // | 40      |            |            |                       |                      |                                   |           |
75
-#define PC9  41  // | 41      |            |            | USART3_TX             | TWI3_SDA             |                                   |           |
76
-#define PC10 42  // | 42      |            |            |                       |                      | SPI3_SCK                          |           |
77
-#define PC11 43  // | 43      |            |            | USART3_RX, (UART4_RX) |                      | SPI3_MISO                         |           |
78
-#define PC12 44  // | 44      |            |            | UART5_TX              |                      | SPI3_MOSI                         |           |
79
-#define PC13 45  // | 45      |            |            |                       |                      |                                   |           |
80
-#define PC14 46  // | 46      |            |            |                       |                      |                                   | OSC32_IN  |
81
-#define PC15 47  // | 47      |            |            |                       |                      |                                   | OSC32_OUT |
82
-//                  |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
83
-#define PD0  48  // | 48      |            |            |                       |                      |                                   |           |
84
-#define PD1  49  // | 49      |            |            |                       |                      |                                   |           |
85
-#define PD2  50  // | 50      |            |            | UART5_RX              |                      |                                   |           |
86
-#define PD3  51  // | 51      |            |            |                       |                      |                                   |           |
87
-#define PD4  52  // | 52      |            |            |                       |                      |                                   |           |
88
-#define PD5  53  // | 53      |            |            | USART2_TX             |                      |                                   |           |
89
-#define PD6  54  // | 54      |            |            | USART2_RX             |                      |                                   |           |
90
-#define PD7  55  // | 55      |            |            |                       |                      |                                   |           |
91
-#define PD8  56  // | 56      |            |            | USART3_TX             |                      |                                   |           |
92
-#define PD9  57  // | 57      |            |            | USART3_RX             |                      |                                   |           |
93
-#define PD10 58  // | 58      |            |            |                       |                      |                                   |           |
94
-#define PD11 59  // | 59      |            |            |                       |                      |                                   |           |
95
-#define PD12 60  // | 60      |            |            |                       |                      |                                   |           |
96
-#define PD13 61  // | 61      |            |            |                       |                      |                                   |           |
97
-#define PD14 62  // | 62      |            |            |                       |                      |                                   |           |
98
-#define PD15 63  // | 63      |            |            |                       |                      |                                   |           |
99
-//                  |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
100
-#define PE0  64  // | 64      |            |            |                       |                      |                                   |           |
101
-#define PE1  65  // | 65      |            |            |                       |                      |                                   |           |
102
-#define PE2  66  // | 66      |            |            |                       |                      |                                   |           |
103
-#define PE3  67  // | 67      |            |            |                       |                      |                                   |           |
104
-#define PE4  68  // | 68      |            |            |                       |                      |                                   |           |
105
-#define PE5  69  // | 69      |            |            |                       |                      |                                   |           |
106
-#define PE6  70  // | 70      |            |            |                       |                      |                                   |           |
107
-#define PE7  71  // | 71      |            |            |                       |                      |                                   |           |
108
-#define PE8  72  // | 72      |            |            |                       |                      |                                   |           |
109
-#define PE9  73  // | 73      |            |            |                       |                      |                                   |           |
110
-#define PE10 74  // | 74      |            |            |                       |                      |                                   |           |
111
-#define PE11 75  // | 75      |            |            |                       |                      |                                   |           |
112
-#define PE12 76  // | 76      |            |            |                       |                      |                                   |           |
113
-#define PE13 77  // | 77      |            |            |                       |                      |                                   |           |
114
-#define PE14 78  // | 78      |            |            |                       |                      |                                   |           |
115
-#define PE15 79  // | 79      |            |            |                       |                      |                                   |           |
116
-//                  |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
117
-#define PH0  80  // | 80      |            |            |                       |                      |                                   | OSC_IN    |
118
-#define PH1  81  // | 81      |            |            |                       |                      |                                   | OSC_OUT   |
119
-//                  |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
120
-
121
-/// This must be a literal
30
+                      // | DIGITAL | ANALOG IN  | ANALOG OUT | UART/USART            | TWI                  | SPI                               | SPECIAL   |
31
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
32
+#define PA0  PIN_A0   // | 0       | A0 (ADC1)  |            | UART4_TX              |                      |                                   |           |
33
+#define PA1  PIN_A1   // | 1       | A1 (ADC1)  |            | UART4_RX              |                      |                                   |           |
34
+#define PA2  PIN_A2   // | 2       | A2 (ADC1)  |            | USART2_TX             |                      |                                   |           |
35
+#define PA3  PIN_A3   // | 3       | A3 (ADC1)  |            | USART2_RX             |                      |                                   |           |
36
+#define PA4  PIN_A4   // | 4       | A4 (ADC1)  | DAC_OUT1   |                       |                      | SPI1_SS, (SPI3_SS)                |           |
37
+#define PA5  PIN_A5   // | 5       | A5 (ADC1)  | DAC_OUT2   |                       |                      | SPI1_SCK                          |           |
38
+#define PA6  PIN_A6   // | 6       | A6 (ADC1)  |            |                       |                      | SPI1_MISO                         |           |
39
+#define PA7  PIN_A7   // | 7       | A7 (ADC1)  |            |                       |                      | SPI1_MOSI                         |           |
40
+#define PA8  8        // | 8       |            |            |                       | TWI3_SCL             |                                   |           |
41
+#define PA9  9        // | 9       |            |            | USART1_TX             |                      |                                   |           |
42
+#define PA10 10       // | 10      |            |            | USART1_RX             |                      |                                   |           |
43
+#define PA11 11       // | 11      |            |            |                       |                      |                                   |           |
44
+#define PA12 12       // | 12      |            |            |                       |                      |                                   |           |
45
+#define PA13 13       // | 13      |            |            |                       |                      |                                   | SWD_SWDIO |
46
+#define PA14 14       // | 14      |            |            |                       |                      |                                   | SWD_SWCLK |
47
+#define PA15 15       // | 15      |            |            |                       |                      | SPI3_SS, (SPI1_SS)                |           |
48
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
49
+#define PB0  PIN_A8   // | 16      | A8 (ADC1)  |            |                       |                      |                                   |           |
50
+#define PB1  PIN_A9   // | 17      | A9 (ADC1)  |            |                       |                      |                                   |           |
51
+#define PB2  18       // | 18      |            |            |                       |                      |                                   | BOOT1     |
52
+#define PB3  19       // | 19      |            |            |                       |                      | SPI3_SCK,  (SPI1_SCK)             |           |
53
+#define PB4  20       // | 20      |            |            |                       |                      | SPI3_MISO, (SPI1_MISO)            |           |
54
+#define PB5  21       // | 21      |            |            |                       |                      | SPI3_MOSI, (SPI1_MOSI)            |           |
55
+#define PB6  22       // | 22      |            |            | USART1_TX             | TWI1_SCL             |                                   |           |
56
+#define PB7  23       // | 23      |            |            | USART1_RX             | TWI1_SDA             |                                   |           |
57
+#define PB8  24       // | 24      |            |            |                       | TWI1_SCL             |                                   |           |
58
+#define PB9  25       // | 25      |            |            |                       | TWI1_SDA             | SPI2_SS                           |           |
59
+#define PB10 26       // | 26      |            |            | USART3_TX, (UART4_TX) | TWI2_SCL             | SPI2_SCK                          |           |
60
+#define PB11 27       // | 27      |            |            | USART3_RX             | TWI2_SDA             |                                   |           |
61
+#define PB12 28       // | 28      |            |            |                       |                      | SPI2_SS                           |           |
62
+#define PB13 29       // | 29      |            |            |                       |                      | SPI2_SCK                          |           |
63
+#define PB14 30       // | 30      |            |            |                       |                      | SPI2_MISO                         |           |
64
+#define PB15 31       // | 31      |            |            |                       |                      | SPI2_MOSI                         |           |
65
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
66
+#define PC0  PIN_A10  // | 32      | A10 (ADC1) |            |                       |                      |                                   |           |
67
+#define PC1  PIN_A11  // | 33      | A11 (ADC1) |            |                       |                      |                                   |           |
68
+#define PC2  PIN_A12  // | 34      | A12 (ADC1) |            |                       |                      | SPI2_MISO                         |           |
69
+#define PC3  PIN_A13  // | 35      | A13 (ADC1) |            |                       |                      | SPI2_MOSI                         |           |
70
+#define PC4  PIN_A14  // | 36      | A14 (ADC1) |            |                       |                      |                                   |           |
71
+#define PC5  PIN_A15  // | 37      | A15 (ADC1) |            | USART3_RX             |                      |                                   |           |
72
+#define PC6  38       // | 38      |            |            | USART6_TX             |                      |                                   |           |
73
+#define PC7  39       // | 39      |            |            | USART6_RX             |                      |                                   |           |
74
+#define PC8  40       // | 40      |            |            |                       |                      |                                   |           |
75
+#define PC9  41       // | 41      |            |            | USART3_TX             | TWI3_SDA             |                                   |           |
76
+#define PC10 42       // | 42      |            |            |                       |                      | SPI3_SCK                          |           |
77
+#define PC11 43       // | 43      |            |            | USART3_RX, (UART4_RX) |                      | SPI3_MISO                         |           |
78
+#define PC12 44       // | 44      |            |            | UART5_TX              |                      | SPI3_MOSI                         |           |
79
+#define PC13 45       // | 45      |            |            |                       |                      |                                   |           |
80
+#define PC14 46       // | 46      |            |            |                       |                      |                                   | OSC32_IN  |
81
+#define PC15 47       // | 47      |            |            |                       |                      |                                   | OSC32_OUT |
82
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
83
+#define PD0  48       // | 48      |            |            |                       |                      |                                   |           |
84
+#define PD1  49       // | 49      |            |            |                       |                      |                                   |           |
85
+#define PD2  50       // | 50      |            |            | UART5_RX              |                      |                                   |           |
86
+#define PD3  51       // | 51      |            |            |                       |                      |                                   |           |
87
+#define PD4  52       // | 52      |            |            |                       |                      |                                   |           |
88
+#define PD5  53       // | 53      |            |            | USART2_TX             |                      |                                   |           |
89
+#define PD6  54       // | 54      |            |            | USART2_RX             |                      |                                   |           |
90
+#define PD7  55       // | 55      |            |            |                       |                      |                                   |           |
91
+#define PD8  56       // | 56      |            |            | USART3_TX             |                      |                                   |           |
92
+#define PD9  57       // | 57      |            |            | USART3_RX             |                      |                                   |           |
93
+#define PD10 58       // | 58      |            |            |                       |                      |                                   |           |
94
+#define PD11 59       // | 59      |            |            |                       |                      |                                   |           |
95
+#define PD12 60       // | 60      |            |            |                       |                      |                                   |           |
96
+#define PD13 61       // | 61      |            |            |                       |                      |                                   |           |
97
+#define PD14 62       // | 62      |            |            |                       |                      |                                   |           |
98
+#define PD15 63       // | 63      |            |            |                       |                      |                                   |           |
99
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
100
+#define PE0  64       // | 64      |            |            |                       |                      |                                   |           |
101
+#define PE1  65       // | 65      |            |            |                       |                      |                                   |           |
102
+#define PE2  66       // | 66      |            |            |                       |                      |                                   |           |
103
+#define PE3  67       // | 67      |            |            |                       |                      |                                   |           |
104
+#define PE4  68       // | 68      |            |            |                       |                      |                                   |           |
105
+#define PE5  69       // | 69      |            |            |                       |                      |                                   |           |
106
+#define PE6  70       // | 70      |            |            |                       |                      |                                   |           |
107
+#define PE7  71       // | 71      |            |            |                       |                      |                                   |           |
108
+#define PE8  72       // | 72      |            |            |                       |                      |                                   |           |
109
+#define PE9  73       // | 73      |            |            |                       |                      |                                   |           |
110
+#define PE10 74       // | 74      |            |            |                       |                      |                                   |           |
111
+#define PE11 75       // | 75      |            |            |                       |                      |                                   |           |
112
+#define PE12 76       // | 76      |            |            |                       |                      |                                   |           |
113
+#define PE13 77       // | 77      |            |            |                       |                      |                                   |           |
114
+#define PE14 78       // | 78      |            |            |                       |                      |                                   |           |
115
+#define PE15 79       // | 79      |            |            |                       |                      |                                   |           |
116
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
117
+#define PH0  80       // | 80      |            |            |                       |                      |                                   | OSC_IN    |
118
+#define PH1  81       // | 81      |            |            |                       |                      |                                   | OSC_OUT   |
119
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
120
+
121
+// This must be a literal
122 122
 #define NUM_DIGITAL_PINS        82
123 123
 #define NUM_ANALOG_INPUTS       16
124 124
 

+ 169
- 0
buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/PeripheralPins.c 查看文件

@@ -0,0 +1,169 @@
1
+/*
2
+ *******************************************************************************
3
+ * Copyright (c) 2016, STMicroelectronics
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are met:
8
+ *
9
+ * 1. Redistributions of source code must retain the above copyright notice,
10
+ *    this list of conditions and the following disclaimer.
11
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ *    this list of conditions and the following disclaimer in the documentation
13
+ *    and/or other materials provided with the distribution.
14
+ * 3. Neither the name of STMicroelectronics nor the names of its contributors
15
+ *    may be used to endorse or promote products derived from this software
16
+ *    without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *******************************************************************************
29
+ */
30
+#include "Arduino.h"
31
+#include "PeripheralPins.h"
32
+
33
+// =====
34
+// Note: Commented lines are alternative possibilities which are not used per default.
35
+//       If you change them, you will have to know what you do
36
+// =====
37
+
38
+//*** ADC ***
39
+
40
+#ifdef HAL_ADC_MODULE_ENABLED
41
+WEAK const PinMap PinMap_ADC[] = {
42
+   {PC_0,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10   THBED
43
+   {PC_1,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11   TH0
44
+   {PC_2,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12   TH1
45
+   {PC_3,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13   TH2
46
+  {NC,    NP,    0}
47
+};
48
+#endif
49
+
50
+//*** I2C ***
51
+
52
+#ifdef HAL_I2C_MODULE_ENABLED
53
+WEAK const PinMap PinMap_I2C_SDA[] = {
54
+  {PB_9,  I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
55
+  {NC,    NP,    0}
56
+};
57
+
58
+WEAK const PinMap PinMap_I2C_SCL[] = {
59
+  {PB_8,  I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
60
+  {NC,    NP,    0}
61
+};
62
+#endif
63
+
64
+//*** PWM ***
65
+
66
+#ifdef HAL_TIM_MODULE_ENABLED
67
+// Some pins can perform PWM from more than one timer. These were selected to utilize as many channels as
68
+// possible from timers which were already dedicated to PWM output.
69
+
70
+// TIM1 = HEATER0, HEATER1, [SERVO]
71
+// TIM2 = FAN1, FAN2, [BEEPER]
72
+// TIM4 = HEATER_BED
73
+// TIM5 = HEATER2, FAN0
74
+
75
+WEAK const PinMap PinMap_PWM[] = {
76
+  {PA_0,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1        Fan2
77
+  {PA_1,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2        Fan1
78
+  {PA_2,  TIM5,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3        Fan0
79
+  {PA_3,  TIM5,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4        HE2 
80
+  {PA_8,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1        Servo 
81
+  {PB_0,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N       HE1
82
+  {PB_1,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N       HE0
83
+  {PB_2,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4        BEEPER
84
+  {PD_12, TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1        HOTBED
85
+  {NC,    NP,    0}
86
+};
87
+#endif
88
+
89
+//*** SERIAL ***
90
+
91
+#ifdef HAL_UART_MODULE_ENABLED
92
+WEAK const PinMap PinMap_UART_TX[] = {
93
+  {PA_9,  USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
94
+  {PB_10, USART3,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
95
+  {NC,    NP,    0}
96
+};
97
+
98
+WEAK const PinMap PinMap_UART_RX[] = {
99
+  {PA_10, USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
100
+  {PB_11, USART3,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
101
+  {NC,    NP,    0}
102
+};
103
+
104
+WEAK const PinMap PinMap_UART_RTS[] = {
105
+  {NC,    NP,    0}
106
+};
107
+
108
+WEAK const PinMap PinMap_UART_CTS[] = {
109
+  {NC,    NP,    0}
110
+};
111
+#endif
112
+
113
+//*** SPI ***
114
+
115
+#ifdef HAL_SPI_MODULE_ENABLED
116
+WEAK const PinMap PinMap_SPI_MOSI[] = {
117
+  {PA_7,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
118
+  {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
119
+  {NC,    NP,    0}
120
+};
121
+
122
+WEAK const PinMap PinMap_SPI_MISO[] = {
123
+  {PA_6,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
124
+  {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
125
+  {NC,    NP,    0}
126
+};
127
+
128
+WEAK const PinMap PinMap_SPI_SCLK[] = {
129
+  {PA_5,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
130
+  {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
131
+  {NC,    NP,    0}
132
+};
133
+
134
+WEAK const PinMap PinMap_SPI_SSEL[] = {
135
+  {PA_4,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
136
+  {NC,    NP,    0}
137
+};
138
+#endif
139
+
140
+//*** CAN ***
141
+
142
+#ifdef HAL_CAN_MODULE_ENABLED
143
+WEAK const PinMap PinMap_CAN_RD[] = {
144
+  {PB_12, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)},
145
+  {NC,    NP,    0}
146
+};
147
+
148
+const PinMap PinMap_CAN_TD[] = {
149
+  {PB_13, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)},
150
+  {NC,    NP,    0}
151
+};
152
+#endif
153
+
154
+//*** USB ***
155
+
156
+// If anyone for some unfathomable reason want to run gcode from Marlin's USB-C drive at 12Mbps - you can
157
+#ifdef HAL_PCD_MODULE_ENABLED
158
+WEAK const PinMap PinMap_USB_OTG_FS[] = {
159
+  {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM
160
+  {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP
161
+  {NC,    NP,    0}
162
+};
163
+
164
+WEAK const PinMap PinMap_USB_OTG_HS[] = {
165
+  {NC,    NP,    0}
166
+};
167
+#endif
168
+
169
+

+ 30
- 0
buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/PinNamesVar.h 查看文件

@@ -0,0 +1,30 @@
1
+/* SYS_WKUP */
2
+#ifdef PWR_WAKEUP_PIN1
3
+  SYS_WKUP1 = PA_0, /* SYS_WKUP0 */
4
+#endif
5
+#ifdef PWR_WAKEUP_PIN2
6
+  SYS_WKUP2 = NC,
7
+#endif
8
+#ifdef PWR_WAKEUP_PIN3
9
+  SYS_WKUP3 = NC,
10
+#endif
11
+#ifdef PWR_WAKEUP_PIN4
12
+  SYS_WKUP4 = NC,
13
+#endif
14
+#ifdef PWR_WAKEUP_PIN5
15
+  SYS_WKUP5 = NC,
16
+#endif
17
+#ifdef PWR_WAKEUP_PIN6
18
+  SYS_WKUP6 = NC,
19
+#endif
20
+#ifdef PWR_WAKEUP_PIN7
21
+  SYS_WKUP7 = NC,
22
+#endif
23
+#ifdef PWR_WAKEUP_PIN8
24
+  SYS_WKUP8 = NC,
25
+#endif
26
+/* USB */
27
+#ifdef USBCON
28
+  USB_OTG_FS_DM = PA_11,
29
+  USB_OTG_FS_DP = PA_12,
30
+#endif

+ 496
- 0
buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/hal_conf_extra.h 查看文件

@@ -0,0 +1,496 @@
1
+/**
2
+  ******************************************************************************
3
+  * @file    stm32f4xx_hal_conf_template.h
4
+  * @author  MCD Application Team
5
+  * @brief   HAL configuration template file.
6
+  *          This file should be copied to the application folder and renamed
7
+  *          to stm32f4xx_hal_conf.h.
8
+  ******************************************************************************
9
+  * @attention
10
+  *
11
+  * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
12
+  * All rights reserved.</center></h2>
13
+  *
14
+  * This software component is licensed by ST under BSD 3-Clause license,
15
+  * the "License"; You may not use this file except in compliance with the
16
+  * License. You may obtain a copy of the License at:
17
+  *                        opensource.org/licenses/BSD-3-Clause
18
+  *
19
+  ******************************************************************************
20
+  */
21
+
22
+/* Define to prevent recursive inclusion -------------------------------------*/
23
+#ifndef __STM32F4xx_HAL_CONF_H
24
+#define __STM32F4xx_HAL_CONF_H
25
+
26
+#ifdef __cplusplus
27
+ extern "C" {
28
+#endif
29
+
30
+/* Exported types ------------------------------------------------------------*/
31
+/* Exported constants --------------------------------------------------------*/
32
+
33
+/* ########################## Module Selection ############################## */
34
+/**
35
+  * @brief This is the list of modules to be used in the HAL driver
36
+  */
37
+#define HAL_MODULE_ENABLED
38
+#define HAL_ADC_MODULE_ENABLED
39
+#define HAL_CAN_LEGACY_MODULE_ENABLED
40
+#define HAL_CRC_MODULE_ENABLED
41
+#define HAL_DAC_MODULE_ENABLED
42
+#define HAL_DMA_MODULE_ENABLED
43
+#define HAL_EXTI_MODULE_ENABLED   // Needed for Endstop (and other external) Interrupts
44
+#define HAL_GPIO_MODULE_ENABLED
45
+#define HAL_I2C_MODULE_ENABLED
46
+#define HAL_PWR_MODULE_ENABLED
47
+#define HAL_RCC_MODULE_ENABLED
48
+#define HAL_SPI_MODULE_ENABLED
49
+#define HAL_TIM_MODULE_ENABLED
50
+#define HAL_USART_MODULE_ENABLED
51
+#define HAL_CORTEX_MODULE_ENABLED
52
+// #define HAL_UART_MODULE_ENABLED
53
+// #define HAL_PCD_MODULE_ENABLED
54
+
55
+// #define HAL_CAN_MODULE_ENABLED
56
+//#define HAL_CEC_MODULE_ENABLED
57
+//#define HAL_CRYP_MODULE_ENABLED
58
+//#define HAL_DCMI_MODULE_ENABLED
59
+//#define HAL_DMA2D_MODULE_ENABLED
60
+//#define HAL_ETH_MODULE_ENABLED
61
+//#define HAL_FLASH_MODULE_ENABLED
62
+//#define HAL_NAND_MODULE_ENABLED
63
+//#define HAL_NOR_MODULE_ENABLED
64
+//#define HAL_PCCARD_MODULE_ENABLED
65
+//#define HAL_SRAM_MODULE_ENABLED
66
+//#define HAL_SDRAM_MODULE_ENABLED
67
+//#define HAL_HASH_MODULE_ENABLED
68
+//#define HAL_SMBUS_MODULE_ENABLED
69
+//#define HAL_I2S_MODULE_ENABLED
70
+//#define HAL_IWDG_MODULE_ENABLED
71
+//#define HAL_LTDC_MODULE_ENABLED
72
+//#define HAL_DSI_MODULE_ENABLED
73
+//#define HAL_QSPI_MODULE_ENABLED
74
+//#define HAL_RNG_MODULE_ENABLED
75
+//#define HAL_RTC_MODULE_ENABLED
76
+//#define HAL_SAI_MODULE_ENABLED
77
+//#define HAL_SD_MODULE_ENABLED
78
+//#define HAL_IRDA_MODULE_ENABLED
79
+//#define HAL_SMARTCARD_MODULE_ENABLED
80
+//#define HAL_WWDG_MODULE_ENABLED
81
+//#define HAL_HCD_MODULE_ENABLED
82
+//#define HAL_FMPI2C_MODULE_ENABLED
83
+//#define HAL_SPDIFRX_MODULE_ENABLED
84
+//#define HAL_DFSDM_MODULE_ENABLED
85
+//#define HAL_LPTIM_MODULE_ENABLED
86
+//#define HAL_MMC_MODULE_ENABLED
87
+
88
+/* ########################## HSE/HSI Values adaptation ##################### */
89
+/**
90
+  * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
91
+  *        This value is used by the RCC HAL module to compute the system frequency
92
+  *        (when HSE is used as system clock source, directly or through the PLL).
93
+  */
94
+#ifndef HSE_VALUE
95
+  #define HSE_VALUE              25000000U /*!< Value of the External oscillator in Hz */
96
+#endif /* HSE_VALUE */
97
+
98
+#ifndef HSE_STARTUP_TIMEOUT
99
+  #define HSE_STARTUP_TIMEOUT    100U      /*!< Time out for HSE start up, in ms */
100
+#endif /* HSE_STARTUP_TIMEOUT */
101
+
102
+/**
103
+  * @brief Internal High Speed oscillator (HSI) value.
104
+  *        This value is used by the RCC HAL module to compute the system frequency
105
+  *        (when HSI is used as system clock source, directly or through the PLL).
106
+  */
107
+#ifndef HSI_VALUE
108
+  #define HSI_VALUE              16000000U /*!< Value of the Internal oscillator in Hz */
109
+#endif /* HSI_VALUE */
110
+
111
+/**
112
+  * @brief Internal Low Speed oscillator (LSI) value.
113
+  */
114
+#ifndef LSI_VALUE
115
+ #define LSI_VALUE               32000U    /*!< LSI Typical Value in Hz */
116
+#endif /* LSI_VALUE */                     /*!< Value of the Internal Low Speed oscillator in Hz
117
+                                                The real value may vary depending on the variations
118
+                                                in voltage and temperature. */
119
+/**
120
+  * @brief External Low Speed oscillator (LSE) value.
121
+  */
122
+#ifndef LSE_VALUE
123
+ #define LSE_VALUE               32768U    /*!< Value of the External Low Speed oscillator in Hz */
124
+#endif /* LSE_VALUE */
125
+
126
+#ifndef LSE_STARTUP_TIMEOUT
127
+  #define LSE_STARTUP_TIMEOUT    5000U     /*!< Time out for LSE start up, in ms */
128
+#endif /* LSE_STARTUP_TIMEOUT */
129
+
130
+/**
131
+  * @brief External clock source for I2S peripheral
132
+  *        This value is used by the I2S HAL module to compute the I2S clock source
133
+  *        frequency, this source is inserted directly through I2S_CKIN pad.
134
+  */
135
+#ifndef EXTERNAL_CLOCK_VALUE
136
+  #define EXTERNAL_CLOCK_VALUE     12288000U /*!< Value of the External oscillator in Hz*/
137
+#endif /* EXTERNAL_CLOCK_VALUE */
138
+
139
+/* Tip: To avoid modifying this file each time you need to use different HSE,
140
+   ===  you can define the HSE value in your toolchain compiler preprocessor. */
141
+
142
+/* ########################### System Configuration ######################### */
143
+/**
144
+  * @brief This is the HAL system configuration section
145
+  */
146
+#define  VDD_VALUE                    3300U /*!< Value of VDD in mv */
147
+#define  TICK_INT_PRIORITY            0x0FU /*!< tick interrupt priority */
148
+#define  USE_RTOS                     0U
149
+#define  PREFETCH_ENABLE              1U
150
+#define  INSTRUCTION_CACHE_ENABLE     1U
151
+#define  DATA_CACHE_ENABLE            1U
152
+
153
+#define  USE_HAL_ADC_REGISTER_CALLBACKS         0U /* ADC register callback disabled       */
154
+#define  USE_HAL_CAN_REGISTER_CALLBACKS         0U /* CAN register callback disabled       */
155
+#define  USE_HAL_CEC_REGISTER_CALLBACKS         0U /* CEC register callback disabled       */
156
+#define  USE_HAL_CRYP_REGISTER_CALLBACKS        0U /* CRYP register callback disabled      */
157
+#define  USE_HAL_DAC_REGISTER_CALLBACKS         0U /* DAC register callback disabled       */
158
+#define  USE_HAL_DCMI_REGISTER_CALLBACKS        0U /* DCMI register callback disabled      */
159
+#define  USE_HAL_DFSDM_REGISTER_CALLBACKS       0U /* DFSDM register callback disabled     */
160
+#define  USE_HAL_DMA2D_REGISTER_CALLBACKS       0U /* DMA2D register callback disabled     */
161
+#define  USE_HAL_DSI_REGISTER_CALLBACKS         0U /* DSI register callback disabled       */
162
+#define  USE_HAL_ETH_REGISTER_CALLBACKS         0U /* ETH register callback disabled       */
163
+#define  USE_HAL_HASH_REGISTER_CALLBACKS        0U /* HASH register callback disabled      */
164
+#define  USE_HAL_HCD_REGISTER_CALLBACKS         0U /* HCD register callback disabled       */
165
+#define  USE_HAL_I2C_REGISTER_CALLBACKS         0U /* I2C register callback disabled       */
166
+#define  USE_HAL_FMPI2C_REGISTER_CALLBACKS      0U /* FMPI2C register callback disabled    */
167
+#define  USE_HAL_I2S_REGISTER_CALLBACKS         0U /* I2S register callback disabled       */
168
+#define  USE_HAL_IRDA_REGISTER_CALLBACKS        0U /* IRDA register callback disabled      */
169
+#define  USE_HAL_LPTIM_REGISTER_CALLBACKS       0U /* LPTIM register callback disabled     */
170
+#define  USE_HAL_LTDC_REGISTER_CALLBACKS        0U /* LTDC register callback disabled      */
171
+#define  USE_HAL_MMC_REGISTER_CALLBACKS         0U /* MMC register callback disabled       */
172
+#define  USE_HAL_NAND_REGISTER_CALLBACKS        0U /* NAND register callback disabled      */
173
+#define  USE_HAL_NOR_REGISTER_CALLBACKS         0U /* NOR register callback disabled       */
174
+#define  USE_HAL_PCCARD_REGISTER_CALLBACKS      0U /* PCCARD register callback disabled    */
175
+#define  USE_HAL_PCD_REGISTER_CALLBACKS         0U /* PCD register callback disabled       */
176
+#define  USE_HAL_QSPI_REGISTER_CALLBACKS        0U /* QSPI register callback disabled      */
177
+#define  USE_HAL_RNG_REGISTER_CALLBACKS         0U /* RNG register callback disabled       */
178
+#define  USE_HAL_RTC_REGISTER_CALLBACKS         0U /* RTC register callback disabled       */
179
+#define  USE_HAL_SAI_REGISTER_CALLBACKS         0U /* SAI register callback disabled       */
180
+#define  USE_HAL_SD_REGISTER_CALLBACKS          0U /* SD register callback disabled        */
181
+#define  USE_HAL_SMARTCARD_REGISTER_CALLBACKS   0U /* SMARTCARD register callback disabled */
182
+#define  USE_HAL_SDRAM_REGISTER_CALLBACKS       0U /* SDRAM register callback disabled     */
183
+#define  USE_HAL_SRAM_REGISTER_CALLBACKS        0U /* SRAM register callback disabled      */
184
+#define  USE_HAL_SPDIFRX_REGISTER_CALLBACKS     0U /* SPDIFRX register callback disabled   */
185
+#define  USE_HAL_SMBUS_REGISTER_CALLBACKS       0U /* SMBUS register callback disabled     */
186
+#define  USE_HAL_SPI_REGISTER_CALLBACKS         0U /* SPI register callback disabled       */
187
+#define  USE_HAL_TIM_REGISTER_CALLBACKS         0U /* TIM register callback disabled       */
188
+#define  USE_HAL_UART_REGISTER_CALLBACKS        0U /* UART register callback disabled      */
189
+#define  USE_HAL_USART_REGISTER_CALLBACKS       0U /* USART register callback disabled     */
190
+#define  USE_HAL_WWDG_REGISTER_CALLBACKS        0U /* WWDG register callback disabled      */
191
+
192
+/* ########################## Assert Selection ############################## */
193
+/**
194
+  * @brief Uncomment the line below to expanse the "assert_param" macro in the
195
+  *        HAL drivers code
196
+  */
197
+// #define USE_FULL_ASSERT    1U
198
+
199
+/* ################## Ethernet peripheral configuration ##################### */
200
+
201
+/* Section 1 : Ethernet peripheral configuration */
202
+
203
+/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
204
+#define MAC_ADDR0   2U
205
+#define MAC_ADDR1   0U
206
+#define MAC_ADDR2   0U
207
+#define MAC_ADDR3   0U
208
+#define MAC_ADDR4   0U
209
+#define MAC_ADDR5   0U
210
+
211
+/* Definition of the Ethernet driver buffers size and count */
212
+#define ETH_RX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for receive               */
213
+#define ETH_TX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for transmit              */
214
+#define ETH_RXBUFNB                    4U                  /* 4 Rx buffers of size ETH_RX_BUF_SIZE  */
215
+#define ETH_TXBUFNB                    4U                  /* 4 Tx buffers of size ETH_TX_BUF_SIZE  */
216
+
217
+/* Section 2: PHY configuration section */
218
+
219
+/* DP83848 PHY Address*/
220
+#define DP83848_PHY_ADDRESS             0x01U
221
+/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
222
+#define PHY_RESET_DELAY                 0x000000FFU
223
+/* PHY Configuration delay */
224
+#define PHY_CONFIG_DELAY                0x00000FFFU
225
+
226
+#define PHY_READ_TO                     0x0000FFFFU
227
+#define PHY_WRITE_TO                    0x0000FFFFU
228
+
229
+/* Section 3: Common PHY Registers */
230
+
231
+#define PHY_BCR                         ((uint16_t)0x0000)  /*!< Transceiver Basic Control Register   */
232
+#define PHY_BSR                         ((uint16_t)0x0001)  /*!< Transceiver Basic Status Register    */
233
+
234
+#define PHY_RESET                       ((uint16_t)0x8000)  /*!< PHY Reset */
235
+#define PHY_LOOPBACK                    ((uint16_t)0x4000)  /*!< Select loop-back mode */
236
+#define PHY_FULLDUPLEX_100M             ((uint16_t)0x2100)  /*!< Set the full-duplex mode at 100 Mb/s */
237
+#define PHY_HALFDUPLEX_100M             ((uint16_t)0x2000)  /*!< Set the half-duplex mode at 100 Mb/s */
238
+#define PHY_FULLDUPLEX_10M              ((uint16_t)0x0100)  /*!< Set the full-duplex mode at 10 Mb/s  */
239
+#define PHY_HALFDUPLEX_10M              ((uint16_t)0x0000)  /*!< Set the half-duplex mode at 10 Mb/s  */
240
+#define PHY_AUTONEGOTIATION             ((uint16_t)0x1000)  /*!< Enable auto-negotiation function     */
241
+#define PHY_RESTART_AUTONEGOTIATION     ((uint16_t)0x0200)  /*!< Restart auto-negotiation function    */
242
+#define PHY_POWERDOWN                   ((uint16_t)0x0800)  /*!< Select the power down mode           */
243
+#define PHY_ISOLATE                     ((uint16_t)0x0400)  /*!< Isolate PHY from MII                 */
244
+
245
+#define PHY_AUTONEGO_COMPLETE           ((uint16_t)0x0020)  /*!< Auto-Negotiation process completed   */
246
+#define PHY_LINKED_STATUS               ((uint16_t)0x0004)  /*!< Valid link established               */
247
+#define PHY_JABBER_DETECTION            ((uint16_t)0x0002)  /*!< Jabber condition detected            */
248
+
249
+/* Section 4: Extended PHY Registers */
250
+
251
+#define PHY_SR                          ((uint16_t)0x0010)  /*!< PHY status register Offset                      */
252
+#define PHY_MICR                        ((uint16_t)0x0011)  /*!< MII Interrupt Control Register                  */
253
+#define PHY_MISR                        ((uint16_t)0x0012)  /*!< MII Interrupt Status and Misc. Control Register */
254
+
255
+#define PHY_LINK_STATUS                 ((uint16_t)0x0001)  /*!< PHY Link mask                                   */
256
+#define PHY_SPEED_STATUS                ((uint16_t)0x0002)  /*!< PHY Speed mask                                  */
257
+#define PHY_DUPLEX_STATUS               ((uint16_t)0x0004)  /*!< PHY Duplex mask                                 */
258
+
259
+#define PHY_MICR_INT_EN                 ((uint16_t)0x0002)  /*!< PHY Enable interrupts                           */
260
+#define PHY_MICR_INT_OE                 ((uint16_t)0x0001)  /*!< PHY Enable output interrupt events              */
261
+
262
+#define PHY_MISR_LINK_INT_EN            ((uint16_t)0x0020)  /*!< Enable Interrupt on change of link status       */
263
+#define PHY_LINK_INTERRUPT              ((uint16_t)0x2000)  /*!< PHY link status interrupt mask                  */
264
+
265
+/* ################## SPI peripheral configuration ########################## */
266
+
267
+/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
268
+* Activated: CRC code is present inside driver
269
+* Deactivated: CRC code cleaned from driver
270
+*/
271
+
272
+#define USE_SPI_CRC                     0U
273
+
274
+/* Includes ------------------------------------------------------------------*/
275
+/**
276
+  * @brief Include module's header file
277
+  */
278
+
279
+#ifdef HAL_RCC_MODULE_ENABLED
280
+  #include "stm32f4xx_hal_rcc.h"
281
+#endif /* HAL_RCC_MODULE_ENABLED */
282
+
283
+#ifdef HAL_GPIO_MODULE_ENABLED
284
+  #include "stm32f4xx_hal_gpio.h"
285
+#endif /* HAL_GPIO_MODULE_ENABLED */
286
+
287
+#ifdef HAL_EXTI_MODULE_ENABLED
288
+  #include "stm32f4xx_hal_exti.h"
289
+#endif /* HAL_EXTI_MODULE_ENABLED */
290
+
291
+#ifdef HAL_DMA_MODULE_ENABLED
292
+  #include "stm32f4xx_hal_dma.h"
293
+#endif /* HAL_DMA_MODULE_ENABLED */
294
+
295
+#ifdef HAL_CORTEX_MODULE_ENABLED
296
+  #include "stm32f4xx_hal_cortex.h"
297
+#endif /* HAL_CORTEX_MODULE_ENABLED */
298
+
299
+#ifdef HAL_ADC_MODULE_ENABLED
300
+  #include "stm32f4xx_hal_adc.h"
301
+#endif /* HAL_ADC_MODULE_ENABLED */
302
+
303
+#ifdef HAL_CAN_MODULE_ENABLED
304
+  #include "stm32f4xx_hal_can.h"
305
+#endif /* HAL_CAN_MODULE_ENABLED */
306
+
307
+#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
308
+  #include "stm32f4xx_hal_can_legacy.h"
309
+#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
310
+
311
+#ifdef HAL_CRC_MODULE_ENABLED
312
+  #include "stm32f4xx_hal_crc.h"
313
+#endif /* HAL_CRC_MODULE_ENABLED */
314
+
315
+#ifdef HAL_CRYP_MODULE_ENABLED
316
+  #include "stm32f4xx_hal_cryp.h"
317
+#endif /* HAL_CRYP_MODULE_ENABLED */
318
+
319
+#ifdef HAL_DMA2D_MODULE_ENABLED
320
+  #include "stm32f4xx_hal_dma2d.h"
321
+#endif /* HAL_DMA2D_MODULE_ENABLED */
322
+
323
+#ifdef HAL_DAC_MODULE_ENABLED
324
+  #include "stm32f4xx_hal_dac.h"
325
+#endif /* HAL_DAC_MODULE_ENABLED */
326
+
327
+#ifdef HAL_DCMI_MODULE_ENABLED
328
+  #include "stm32f4xx_hal_dcmi.h"
329
+#endif /* HAL_DCMI_MODULE_ENABLED */
330
+
331
+#ifdef HAL_ETH_MODULE_ENABLED
332
+  #include "stm32f4xx_hal_eth.h"
333
+#endif /* HAL_ETH_MODULE_ENABLED */
334
+
335
+#ifdef HAL_FLASH_MODULE_ENABLED
336
+  #include "stm32f4xx_hal_flash.h"
337
+#endif /* HAL_FLASH_MODULE_ENABLED */
338
+
339
+#ifdef HAL_SRAM_MODULE_ENABLED
340
+  #include "stm32f4xx_hal_sram.h"
341
+#endif /* HAL_SRAM_MODULE_ENABLED */
342
+
343
+#ifdef HAL_NOR_MODULE_ENABLED
344
+  #include "stm32f4xx_hal_nor.h"
345
+#endif /* HAL_NOR_MODULE_ENABLED */
346
+
347
+#ifdef HAL_NAND_MODULE_ENABLED
348
+  #include "stm32f4xx_hal_nand.h"
349
+#endif /* HAL_NAND_MODULE_ENABLED */
350
+
351
+#ifdef HAL_PCCARD_MODULE_ENABLED
352
+  #include "stm32f4xx_hal_pccard.h"
353
+#endif /* HAL_PCCARD_MODULE_ENABLED */
354
+
355
+#ifdef HAL_SDRAM_MODULE_ENABLED
356
+  #include "stm32f4xx_hal_sdram.h"
357
+#endif /* HAL_SDRAM_MODULE_ENABLED */
358
+
359
+#ifdef HAL_HASH_MODULE_ENABLED
360
+ #include "stm32f4xx_hal_hash.h"
361
+#endif /* HAL_HASH_MODULE_ENABLED */
362
+
363
+#ifdef HAL_I2C_MODULE_ENABLED
364
+ #include "stm32f4xx_hal_i2c.h"
365
+#endif /* HAL_I2C_MODULE_ENABLED */
366
+
367
+#ifdef HAL_SMBUS_MODULE_ENABLED
368
+ #include "stm32f4xx_hal_smbus.h"
369
+#endif /* HAL_SMBUS_MODULE_ENABLED */
370
+
371
+#ifdef HAL_I2S_MODULE_ENABLED
372
+ #include "stm32f4xx_hal_i2s.h"
373
+#endif /* HAL_I2S_MODULE_ENABLED */
374
+
375
+#ifdef HAL_IWDG_MODULE_ENABLED
376
+ #include "stm32f4xx_hal_iwdg.h"
377
+#endif /* HAL_IWDG_MODULE_ENABLED */
378
+
379
+#ifdef HAL_LTDC_MODULE_ENABLED
380
+ #include "stm32f4xx_hal_ltdc.h"
381
+#endif /* HAL_LTDC_MODULE_ENABLED */
382
+
383
+#ifdef HAL_PWR_MODULE_ENABLED
384
+ #include "stm32f4xx_hal_pwr.h"
385
+#endif /* HAL_PWR_MODULE_ENABLED */
386
+
387
+#ifdef HAL_RNG_MODULE_ENABLED
388
+ #include "stm32f4xx_hal_rng.h"
389
+#endif /* HAL_RNG_MODULE_ENABLED */
390
+
391
+#ifdef HAL_RTC_MODULE_ENABLED
392
+ #include "stm32f4xx_hal_rtc.h"
393
+#endif /* HAL_RTC_MODULE_ENABLED */
394
+
395
+#ifdef HAL_SAI_MODULE_ENABLED
396
+ #include "stm32f4xx_hal_sai.h"
397
+#endif /* HAL_SAI_MODULE_ENABLED */
398
+
399
+#ifdef HAL_SD_MODULE_ENABLED
400
+ #include "stm32f4xx_hal_sd.h"
401
+#endif /* HAL_SD_MODULE_ENABLED */
402
+
403
+#ifdef HAL_SPI_MODULE_ENABLED
404
+ #include "stm32f4xx_hal_spi.h"
405
+#endif /* HAL_SPI_MODULE_ENABLED */
406
+
407
+#ifdef HAL_TIM_MODULE_ENABLED
408
+ #include "stm32f4xx_hal_tim.h"
409
+#endif /* HAL_TIM_MODULE_ENABLED */
410
+
411
+#ifdef HAL_UART_MODULE_ENABLED
412
+ #include "stm32f4xx_hal_uart.h"
413
+#endif /* HAL_UART_MODULE_ENABLED */
414
+
415
+#ifdef HAL_USART_MODULE_ENABLED
416
+ #include "stm32f4xx_hal_usart.h"
417
+#endif /* HAL_USART_MODULE_ENABLED */
418
+
419
+#ifdef HAL_IRDA_MODULE_ENABLED
420
+ #include "stm32f4xx_hal_irda.h"
421
+#endif /* HAL_IRDA_MODULE_ENABLED */
422
+
423
+#ifdef HAL_SMARTCARD_MODULE_ENABLED
424
+ #include "stm32f4xx_hal_smartcard.h"
425
+#endif /* HAL_SMARTCARD_MODULE_ENABLED */
426
+
427
+#ifdef HAL_WWDG_MODULE_ENABLED
428
+ #include "stm32f4xx_hal_wwdg.h"
429
+#endif /* HAL_WWDG_MODULE_ENABLED */
430
+
431
+#ifdef HAL_PCD_MODULE_ENABLED
432
+ #include "stm32f4xx_hal_pcd.h"
433
+#endif /* HAL_PCD_MODULE_ENABLED */
434
+
435
+#ifdef HAL_HCD_MODULE_ENABLED
436
+ #include "stm32f4xx_hal_hcd.h"
437
+#endif /* HAL_HCD_MODULE_ENABLED */
438
+
439
+#ifdef HAL_DSI_MODULE_ENABLED
440
+ #include "stm32f4xx_hal_dsi.h"
441
+#endif /* HAL_DSI_MODULE_ENABLED */
442
+
443
+#ifdef HAL_QSPI_MODULE_ENABLED
444
+ #include "stm32f4xx_hal_qspi.h"
445
+#endif /* HAL_QSPI_MODULE_ENABLED */
446
+
447
+#ifdef HAL_CEC_MODULE_ENABLED
448
+ #include "stm32f4xx_hal_cec.h"
449
+#endif /* HAL_CEC_MODULE_ENABLED */
450
+
451
+#ifdef HAL_FMPI2C_MODULE_ENABLED
452
+ #include "stm32f4xx_hal_fmpi2c.h"
453
+#endif /* HAL_FMPI2C_MODULE_ENABLED */
454
+
455
+#ifdef HAL_SPDIFRX_MODULE_ENABLED
456
+ #include "stm32f4xx_hal_spdifrx.h"
457
+#endif /* HAL_SPDIFRX_MODULE_ENABLED */
458
+
459
+#ifdef HAL_DFSDM_MODULE_ENABLED
460
+ #include "stm32f4xx_hal_dfsdm.h"
461
+#endif /* HAL_DFSDM_MODULE_ENABLED */
462
+
463
+#ifdef HAL_LPTIM_MODULE_ENABLED
464
+ #include "stm32f4xx_hal_lptim.h"
465
+#endif /* HAL_LPTIM_MODULE_ENABLED */
466
+
467
+#ifdef HAL_MMC_MODULE_ENABLED
468
+ #include "stm32f4xx_hal_mmc.h"
469
+#endif /* HAL_MMC_MODULE_ENABLED */
470
+
471
+/* Exported macro ------------------------------------------------------------*/
472
+#ifdef  USE_FULL_ASSERT
473
+/**
474
+  * @brief  The assert_param macro is used for function's parameters check.
475
+  * @param  expr If expr is false, it calls assert_failed function
476
+  *         which reports the name of the source file and the source
477
+  *         line number of the call that failed.
478
+  *         If expr is true, it returns no value.
479
+  * @retval None
480
+  */
481
+  #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
482
+/* Exported functions ------------------------------------------------------- */
483
+  void assert_failed(uint8_t *file, uint32_t line);
484
+#else
485
+  #define assert_param(expr) ((void)0U)
486
+#endif /* USE_FULL_ASSERT */
487
+
488
+
489
+#ifdef __cplusplus
490
+}
491
+#endif
492
+
493
+#endif /* __STM32F4xx_HAL_CONF_H */
494
+
495
+
496
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 203
- 0
buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/ldscript.ld 查看文件

@@ -0,0 +1,203 @@
1
+/*
2
+******************************************************************************
3
+**
4
+**  File        : LinkerScript.ld
5
+**
6
+**  Abstract    : Linker script for STM32F4x7Vx Device with
7
+**                512/1024KByte FLASH, 192KByte RAM
8
+**
9
+**                Set heap size, stack size and stack location according
10
+**                to application requirements.
11
+**
12
+**                Set memory bank area and size if external memory is used.
13
+**
14
+**  Target      : STMicroelectronics STM32
15
+**
16
+**  Distribution: The file is distributed “as is,” without any warranty
17
+**                of any kind.
18
+**
19
+*****************************************************************************
20
+** @attention
21
+**
22
+** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
23
+**
24
+** Redistribution and use in source and binary forms, with or without modification,
25
+** are permitted provided that the following conditions are met:
26
+**   1. Redistributions of source code must retain the above copyright notice,
27
+**      this list of conditions and the following disclaimer.
28
+**   2. Redistributions in binary form must reproduce the above copyright notice,
29
+**      this list of conditions and the following disclaimer in the documentation
30
+**      and/or other materials provided with the distribution.
31
+**   3. Neither the name of STMicroelectronics nor the names of its contributors
32
+**      may be used to endorse or promote products derived from this software
33
+**      without specific prior written permission.
34
+**
35
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
36
+** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37
+** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38
+** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
39
+** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
40
+** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
41
+** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
42
+** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
43
+** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
44
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45
+**
46
+*****************************************************************************
47
+*/
48
+
49
+/* Entry Point */
50
+ENTRY(Reset_Handler)
51
+
52
+/* Highest address of the user mode stack */
53
+_estack = 0x20000000 + LD_MAX_DATA_SIZE;    /* end of RAM */
54
+/* Generate a link error if heap and stack don't fit into RAM */
55
+_Min_Heap_Size = 0x200;  /* required amount of heap  */
56
+_Min_Stack_Size = 0x400; /* required amount of stack */
57
+
58
+/* Specify the memory areas */
59
+MEMORY
60
+{
61
+RAM (xrw)   : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
62
+CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
63
+FLASH (rx)  : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
64
+}
65
+
66
+/* Define output sections */
67
+SECTIONS
68
+{
69
+  /* The startup code goes first into FLASH */
70
+  .isr_vector :
71
+  {
72
+    . = ALIGN(4);
73
+    KEEP(*(.isr_vector)) /* Startup code */
74
+    . = ALIGN(4);
75
+  } >FLASH
76
+
77
+  /* The program code and other data goes into FLASH */
78
+  .text :
79
+  {
80
+    . = ALIGN(4);
81
+    *(.text)           /* .text sections (code) */
82
+    *(.text*)          /* .text* sections (code) */
83
+    *(.glue_7)         /* glue arm to thumb code */
84
+    *(.glue_7t)        /* glue thumb to arm code */
85
+    *(.eh_frame)
86
+
87
+    KEEP (*(.init))
88
+    KEEP (*(.fini))
89
+
90
+    . = ALIGN(4);
91
+    _etext = .;        /* define a global symbols at end of code */
92
+  } >FLASH
93
+
94
+  /* Constant data goes into FLASH */
95
+  .rodata :
96
+  {
97
+    . = ALIGN(4);
98
+    *(.rodata)         /* .rodata sections (constants, strings, etc.) */
99
+    *(.rodata*)        /* .rodata* sections (constants, strings, etc.) */
100
+    . = ALIGN(4);
101
+  } >FLASH
102
+
103
+  .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
104
+  .ARM : {
105
+    __exidx_start = .;
106
+    *(.ARM.exidx*)
107
+    __exidx_end = .;
108
+  } >FLASH
109
+
110
+  .preinit_array     :
111
+  {
112
+    PROVIDE_HIDDEN (__preinit_array_start = .);
113
+    KEEP (*(.preinit_array*))
114
+    PROVIDE_HIDDEN (__preinit_array_end = .);
115
+  } >FLASH
116
+  .init_array :
117
+  {
118
+    PROVIDE_HIDDEN (__init_array_start = .);
119
+    KEEP (*(SORT(.init_array.*)))
120
+    KEEP (*(.init_array*))
121
+    PROVIDE_HIDDEN (__init_array_end = .);
122
+  } >FLASH
123
+  .fini_array :
124
+  {
125
+    PROVIDE_HIDDEN (__fini_array_start = .);
126
+    KEEP (*(SORT(.fini_array.*)))
127
+    KEEP (*(.fini_array*))
128
+    PROVIDE_HIDDEN (__fini_array_end = .);
129
+  } >FLASH
130
+
131
+  /* used by the startup to initialize data */
132
+  _sidata = LOADADDR(.data);
133
+
134
+  /* Initialized data sections goes into RAM, load LMA copy after code */
135
+  .data :
136
+  {
137
+    . = ALIGN(4);
138
+    _sdata = .;        /* create a global symbol at data start */
139
+    *(.data)           /* .data sections */
140
+    *(.data*)          /* .data* sections */
141
+
142
+    . = ALIGN(4);
143
+    _edata = .;        /* define a global symbol at data end */
144
+  } >RAM AT> FLASH
145
+
146
+  _siccmram = LOADADDR(.ccmram);
147
+
148
+  /* CCM-RAM section
149
+  *
150
+  * IMPORTANT NOTE!
151
+  * If initialized variables will be placed in this section,
152
+  * the startup code needs to be modified to copy the init-values.
153
+  */
154
+  .ccmram :
155
+  {
156
+    . = ALIGN(4);
157
+    _sccmram = .;       /* create a global symbol at ccmram start */
158
+    *(.ccmram)
159
+    *(.ccmram*)
160
+
161
+    . = ALIGN(4);
162
+    _eccmram = .;       /* create a global symbol at ccmram end */
163
+  } >CCMRAM AT> FLASH
164
+
165
+
166
+  /* Uninitialized data section */
167
+  . = ALIGN(4);
168
+  .bss :
169
+  {
170
+    /* This is used by the startup in order to initialize the .bss section */
171
+    _sbss = .;         /* define a global symbol at bss start */
172
+    __bss_start__ = _sbss;
173
+    *(.bss)
174
+    *(.bss*)
175
+    *(COMMON)
176
+
177
+    . = ALIGN(4);
178
+    _ebss = .;         /* define a global symbol at bss end */
179
+    __bss_end__ = _ebss;
180
+  } >RAM
181
+
182
+  /* User_heap_stack section, used to check that there is enough RAM left */
183
+  ._user_heap_stack :
184
+  {
185
+    . = ALIGN(8);
186
+    PROVIDE ( end = . );
187
+    PROVIDE ( _end = . );
188
+    . = . + _Min_Heap_Size;
189
+    . = . + _Min_Stack_Size;
190
+    . = ALIGN(8);
191
+  } >RAM
192
+
193
+
194
+  /* Remove information from the standard libraries */
195
+  /DISCARD/ :
196
+  {
197
+    libc.a ( * )
198
+    libm.a ( * )
199
+    libgcc.a ( * )
200
+  }
201
+
202
+  .ARM.attributes 0 : { *(.ARM.attributes) }
203
+}

+ 288
- 0
buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/variant.cpp 查看文件

@@ -0,0 +1,288 @@
1
+/*
2
+ *******************************************************************************
3
+ * Copyright (c) 2017, STMicroelectronics
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are met:
8
+ *
9
+ * 1. Redistributions of source code must retain the above copyright notice,
10
+ *    this list of conditions and the following disclaimer.
11
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ *    this list of conditions and the following disclaimer in the documentation
13
+ *    and/or other materials provided with the distribution.
14
+ * 3. Neither the name of STMicroelectronics nor the names of its contributors
15
+ *    may be used to endorse or promote products derived from this software
16
+ *    without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *******************************************************************************
29
+ */
30
+
31
+#include "pins_arduino.h"
32
+
33
+#ifdef __cplusplus
34
+extern "C" {
35
+#endif
36
+
37
+
38
+// Digital PinName array
39
+const PinName digitalPin[] = {
40
+  PA_0,  // Digital pin 0
41
+  PA_1,  // Digital pin 1
42
+  PA_2,  // Digital pin 2
43
+  PA_3,  // Digital pin 3
44
+  PA_4,  // Digital pin 4
45
+  PA_5,  // Digital pin 5
46
+  PA_6,  // Digital pin 6
47
+  PA_7,  // Digital pin 7
48
+  PA_8,  // Digital pin 8
49
+  PA_9,  // Digital pin 9
50
+  PA_10, // Digital pin 10
51
+  PA_11, // Digital pin 11
52
+  PA_12, // Digital pin 12
53
+  PA_13, // Digital pin 13
54
+  PA_14, // Digital pin 14
55
+  PA_15, // Digital pin 15
56
+
57
+  PB_0,  // Digital pin 16
58
+  PB_1,  // Digital pin 17
59
+  PB_2,  // Digital pin 18
60
+  PB_3,  // Digital pin 19
61
+  PB_4,  // Digital pin 20
62
+  PB_5,  // Digital pin 21
63
+  PB_6,  // Digital pin 22
64
+  PB_7,  // Digital pin 23
65
+  PB_8,  // Digital pin 24
66
+  PB_9,  // Digital pin 25
67
+  PB_10, // Digital pin 26
68
+  PB_11, // Digital pin 27
69
+  PB_12, // Digital pin 28
70
+  PB_13, // Digital pin 29
71
+  PB_14, // Digital pin 30
72
+  PB_15, // Digital pin 31
73
+
74
+  PC_0,  // Digital pin 32
75
+  PC_1,  // Digital pin 33
76
+  PC_2,  // Digital pin 34
77
+  PC_3,  // Digital pin 35
78
+  PC_4,  // Digital pin 36
79
+  PC_5,  // Digital pin 37
80
+  PC_6,  // Digital pin 38
81
+  PC_7,  // Digital pin 39
82
+  PC_8,  // Digital pin 40
83
+  PC_9,  // Digital pin 41
84
+  PC_10, // Digital pin 42
85
+  PC_11, // Digital pin 43
86
+  PC_12, // Digital pin 44
87
+  PC_13, // Digital pin 45
88
+  PC_14, // Digital pin 46
89
+  PC_15, // Digital pin 47
90
+
91
+  PD_0,  // Digital pin 48
92
+  PD_1,  // Digital pin 49
93
+  PD_2,  // Digital pin 50
94
+  PD_3,  // Digital pin 51
95
+  PD_4,  // Digital pin 52
96
+  PD_5,  // Digital pin 53
97
+  PD_6,  // Digital pin 54
98
+  PD_7,  // Digital pin 55
99
+  PD_8,  // Digital pin 56
100
+  PD_9,  // Digital pin 57
101
+  PD_10, // Digital pin 58
102
+  PD_11, // Digital pin 59
103
+  PD_12, // Digital pin 60
104
+  PD_13, // Digital pin 61
105
+  PD_14, // Digital pin 62
106
+  PD_15, // Digital pin 63
107
+
108
+  PE_0,  // Digital pin 64
109
+  PE_1,  // Digital pin 65
110
+  PE_2,  // Digital pin 66
111
+  PE_3,  // Digital pin 67
112
+  PE_4,  // Digital pin 68
113
+  PE_5,  // Digital pin 69
114
+  PE_6,  // Digital pin 70
115
+  PE_7,  // Digital pin 71
116
+  PE_8,  // Digital pin 72
117
+  PE_9,  // Digital pin 73
118
+  PE_10, // Digital pin 74
119
+  PE_11, // Digital pin 75
120
+  PE_12, // Digital pin 76
121
+  PE_13, // Digital pin 77
122
+  PE_14, // Digital pin 78
123
+  PE_15, // Digital pin 79
124
+
125
+  PH_0,  // Digital pin 80, used by the external oscillator
126
+  PH_1   // Digital pin 81, used by the external oscillator
127
+};
128
+
129
+// Analog (Ax) pin number array
130
+const uint32_t analogInputPin[] = {
131
+  0,  // A0,  PA0
132
+  1,  // A1,  PA1
133
+  2,  // A2,  PA2
134
+  3,  // A3,  PA3
135
+  4,  // A4,  PA4
136
+  5,  // A5,  PA5
137
+  6,  // A6,  PA6
138
+  7,  // A7,  PA7
139
+  16, // A8,  PB0
140
+  17, // A9,  PB1
141
+  32, // A10, PC0
142
+  33, // A11, PC1
143
+  34, // A12, PC2
144
+  35, // A13, PC3
145
+  36, // A14, PC4
146
+  37  // A15, PC5
147
+};
148
+
149
+#ifdef __cplusplus
150
+}
151
+#endif
152
+
153
+// ----------------------------------------------------------------------------
154
+
155
+#ifdef __cplusplus
156
+extern "C" {
157
+#endif
158
+
159
+/*
160
+ * @brief  Configures the System clock source, PLL Multiplier and Divider factors,
161
+ *               AHB/APBx prescalers and Flash settings
162
+ * @note   This function should be called only once the RCC clock configuration
163
+ *         is reset to the default reset state (done in SystemInit() function).
164
+ * @param  None
165
+ * @retval None
166
+ */
167
+
168
+/******************************************************************************/
169
+/*            PLL (clocked by HSE) used as System clock source                */
170
+/******************************************************************************/
171
+static uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
172
+{
173
+  RCC_OscInitTypeDef RCC_OscInitStruct;
174
+  RCC_ClkInitTypeDef RCC_ClkInitStruct;
175
+
176
+  /* The voltage scaling allows optimizing the power consumption when the device is
177
+  clocked below the maximum system frequency, to update the voltage scaling value
178
+  regarding system frequency refer to product datasheet. */
179
+  __HAL_RCC_PWR_CLK_ENABLE();
180
+  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
181
+
182
+  // Enable HSE oscillator and activate PLL with HSE as source
183
+  RCC_OscInitStruct.OscillatorType      = RCC_OSCILLATORTYPE_HSE;
184
+  if (bypass == 0) {
185
+    RCC_OscInitStruct.HSEState          = RCC_HSE_ON; // External 8 MHz xtal on OSC_IN/OSC_OUT
186
+  } else {
187
+    RCC_OscInitStruct.HSEState          = RCC_HSE_BYPASS; // External 8 MHz clock on OSC_IN
188
+  }
189
+
190
+  RCC_OscInitStruct.PLL.PLLState        = RCC_PLL_ON;
191
+  RCC_OscInitStruct.PLL.PLLSource       = RCC_PLLSOURCE_HSE;
192
+  RCC_OscInitStruct.PLL.PLLM            = HSE_VALUE / 1000000L; // Expects an 8 MHz external clock by default. Redefine HSE_VALUE if not
193
+  RCC_OscInitStruct.PLL.PLLN            = 336;                  // VCO output clock = 336 MHz (1 MHz * 336)
194
+  RCC_OscInitStruct.PLL.PLLP            = RCC_PLLP_DIV2;        // PLLCLK = 168 MHz (336 MHz / 2)
195
+  RCC_OscInitStruct.PLL.PLLQ            = 7;
196
+  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
197
+    return 0; // FAIL
198
+  }
199
+
200
+  // Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers
201
+  RCC_ClkInitStruct.ClockType      = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
202
+  RCC_ClkInitStruct.SYSCLKSource   = RCC_SYSCLKSOURCE_PLLCLK;
203
+  RCC_ClkInitStruct.AHBCLKDivider  = RCC_SYSCLK_DIV1;         // 168 MHz
204
+  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;           // 42 MHz
205
+  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;           // 84 MHz
206
+  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
207
+    return 0; // FAIL
208
+  }
209
+
210
+  /* Output clock on MCO1 pin(PA8) for debugging purpose */
211
+  /*
212
+  if (bypass == 0)
213
+    HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_2); // 4 MHz
214
+  else
215
+    HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1); // 8 MHz
216
+  */
217
+
218
+  return 1; // OK
219
+}
220
+
221
+/******************************************************************************/
222
+/*            PLL (clocked by HSI) used as System clock source                */
223
+/******************************************************************************/
224
+uint8_t SetSysClock_PLL_HSI(void)
225
+{
226
+  RCC_OscInitTypeDef RCC_OscInitStruct;
227
+  RCC_ClkInitTypeDef RCC_ClkInitStruct;
228
+
229
+  /* The voltage scaling allows optimizing the power consumption when the device is
230
+    clocked below the maximum system frequency, to update the voltage scaling value
231
+    regarding system frequency refer to product datasheet. */
232
+  __HAL_RCC_PWR_CLK_ENABLE();
233
+  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
234
+
235
+  // Enable HSI oscillator and activate PLL with HSI as source
236
+  RCC_OscInitStruct.OscillatorType      = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
237
+  RCC_OscInitStruct.HSIState            = RCC_HSI_ON;
238
+  RCC_OscInitStruct.HSEState            = RCC_HSE_OFF;
239
+  RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
240
+  RCC_OscInitStruct.PLL.PLLState        = RCC_PLL_ON;
241
+  RCC_OscInitStruct.PLL.PLLSource       = RCC_PLLSOURCE_HSI;
242
+  RCC_OscInitStruct.PLL.PLLM            = 16;            // VCO input clock = 1 MHz (16 MHz / 16)
243
+  RCC_OscInitStruct.PLL.PLLN            = 336;           // VCO output clock = 336 MHz (1 MHz * 336)
244
+  RCC_OscInitStruct.PLL.PLLP            = RCC_PLLP_DIV2; // PLLCLK = 168 MHz (336 MHz / 2)
245
+  RCC_OscInitStruct.PLL.PLLQ            = 7;
246
+  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
247
+    return 0; // FAIL
248
+  }
249
+
250
+  /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers */
251
+  RCC_ClkInitStruct.ClockType      = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);
252
+  RCC_ClkInitStruct.SYSCLKSource   = RCC_SYSCLKSOURCE_PLLCLK;
253
+  RCC_ClkInitStruct.AHBCLKDivider  = RCC_SYSCLK_DIV1;         // 168 MHz
254
+  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;           // 42 MHz
255
+  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;           // 84 MHz
256
+  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) {
257
+    return 0; // FAIL
258
+  }
259
+
260
+  /* Output clock on MCO1 pin(PA8) for debugging purpose */
261
+  //HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1); // 16 MHz
262
+
263
+  return 1; // OK
264
+}
265
+
266
+WEAK void SystemClock_Config(void)
267
+{
268
+  /* 1- If fail try to start with HSE and external xtal */
269
+  if (SetSysClock_PLL_HSE(0) == 0) {
270
+    /* 2- Try to start with HSE and external clock */
271
+    if (SetSysClock_PLL_HSE(1) == 0) {
272
+      /* 3- If fail start with HSI clock */
273
+      if (SetSysClock_PLL_HSI() == 0) {
274
+        Error_Handler();
275
+      }
276
+    }
277
+  }
278
+
279
+  /* Ensure CCM RAM clock is enabled */
280
+  __HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
281
+
282
+  /* Output clock on MCO2 pin(PC9) for debugging purpose */
283
+  //HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4);
284
+}
285
+
286
+#ifdef __cplusplus
287
+}
288
+#endif

+ 196
- 0
buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/variant.h 查看文件

@@ -0,0 +1,196 @@
1
+/*
2
+ *******************************************************************************
3
+ * Copyright (c) 2017, STMicroelectronics
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are met:
8
+ *
9
+ * 1. Redistributions of source code must retain the above copyright notice,
10
+ *    this list of conditions and the following disclaimer.
11
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ *    this list of conditions and the following disclaimer in the documentation
13
+ *    and/or other materials provided with the distribution.
14
+ * 3. Neither the name of STMicroelectronics nor the names of its contributors
15
+ *    may be used to endorse or promote products derived from this software
16
+ *    without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *******************************************************************************
29
+ */
30
+#pragma once
31
+
32
+#ifdef __cplusplus
33
+extern "C" {
34
+#endif // __cplusplus
35
+// 
36
+/*----------------------------------------------------------------------------
37
+ *        Pins
38
+ *----------------------------------------------------------------------------*/
39
+                      // | DIGITAL | ANALOG IN  | ANALOG OUT | UART/USART            | TWI                  | SPI                               | SPECIAL   |
40
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
41
+#define PA0  PIN_A0   // | 0       | A0 (ADC1)  |            | UART4_TX              |                      |                                   |           |
42
+#define PA1  PIN_A1   // | 1       | A1 (ADC1)  |            | UART4_RX              |                      |                                   |           |
43
+#define PA2  PIN_A2   // | 2       | A2 (ADC1)  |            | USART2_TX             |                      |                                   |           |
44
+#define PA3  PIN_A3   // | 3       | A3 (ADC1)  |            | USART2_RX             |                      |                                   |           |
45
+#define PA4  PIN_A4   // | 4       | A4 (ADC1)  | DAC_OUT1   |                       |                      | SPI1_SS, (SPI3_SS)                |           |
46
+#define PA5  PIN_A5   // | 5       | A5 (ADC1)  | DAC_OUT2   |                       |                      | SPI1_SCK                          |           |
47
+#define PA6  PIN_A6   // | 6       | A6 (ADC1)  |            |                       |                      | SPI1_MISO                         |           |
48
+#define PA7  PIN_A7   // | 7       | A7 (ADC1)  |            |                       |                      | SPI1_MOSI                         |           |
49
+#define PA8  8        // | 8       |            |            |                       | TWI3_SCL             |                                   |           |
50
+#define PA9  9        // | 9       |            |            | USART1_TX             |                      |                                   |           |
51
+#define PA10 10       // | 10      |            |            | USART1_RX             |                      |                                   |           |
52
+#define PA11 11       // | 11      |            |            |                       |                      |                                   |           |
53
+#define PA12 12       // | 12      |            |            |                       |                      |                                   |           |
54
+#define PA13 13       // | 13      |            |            |                       |                      |                                   | SWD_SWDIO |
55
+#define PA14 14       // | 14      |            |            |                       |                      |                                   | SWD_SWCLK |
56
+#define PA15 15       // | 15      |            |            |                       |                      | SPI3_SS, (SPI1_SS)                |           |
57
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
58
+#define PB0  PIN_A8   // | 16      | A8 (ADC1)  |            |                       |                      |                                   |           |
59
+#define PB1  PIN_A9   // | 17      | A9 (ADC1)  |            |                       |                      |                                   |           |
60
+#define PB2  18       // | 18      |            |            |                       |                      |                                   | BOOT1     |
61
+#define PB3  19       // | 19      |            |            |                       |                      | SPI3_SCK,  (SPI1_SCK)             |           |
62
+#define PB4  20       // | 20      |            |            |                       |                      | SPI3_MISO, (SPI1_MISO)            |           |
63
+#define PB5  21       // | 21      |            |            |                       |                      | SPI3_MOSI, (SPI1_MOSI)            |           |
64
+#define PB6  22       // | 22      |            |            | USART1_TX             | TWI1_SCL             |                                   |           |
65
+#define PB7  23       // | 23      |            |            | USART1_RX             | TWI1_SDA             |                                   |           |
66
+#define PB8  24       // | 24      |            |            |                       | TWI1_SCL             |                                   |           |
67
+#define PB9  25       // | 25      |            |            |                       | TWI1_SDA             | SPI2_SS                           |           |
68
+#define PB10 26       // | 26      |            |            | USART3_TX, (UART4_TX) | TWI2_SCL             | SPI2_SCK                          |           |
69
+#define PB11 27       // | 27      |            |            | USART3_RX             | TWI2_SDA             |                                   |           |
70
+#define PB12 28       // | 28      |            |            |                       |                      | SPI2_SS                           |           |
71
+#define PB13 29       // | 29      |            |            |                       |                      | SPI2_SCK                          |           |
72
+#define PB14 30       // | 30      |            |            |                       |                      | SPI2_MISO                         |           |
73
+#define PB15 31       // | 31      |            |            |                       |                      | SPI2_MOSI                         |           |
74
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
75
+#define PC0  PIN_A10  // | 32      | A10 (ADC1) |            |                       |                      |                                   |           |
76
+#define PC1  PIN_A11  // | 33      | A11 (ADC1) |            |                       |                      |                                   |           |
77
+#define PC2  PIN_A12  // | 34      | A12 (ADC1) |            |                       |                      | SPI2_MISO                         |           |
78
+#define PC3  PIN_A13  // | 35      | A13 (ADC1) |            |                       |                      | SPI2_MOSI                         |           |
79
+#define PC4  PIN_A14  // | 36      | A14 (ADC1) |            |                       |                      |                                   |           |
80
+#define PC5  PIN_A15  // | 37      | A15 (ADC1) |            | USART3_RX             |                      |                                   |           |
81
+#define PC6  38       // | 38      |            |            | USART6_TX             |                      |                                   |           |
82
+#define PC7  39       // | 39      |            |            | USART6_RX             |                      |                                   |           |
83
+#define PC8  40       // | 40      |            |            |                       |                      |                                   |           |
84
+#define PC9  41       // | 41      |            |            | USART3_TX             | TWI3_SDA             |                                   |           |
85
+#define PC10 42       // | 42      |            |            |                       |                      | SPI3_SCK                          |           |
86
+#define PC11 43       // | 43      |            |            | USART3_RX, (UART4_RX) |                      | SPI3_MISO                         |           |
87
+#define PC12 44       // | 44      |            |            | UART5_TX              |                      | SPI3_MOSI                         |           |
88
+#define PC13 45       // | 45      |            |            |                       |                      |                                   |           |
89
+#define PC14 46       // | 46      |            |            |                       |                      |                                   | OSC32_IN  |
90
+#define PC15 47       // | 47      |            |            |                       |                      |                                   | OSC32_OUT |
91
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
92
+#define PD0  48       // | 48      |            |            |                       |                      |                                   |           |
93
+#define PD1  49       // | 49      |            |            |                       |                      |                                   |           |
94
+#define PD2  50       // | 50      |            |            | UART5_RX              |                      |                                   |           |
95
+#define PD3  51       // | 51      |            |            |                       |                      |                                   |           |
96
+#define PD4  52       // | 52      |            |            |                       |                      |                                   |           |
97
+#define PD5  53       // | 53      |            |            | USART2_TX             |                      |                                   |           |
98
+#define PD6  54       // | 54      |            |            | USART2_RX             |                      |                                   |           |
99
+#define PD7  55       // | 55      |            |            |                       |                      |                                   |           |
100
+#define PD8  56       // | 56      |            |            | USART3_TX             |                      |                                   |           |
101
+#define PD9  57       // | 57      |            |            | USART3_RX             |                      |                                   |           |
102
+#define PD10 58       // | 58      |            |            |                       |                      |                                   |           |
103
+#define PD11 59       // | 59      |            |            |                       |                      |                                   |           |
104
+#define PD12 60       // | 60      |            |            |                       |                      |                                   |           |
105
+#define PD13 61       // | 61      |            |            |                       |                      |                                   |           |
106
+#define PD14 62       // | 62      |            |            |                       |                      |                                   |           |
107
+#define PD15 63       // | 63      |            |            |                       |                      |                                   |           |
108
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
109
+#define PE0  64       // | 64      |            |            |                       |                      |                                   |           |
110
+#define PE1  65       // | 65      |            |            |                       |                      |                                   |           |
111
+#define PE2  66       // | 66      |            |            |                       |                      |                                   |           |
112
+#define PE3  67       // | 67      |            |            |                       |                      |                                   |           |
113
+#define PE4  68       // | 68      |            |            |                       |                      |                                   |           |
114
+#define PE5  69       // | 69      |            |            |                       |                      |                                   |           |
115
+#define PE6  70       // | 70      |            |            |                       |                      |                                   |           |
116
+#define PE7  71       // | 71      |            |            |                       |                      |                                   |           |
117
+#define PE8  72       // | 72      |            |            |                       |                      |                                   |           |
118
+#define PE9  73       // | 73      |            |            |                       |                      |                                   |           |
119
+#define PE10 74       // | 74      |            |            |                       |                      |                                   |           |
120
+#define PE11 75       // | 75      |            |            |                       |                      |                                   |           |
121
+#define PE12 76       // | 76      |            |            |                       |                      |                                   |           |
122
+#define PE13 77       // | 77      |            |            |                       |                      |                                   |           |
123
+#define PE14 78       // | 78      |            |            |                       |                      |                                   |           |
124
+#define PE15 79       // | 79      |            |            |                       |                      |                                   |           |
125
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
126
+#define PH0  80       // | 80      |            |            |                       |                      |                                   | OSC_IN    |
127
+#define PH1  81       // | 81      |            |            |                       |                      |                                   | OSC_OUT   |
128
+                      // |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------|
129
+
130
+// This must be a literal
131
+#define NUM_DIGITAL_PINS        82
132
+#define NUM_ANALOG_INPUTS       16
133
+
134
+// Below SPI and I2C definitions already done in the core
135
+// Could be redefined here if differs from the default one
136
+// SPI Definitions
137
+#define PIN_SPI_SS              PC9
138
+#define PIN_SPI_SCK             PC10
139
+#define PIN_SPI_MISO            PC11
140
+#define PIN_SPI_MOSI            PC12
141
+
142
+// I2C Definitions
143
+#define PIN_WIRE_SCL            PB8
144
+#define PIN_WIRE_SDA            PB9
145
+
146
+// Timer Definitions
147
+// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c
148
+// TIM1 = HEATER0, HEATER1, [SERVO]
149
+// TIM2 = FAN1, FAN2, [BEEPER]
150
+// TIM4 = HEATER_BED
151
+// TIM5 = HEATER2, FAN0
152
+// Uses default for STM32F4xx STEP_TIMER 6 and TEMP_TIMER 14
153
+#define TIMER_SERVO             TIM1  // TIMER_SERVO must be defined in this file
154
+#define TIMER_TONE              TIM2  // TIMER_TONE must be defined in this file
155
+#define TIMER_SERIAL            TIM3  // TIMER_SERIAL must be defined in this file
156
+
157
+// USART1 (direct to RK3328 SoC)
158
+#define ENABLE_HWSERIAL1
159
+#define PIN_SERIAL1_TX           PA9
160
+#define PIN_SERIAL1_RX          PA10
161
+
162
+// USART3 connector
163
+#define ENABLE_HWSERIAL3
164
+#define PIN_SERIAL3_TX          PB10
165
+#define PIN_SERIAL3_RX          PB11
166
+
167
+#ifdef __cplusplus
168
+} // extern "C"
169
+#endif
170
+/*----------------------------------------------------------------------------
171
+ *        Arduino objects - C++ only
172
+ *----------------------------------------------------------------------------*/
173
+
174
+#ifdef __cplusplus
175
+// These serial port names are intended to allow libraries and architecture-neutral
176
+// sketches to automatically default to the correct port name for a particular type
177
+// of use.  For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
178
+// the first hardware serial port whose RX/TX pins are not dedicated to another use.
179
+//
180
+// SERIAL_PORT_MONITOR        Port which normally prints to the Arduino Serial Monitor
181
+//
182
+// SERIAL_PORT_USBVIRTUAL     Port which is USB virtual serial
183
+//
184
+// SERIAL_PORT_LINUXBRIDGE    Port which connects to a Linux system via Bridge library
185
+//
186
+// SERIAL_PORT_HARDWARE       Hardware serial port, physical RX & TX pins.
187
+//
188
+// SERIAL_PORT_HARDWARE_OPEN  Hardware serial ports which are open for use.  Their RX & TX
189
+//                            pins are NOT connected to anything by default.
190
+#define SERIAL_PORT_MONITOR         Serial1
191
+#define SERIAL_PORT_USBVIRTUAL      SerialUSB
192
+#define SERIAL_PORT_HARDWARE        Serial1
193
+#define SERIAL_PORT_HARDWARE1       Serial3
194
+#define SERIAL_PORT_HARDWARE_OPEN   Serial1
195
+#define SERIAL_PORT_HARDWARE_OPEN1  Serial3
196
+#endif

+ 16
- 1
ini/stm32f4.ini 查看文件

@@ -47,7 +47,6 @@ board               = marlin_STM32F407ZGT6
47 47
 board_build.variant = MARLIN_FLY_F407ZG
48 48
 board_build.offset  = 0x8000
49 49
 upload_protocol     = dfu
50
-
51 50
 #
52 51
 # FYSETC S6 (STM32F446RET6 ARM Cortex-M4)
53 52
 #
@@ -684,3 +683,19 @@ build_flags                 = ${stm32_variant.build_flags}
684 683
                               -DSTEP_TIMER_IRQ_PRIO=0
685 684
 upload_protocol             = stlink
686 685
 debug_tool                  = stlink
686
+
687
+#
688
+# MKS SKIPR v1.0 all-in-one board (STM32F407VE)
689
+#
690
+[env:mks_skipr_v1]
691
+extends                     = stm32_variant
692
+board                       = marlin_MKS_SKIPR_V1
693
+board_build.rename          = mks_skipr.bin
694
+
695
+[env:mks_skipr_v1_nobootloader]
696
+extends                     = env:mks_skipr_v1
697
+board_build.rename          = firmware.bin
698
+board_build.offset          = 0x0000
699
+board_upload.offset_address = 0x08000000
700
+upload_protocol             = dfu
701
+upload_command              = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE"

Loading…
取消
儲存