Przeglądaj źródła

Malyan M300 support (#17421)

Scott Lahteine 4 lat temu
rodzic
commit
f94ab84dac
No account linked to committer's email address

+ 1
- 0
.github/workflows/test-builds.yml Wyświetl plik

@@ -57,6 +57,7 @@ jobs:
57 57
         - mks_robin
58 58
         - ARMED
59 59
         - FYSETC_S6
60
+        - malyan_M300
60 61
 
61 62
         # Put lengthy tests last
62 63
 

+ 1
- 0
Marlin/src/core/boards.h Wyświetl plik

@@ -300,6 +300,7 @@
300 300
 #define BOARD_GTM32_REV_B             4023  // STM32F103VET6 controller
301 301
 #define BOARD_MKS_ROBIN_E3D           4024  // MKS Robin E3D(STM32F103RCT6)
302 302
 #define BOARD_MKS_ROBIN_E3            4025  // MKS Robin E3(STM32F103RCT6)
303
+#define BOARD_MALYAN_M300             4026  // STM32F070-based delta
303 304
 
304 305
 //
305 306
 // ARM Cortex-M4F

+ 6
- 0
Marlin/src/pins/pins.h Wyświetl plik

@@ -465,6 +465,12 @@
465 465
   #include "sam/pins_CNCONTROLS_15D.h"          // SAM3X8E                                env:DUE env:DUE_USB
466 466
 
467 467
 //
468
+// STM32 ARM Cortex-M0
469
+//
470
+#elif MB(MALYAN_M300)
471
+  #include "stm32f0/pins_MALYAN_M300.h"         // STM32F070                              env:malyan_M300
472
+
473
+//
468 474
 // STM32 ARM Cortex-M3
469 475
 //
470 476
 

+ 88
- 0
Marlin/src/pins/stm32f0/pins_MALYAN_M300.h Wyświetl plik

@@ -0,0 +1,88 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#pragma once
24
+
25
+#if NONE(__STM32F1__, STM32F1xx, STM32F0xx)
26
+  #error "Oops! Select a 'Malyan M300' board in 'Tools > Board.'"
27
+#endif
28
+
29
+#define BOARD_INFO_NAME "Malyan M300"
30
+
31
+//
32
+// EEPROM Emulation
33
+//
34
+#define FLASH_EEPROM_EMULATION
35
+
36
+//
37
+// SD CARD SPI
38
+//
39
+#define SDSS                              SS_PIN
40
+
41
+//
42
+// Timers
43
+//
44
+#undef STEP_TIMER
45
+#undef TEMP_TIMER
46
+#define STEP_TIMER 6
47
+#define TEMP_TIMER 7
48
+
49
+//
50
+// Limit Switches
51
+//
52
+#define X_MAX_PIN                           PC13
53
+#define Y_MAX_PIN                           PC14
54
+#define Z_MAX_PIN                           PC15
55
+#define Z_MIN_PIN                           PB7
56
+
57
+//
58
+// Steppers
59
+//
60
+#define X_STEP_PIN                          PB14
61
+#define X_DIR_PIN                           PB13
62
+#define X_ENABLE_PIN                        PB10
63
+
64
+#define Y_STEP_PIN                          PB12
65
+#define Y_DIR_PIN                           PB11
66
+#define Y_ENABLE_PIN                        PB10
67
+
68
+#define Z_STEP_PIN                          PB2
69
+#define Z_DIR_PIN                           PB1
70
+#define Z_ENABLE_PIN                        PB10
71
+
72
+#define E0_STEP_PIN                         PA7
73
+#define E0_DIR_PIN                          PA6
74
+#define E0_ENABLE_PIN                       PB0
75
+
76
+//
77
+// Temperature Sensors
78
+//
79
+#define TEMP_0_PIN                          PA0   // Analog Input (HOTEND0 thermistor)
80
+#define TEMP_BED_PIN                        PA4   // Analog Input (BED thermistor)
81
+
82
+//
83
+// Heaters / Fans
84
+//
85
+#define HEATER_0_PIN                        PA1   // HOTEND0 MOSFET
86
+#define HEATER_BED_PIN                      PA5   // BED MOSFET
87
+
88
+#define AUTO_FAN_PIN                        PA8

+ 14
- 0
buildroot/share/tests/malyan_M300-tests Wyświetl plik

@@ -0,0 +1,14 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Build tests for STM32F070CB Malyan M300
4
+#
5
+
6
+# exit on first failure
7
+set -e
8
+
9
+use_example_configs "delta/Malyan M300"
10
+opt_disable AUTO_BED_LEVELING_3POINT
11
+exec_test $1 $2 "Malyan M300 (delta)"
12
+
13
+# cleanup
14
+restore_configs

+ 12
- 0
platformio.ini Wyświetl plik

@@ -611,6 +611,18 @@ src_filter  = ${common.default_src_filter} +<src/HAL/STM32F1>
611 611
 lib_ignore  = Adafruit NeoPixel, LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-HAL, SPI
612 612
 
613 613
 #
614
+# Malyan M300 (STM32F070CB)
615
+#
616
+[env:malyan_M300]
617
+platform    = ststm32@>=6.1.0
618
+board       = malyanm300_f070cb
619
+build_flags = ${common.build_flags}
620
+    -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
621
+    -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
622
+src_filter  = ${common.default_src_filter} +<src/HAL/STM32>
623
+lib_ignore  = U8glib, LiquidCrystal_I2C, LiquidCrystal, NewliquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, Servo(STM32F1), TMC26XStepper, U8glib-HAL
624
+
625
+#
614 626
 # Chitu boards like Tronxy X5s (STM32F103ZET6)
615 627
 #
616 628
 [env:chitu_f103]

Ładowanie…
Anuluj
Zapisz