Przeglądaj źródła

🔨 Creality v4 with STM32 HAL (#21999)

- New STM32 env for Creality V4 boards.
- Separate Libmaple targets into their own `ini` file.
- Temporarily remove unusable targets from `pins.h`.

Co-authored-by: ellensp <ellensp@hotmsil.com>
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
ellensp 3 lat temu
rodzic
commit
08155b4875

+ 12
- 10
.github/workflows/test-builds.yml Wyświetl plik

@@ -56,29 +56,31 @@ jobs:
56 56
 
57 57
         # STM32F1 (Maple) Environments
58 58
 
59
-        - STM32F103RC_btt
60
-        - STM32F103RC_btt_USB
61
-        - STM32F103RE_btt
62
-        - STM32F103RE_btt_USB
59
+        #- STM32F103RC_btt_maple
60
+        - STM32F103RC_btt_USB_maple
63 61
         - STM32F103RC_fysetc
64 62
         - STM32F103RC_meeb
65 63
         - jgaurora_a5s_a1
66 64
         - STM32F103VE_longer
67
-        - mks_robin
65
+        #- mks_robin_maple
68 66
         - mks_robin_lite
69 67
         - mks_robin_pro
70
-        - STM32F103RET6_creality
71
-        - mks_robin_nano35
68
+        #- mks_robin_nano35_maple
69
+        #- STM32F103RET6_creality_maple
72 70
 
73 71
         # STM32 (ST) Environments
74 72
 
75
-        - STM32F103RC_btt_stm32
73
+        - STM32F103RC_btt
74
+        #- STM32F103RC_btt_USB
75
+        - STM32F103RE_btt
76
+        - STM32F103RE_btt_USB
77
+        - STM32F103RET6_creality
76 78
         - STM32F407VE_black
77 79
         - STM32F401VE_STEVAL
78 80
         - BIGTREE_BTT002
79 81
         - BIGTREE_SKR_PRO
80 82
         - BIGTREE_GTR_V1_0
81
-        - mks_robin_stm32
83
+        - mks_robin
82 84
         - ARMED
83 85
         - FYSETC_S6
84 86
         - STM32F070CB_malyan
@@ -88,7 +90,7 @@ jobs:
88 90
         - rumba32
89 91
         - LERDGEX
90 92
         - LERDGEK
91
-        - mks_robin_nano35_stm32
93
+        - mks_robin_nano35
92 94
         - NUCLEO_F767ZI
93 95
         - REMRAM_V1
94 96
         - BTT_SKR_SE_BX

+ 82
- 0
Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp Wyświetl plik

@@ -0,0 +1,82 @@
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 <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#ifdef STM32F1
23
+
24
+/**
25
+ * PersistentStore for Arduino-style EEPROM interface
26
+ * with simple implementations supplied by Marlin.
27
+ */
28
+
29
+#include "../../inc/MarlinConfig.h"
30
+
31
+#if ENABLED(IIC_BL24CXX_EEPROM)
32
+
33
+#include "../shared/eeprom_if.h"
34
+#include "../shared/eeprom_api.h"
35
+
36
+//
37
+// PersistentStore
38
+//
39
+
40
+#ifndef MARLIN_EEPROM_SIZE
41
+  #error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM."
42
+#endif
43
+
44
+size_t PersistentStore::capacity()    { return MARLIN_EEPROM_SIZE; }
45
+
46
+bool PersistentStore::access_start()  { eeprom_init(); return true; }
47
+bool PersistentStore::access_finish() { return true; }
48
+
49
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
50
+  uint16_t written = 0;
51
+  while (size--) {
52
+    uint8_t v = *value;
53
+    uint8_t * const p = (uint8_t * const)pos;
54
+    if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
55
+      eeprom_write_byte(p, v);
56
+      if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes
57
+      if (eeprom_read_byte(p) != v) {
58
+        SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
59
+        return true;
60
+      }
61
+    }
62
+    crc16(crc, &v, 1);
63
+    pos++;
64
+    value++;
65
+  }
66
+  return false;
67
+}
68
+
69
+bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
70
+  do {
71
+    uint8_t * const p = (uint8_t * const)pos;
72
+    uint8_t c = eeprom_read_byte(p);
73
+    if (writing) *value = c;
74
+    crc16(crc, &c, 1);
75
+    pos++;
76
+    value++;
77
+  } while (--size);
78
+  return false;
79
+}
80
+
81
+#endif // IIC_BL24CXX_EEPROM
82
+#endif // STM32F1

+ 54
- 0
Marlin/src/HAL/STM32/eeprom_if_iic.cpp Wyświetl plik

@@ -0,0 +1,54 @@
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 <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Platform-independent Arduino functions for I2C EEPROM.
25
+ * Enable USE_SHARED_EEPROM if not supplied by the framework.
26
+ */
27
+
28
+#ifdef STM32F1
29
+
30
+#include "../../inc/MarlinConfig.h"
31
+
32
+#if ENABLED(IIC_BL24CXX_EEPROM)
33
+
34
+#include "../../libs/BL24CXX.h"
35
+#include "../shared/eeprom_if.h"
36
+
37
+void eeprom_init() { BL24CXX::init(); }
38
+
39
+// ------------------------
40
+// Public functions
41
+// ------------------------
42
+
43
+void eeprom_write_byte(uint8_t *pos, uint8_t value) {
44
+  const unsigned eeprom_address = (unsigned)pos;
45
+  return BL24CXX::writeOneByte(eeprom_address, value);
46
+}
47
+
48
+uint8_t eeprom_read_byte(uint8_t *pos) {
49
+  const unsigned eeprom_address = (unsigned)pos;
50
+  return BL24CXX::readOneByte(eeprom_address);
51
+}
52
+
53
+#endif // IIC_BL24CXX_EEPROM
54
+#endif // STM32F1

+ 13
- 3
Marlin/src/libs/BL24CXX.cpp Wyświetl plik

@@ -27,7 +27,12 @@
27 27
  */
28 28
 
29 29
 #include "BL24CXX.h"
30
-#include <libmaple/gpio.h>
30
+#ifdef __STM32F1__
31
+  #include <libmaple/gpio.h>
32
+#else
33
+  #include "../HAL/shared/Delay.h"
34
+  #define delay_us(n) DELAY_US(n)
35
+#endif
31 36
 
32 37
 #ifndef EEPROM_WRITE_DELAY
33 38
   #define EEPROM_WRITE_DELAY    10
@@ -37,8 +42,13 @@
37 42
 #endif
38 43
 
39 44
 // IO direction setting
40
-#define SDA_IN()  do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 8 << 12; }while(0)
41
-#define SDA_OUT() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 3 << 12; }while(0)
45
+#ifdef __STM32F1__
46
+  #define SDA_IN()  do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 8 << 12; }while(0)
47
+  #define SDA_OUT() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 3 << 12; }while(0)
48
+#elif STM32F1
49
+  #define SDA_IN()  SET_INPUT(IIC_EEPROM_SDA)
50
+  #define SDA_OUT() SET_OUTPUT(IIC_EEPROM_SDA)
51
+#endif
42 52
 
43 53
 // IO ops
44 54
 #define IIC_SCL_0()   WRITE(IIC_EEPROM_SCL, LOW)

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

@@ -489,13 +489,13 @@
489 489
 #elif MB(CHITU3D)
490 490
   #include "stm32f1/pins_CHITU3D.h"             // STM32F1                                env:STM32F103RE
491 491
 #elif MB(MKS_ROBIN)
492
-  #include "stm32f1/pins_MKS_ROBIN.h"           // STM32F1                                env:mks_robin env:mks_robin_stm32
492
+  #include "stm32f1/pins_MKS_ROBIN.h"           // STM32F1                                env:mks_robin env:mks_robin_maple
493 493
 #elif MB(MKS_ROBIN_MINI)
494 494
   #include "stm32f1/pins_MKS_ROBIN_MINI.h"      // STM32F1                                env:mks_robin_mini
495 495
 #elif MB(MKS_ROBIN_NANO)
496
-  #include "stm32f1/pins_MKS_ROBIN_NANO.h"      // STM32F1                                env:mks_robin_nano35 env:mks_robin_nano35_stm32
496
+  #include "stm32f1/pins_MKS_ROBIN_NANO.h"      // STM32F1                                env:mks_robin_nano35 env:mks_robin_nano35_maple
497 497
 #elif MB(MKS_ROBIN_NANO_V2)
498
-  #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h"   // STM32F1                                env:mks_robin_nano35 env:mks_robin_nano35_stm32
498
+  #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h"   // STM32F1                                env:mks_robin_nano35 env:mks_robin_nano35_maple
499 499
 #elif MB(MKS_ROBIN_LITE)
500 500
   #include "stm32f1/pins_MKS_ROBIN_LITE.h"      // STM32F1                                env:mks_robin_lite
501 501
 #elif MB(MKS_ROBIN_LITE3)
@@ -513,17 +513,17 @@
513 513
 #elif MB(MKS_ROBIN_E3P)
514 514
   #include "stm32f1/pins_MKS_ROBIN_E3P.h"       // STM32F1                                env:mks_robin_e3p
515 515
 #elif MB(BTT_SKR_MINI_V1_1)
516
-  #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h"   // STM32F1                                env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
516
+  #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h"   // STM32F1                                env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_maple env:STM32F103RC_btt_512K_maple env:STM32F103RC_btt_USB_maple env:STM32F103RC_btt_512K_USB_maple
517 517
 #elif MB(BTT_SKR_MINI_E3_V1_0)
518
-  #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h"  // STM32F1                              env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
518
+  #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h"  // STM32F1                              env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_maple env:STM32F103RC_btt_512K_maple env:STM32F103RC_btt_USB_maple env:STM32F103RC_btt_512K_USB_maple
519 519
 #elif MB(BTT_SKR_MINI_E3_V1_2)
520
-  #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h"  // STM32F1                              env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
520
+  #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h"  // STM32F1                              env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_maple env:STM32F103RC_btt_512K_maple env:STM32F103RC_btt_USB_maple env:STM32F103RC_btt_512K_USB_maple
521 521
 #elif MB(BTT_SKR_MINI_E3_V2_0)
522
-  #include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h"  // STM32F1                              env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
522
+  #include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h"  // STM32F1                              env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_maple env:STM32F103RC_btt_512K_maple env:STM32F103RC_btt_USB_maple env:STM32F103RC_btt_512K_USB_maple
523 523
 #elif MB(BTT_SKR_MINI_MZ_V1_0)
524
-  #include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h"  // STM32F1                              env:STM32F103RC_btt_stm32 env:STM32F103RC_btt_512K_stm32 env:STM32F103RC_btt_USB_stm32 env:STM32F103RC_btt_512K_USB_stm32 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
524
+  #include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h"  // STM32F1                              env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_maple env:STM32F103RC_btt_512K_maple env:STM32F103RC_btt_USB_maple env:STM32F103RC_btt_512K_USB_maple
525 525
 #elif MB(BTT_SKR_E3_DIP)
526
-  #include "stm32f1/pins_BTT_SKR_E3_DIP.h"      // STM32F1                                env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
526
+  #include "stm32f1/pins_BTT_SKR_E3_DIP.h"      // STM32F1                                env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K
527 527
 #elif MB(BTT_SKR_CR6)
528 528
   #include "stm32f1/pins_BTT_SKR_CR6.h"         // STM32F1                                env:STM32F103RE_btt env:STM32F103RE_btt_USB
529 529
 #elif MB(JGAURORA_A5S_A1)
@@ -543,17 +543,17 @@
543 543
 #elif MB(CHITU3D_V6)
544 544
   #include "stm32f1/pins_CHITU3D_V6.h"          // STM32F1                                env:chitu_f103
545 545
 #elif MB(CREALITY_V4)
546
-  #include "stm32f1/pins_CREALITY_V4.h"         // STM32F1                                env:STM32F103RET6_creality
546
+  #include "stm32f1/pins_CREALITY_V4.h"         // STM32F1                                env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
547 547
 #elif MB(CREALITY_V4210)
548
-  #include "stm32f1/pins_CREALITY_V4210.h"      // STM32F1                                env:STM32F103RET6_creality
548
+  #include "stm32f1/pins_CREALITY_V4210.h"      // STM32F1                                env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
549 549
 #elif MB(CREALITY_V427)
550
-  #include "stm32f1/pins_CREALITY_V427.h"       // STM32F1                                env:STM32F103RET6_creality
550
+  #include "stm32f1/pins_CREALITY_V427.h"       // STM32F1                                env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
551 551
 #elif MB(CREALITY_V431)
552
-  #include "stm32f1/pins_CREALITY_V431.h"       // STM32F1                                env:STM32F103RET6_creality
552
+  #include "stm32f1/pins_CREALITY_V431.h"       // STM32F1                                env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
553 553
 #elif MB(CREALITY_V452)
554
-  #include "stm32f1/pins_CREALITY_V452.h"       // STM32F1                                env:STM32F103RET6_creality
554
+  #include "stm32f1/pins_CREALITY_V452.h"       // STM32F1                                env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
555 555
 #elif MB(CREALITY_V453)
556
-  #include "stm32f1/pins_CREALITY_V453.h"       // STM32F1                                env:STM32F103RET6_creality
556
+  #include "stm32f1/pins_CREALITY_V453.h"       // STM32F1                                env:STM32F103RET6_creality env:STM32F103RET6_creality_maple
557 557
 #elif MB(TRIGORILLA_PRO)
558 558
   #include "stm32f1/pins_TRIGORILLA_PRO.h"      // STM32F1                                env:trigorilla_pro
559 559
 #elif MB(FLY_MINI)

+ 1
- 1
Marlin/src/pins/stm32f1/env_validate.h Wyświetl plik

@@ -21,6 +21,6 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-#if NOT_TARGET(__STM32F1__)
24
+#if NOT_TARGET(__STM32F1__, STM32F1)
25 25
   #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
26 26
 #endif

+ 2
- 2
buildroot/share/PlatformIO/scripts/mks_encrypt.py Wyświetl plik

@@ -2,9 +2,9 @@
2 2
 # buildroot/share/PlatformIO/scripts/mks_encrypt.py
3 3
 #
4 4
 # Apply encryption and save as 'build.firmware' for these environments:
5
-#  - env:mks_robin_stm32
5
+#  - env:mks_robin
6 6
 #  - env:flsun_hispeedv1
7
-#  - env:mks_robin_nano35_stm32
7
+#  - env:mks_robin_nano35
8 8
 #
9 9
 Import("env")
10 10
 

+ 1
- 1
buildroot/tests/STM32F103RC_btt_USB Wyświetl plik

@@ -10,7 +10,7 @@ set -e
10 10
 # Build with the default configurations
11 11
 #
12 12
 restore_configs
13
-opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1 BAUDRATE_2 115200
13
+opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1
14 14
 exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - Basic Configuration" "$3"
15 15
 
16 16
 # clean up

buildroot/tests/STM32F103RC_btt_USB_stm32 → buildroot/tests/STM32F103RC_btt_USB_maple Wyświetl plik

@@ -1,6 +1,6 @@
1 1
 #!/usr/bin/env bash
2 2
 #
3
-# Build tests for STM32F103RC BigTreeTech (SKR Mini v1.1)
3
+# Build tests for STM32F103RC BigTreeTech (SKR Mini v1.1) with LibMaple STM32F1 HAL
4 4
 #
5 5
 
6 6
 # exit on first failure
@@ -10,7 +10,7 @@ set -e
10 10
 # Build with the default configurations
11 11
 #
12 12
 restore_configs
13
-opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1
13
+opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1 BAUDRATE_2 115200
14 14
 exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - Basic Configuration" "$3"
15 15
 
16 16
 # clean up

buildroot/tests/STM32F103RC_btt_stm32 → buildroot/tests/STM32F103RC_btt_maple Wyświetl plik

@@ -1,6 +1,6 @@
1 1
 #!/usr/bin/env bash
2 2
 #
3
-# Build tests for STM32F103RC BigTreeTech (SKR Mini E3)
3
+# Build tests for STM32F103RC BigTreeTech (SKR Mini E3) with LibMaple STM32F1 HAL
4 4
 #
5 5
 
6 6
 # exit on first failure

+ 2
- 11
buildroot/tests/mks_robin Wyświetl plik

@@ -1,22 +1,13 @@
1 1
 #!/usr/bin/env bash
2 2
 #
3
-# Build tests for MKS Robin
4
-# (STM32F1 genericSTM32F103ZE)
3
+# Build tests for MKS Robin (HAL/STM32)
5 4
 #
6 5
 
7 6
 # exit on first failure
8 7
 set -e
9 8
 
10 9
 use_example_configs Mks/Robin
11
-exec_test $1 $2 "MKS Robin config (FSMC Color UI)" "$3"
12
-
13
-#
14
-# MKS Robin LVGL FSMC
15
-#
16
-use_example_configs Mks/Robin
17
-opt_disable TFT_CLASSIC_UI TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
18
-opt_enable TFT_LVGL_UI TFT_RES_480x320
19
-exec_test $1 $2 "MKS Robin nano v1.2 LVGL FSMC" "$3"
10
+exec_test $1 $2 "MKS Robin base configuration" "$3"
20 11
 
21 12
 # cleanup
22 13
 restore_configs

+ 22
- 0
buildroot/tests/mks_robin_maple Wyświetl plik

@@ -0,0 +1,22 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Build tests for MKS Robin with LibMaple STM32F1 HAL
4
+# (STM32F1 genericSTM32F103ZE)
5
+#
6
+
7
+# exit on first failure
8
+set -e
9
+
10
+use_example_configs Mks/Robin
11
+exec_test $1 $2 "MKS Robin config (FSMC Color UI)" "$3"
12
+
13
+#
14
+# MKS Robin LVGL FSMC
15
+#
16
+use_example_configs Mks/Robin
17
+opt_disable TFT_CLASSIC_UI TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
18
+opt_enable TFT_LVGL_UI TFT_RES_480x320
19
+exec_test $1 $2 "MKS Robin nano v1.2 LVGL FSMC" "$3"
20
+
21
+# cleanup
22
+restore_configs

+ 20
- 21
buildroot/tests/mks_robin_nano35 Wyświetl plik

@@ -25,14 +25,23 @@ opt_enable TFT_INTERFACE_SPI
25 25
 exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI" "$3"
26 26
 
27 27
 #
28
+# MKS Robin nano v1.2 LVGL FSMC
29
+#
30
+# use_example_configs Mks/Robin
31
+# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO
32
+# opt_disable TFT_CLASSIC_UI TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
33
+# opt_enable TFT_LVGL_UI TFT_RES_480x320
34
+# exec_test $1 $2 "MKS Robin nano v1.2 LVGL FSMC" "$3"
35
+
36
+#
28 37
 # MKS Robin v2 nano LVGL SPI
29 38
 # (Robin v2 nano has no FSMC interface)
30 39
 #
31
-use_example_configs Mks/Robin
32
-opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
33
-opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 SERIAL_PORT_2
34
-opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 MKS_WIFI_MODULE
35
-exec_test $1 $2 "MKS Robin v2 nano LVGL SPI w/ WiFi" "$3"
40
+# use_example_configs Mks/Robin
41
+# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
42
+# opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
43
+# opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320
44
+# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI" "$3"
36 45
 
37 46
 #
38 47
 # MKS Robin v2 nano New Color UI 480x320 SPI
@@ -42,27 +51,17 @@ use_example_configs Mks/Robin
42 51
 opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
43 52
 opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240
44 53
 opt_enable TFT_INTERFACE_SPI TFT_RES_480x320
45
-opt_enable BINARY_FILE_TRANSFER
46
-exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI + BINARY_FILE_TRANSFER" "$3"
54
+exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI" "$3"
47 55
 
48 56
 #
49 57
 # MKS Robin v2 nano LVGL SPI + TMC
50 58
 # (Robin v2 nano has no FSMC interface)
51 59
 #
52
-use_example_configs Mks/Robin
53
-opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209
54
-opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
55
-opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320
56
-exec_test $1 $2 "MKS Robin v2 nano LVGL SPI + TMC" "$3"
57
-
58
-#
59
-# MKS Robin v2 nano New Color UI 480x320 SPI Without Touch Screen
60
-#
61
-use_example_configs Mks/Robin
62
-opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
63
-opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240 TOUCH_SCREEN
64
-opt_enable TFT_INTERFACE_SPI TFT_RES_480x320 TFT_COLOR_UI
65
-exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI without TOUCH_SCREEN" "$3"
60
+# use_example_configs Mks/Robin
61
+# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209
62
+# opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
63
+# opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320
64
+# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI + TMC" "$3"
66 65
 
67 66
 # cleanup
68 67
 restore_configs

+ 68
- 0
buildroot/tests/mks_robin_nano35_maple Wyświetl plik

@@ -0,0 +1,68 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Build tests for MKS Robin nano with LibMaple STM32F1 HAL
4
+# (STM32F1 genericSTM32F103VE)
5
+#
6
+
7
+# exit on first failure
8
+set -e
9
+
10
+#
11
+# MKS Robin nano v1.2 Emulated DOGM FSMC
12
+#
13
+use_example_configs Mks/Robin
14
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO
15
+exec_test $1 $2 "MKS Robin nano v1.2 Emulated DOGM FSMC" "$3"
16
+
17
+#
18
+# MKS Robin v2 nano Emulated DOGM SPI
19
+# (Robin v2 nano has no FSMC interface)
20
+#
21
+use_example_configs Mks/Robin
22
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
23
+opt_disable TFT_INTERFACE_FSMC
24
+opt_enable TFT_INTERFACE_SPI
25
+exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI" "$3"
26
+
27
+#
28
+# MKS Robin v2 nano LVGL SPI
29
+# (Robin v2 nano has no FSMC interface)
30
+#
31
+use_example_configs Mks/Robin
32
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
33
+opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 SERIAL_PORT_2
34
+opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 MKS_WIFI_MODULE
35
+exec_test $1 $2 "MKS Robin v2 nano LVGL SPI w/ WiFi" "$3"
36
+
37
+#
38
+# MKS Robin v2 nano New Color UI 480x320 SPI
39
+# (Robin v2 nano has no FSMC interface)
40
+#
41
+use_example_configs Mks/Robin
42
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
43
+opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240
44
+opt_enable TFT_INTERFACE_SPI TFT_RES_480x320
45
+opt_enable BINARY_FILE_TRANSFER
46
+exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI + BINARY_FILE_TRANSFER" "$3"
47
+
48
+#
49
+# MKS Robin v2 nano LVGL SPI + TMC
50
+# (Robin v2 nano has no FSMC interface)
51
+#
52
+use_example_configs Mks/Robin
53
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209
54
+opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
55
+opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320
56
+exec_test $1 $2 "MKS Robin v2 nano LVGL SPI + TMC" "$3"
57
+
58
+#
59
+# MKS Robin v2 nano New Color UI 480x320 SPI Without Touch Screen
60
+#
61
+use_example_configs Mks/Robin
62
+opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
63
+opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240 TOUCH_SCREEN
64
+opt_enable TFT_INTERFACE_SPI TFT_RES_480x320 TFT_COLOR_UI
65
+exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI without TOUCH_SCREEN" "$3"
66
+
67
+# cleanup
68
+restore_configs

+ 0
- 67
buildroot/tests/mks_robin_nano35_stm32 Wyświetl plik

@@ -1,67 +0,0 @@
1
-#!/usr/bin/env bash
2
-#
3
-# Build tests for MKS Robin nano
4
-# (STM32F1 genericSTM32F103VE)
5
-#
6
-
7
-# exit on first failure
8
-set -e
9
-
10
-#
11
-# MKS Robin nano v1.2 Emulated DOGM FSMC
12
-#
13
-use_example_configs Mks/Robin
14
-opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO
15
-exec_test $1 $2 "MKS Robin nano v1.2 Emulated DOGM FSMC" "$3"
16
-
17
-#
18
-# MKS Robin v2 nano Emulated DOGM SPI
19
-# (Robin v2 nano has no FSMC interface)
20
-#
21
-use_example_configs Mks/Robin
22
-opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
23
-opt_disable TFT_INTERFACE_FSMC
24
-opt_enable TFT_INTERFACE_SPI
25
-exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI" "$3"
26
-
27
-#
28
-# MKS Robin nano v1.2 LVGL FSMC
29
-#
30
-# use_example_configs Mks/Robin
31
-# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO
32
-# opt_disable TFT_CLASSIC_UI TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
33
-# opt_enable TFT_LVGL_UI TFT_RES_480x320
34
-# exec_test $1 $2 "MKS Robin nano v1.2 LVGL FSMC" "$3"
35
-
36
-#
37
-# MKS Robin v2 nano LVGL SPI
38
-# (Robin v2 nano has no FSMC interface)
39
-#
40
-# use_example_configs Mks/Robin
41
-# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
42
-# opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
43
-# opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320
44
-# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI" "$3"
45
-
46
-#
47
-# MKS Robin v2 nano New Color UI 480x320 SPI
48
-# (Robin v2 nano has no FSMC interface)
49
-#
50
-use_example_configs Mks/Robin
51
-opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
52
-opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240
53
-opt_enable TFT_INTERFACE_SPI TFT_RES_480x320
54
-exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI" "$3"
55
-
56
-#
57
-# MKS Robin v2 nano LVGL SPI + TMC
58
-# (Robin v2 nano has no FSMC interface)
59
-#
60
-# use_example_configs Mks/Robin
61
-# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209
62
-# opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240
63
-# opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320
64
-# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI + TMC" "$3"
65
-
66
-# cleanup
67
-restore_configs

+ 0
- 13
buildroot/tests/mks_robin_stm32 Wyświetl plik

@@ -1,13 +0,0 @@
1
-#!/usr/bin/env bash
2
-#
3
-# Build tests for MKS Robin (HAL/STM32)
4
-#
5
-
6
-# exit on first failure
7
-set -e
8
-
9
-use_example_configs Mks/Robin
10
-exec_test $1 $2 "MKS Robin base configuration" "$3"
11
-
12
-# cleanup
13
-restore_configs

+ 363
- 0
ini/stm32f1-maple.ini Wyświetl plik

@@ -0,0 +1,363 @@
1
+#
2
+# Marlin Firmware
3
+# PlatformIO Configuration File
4
+#
5
+
6
+#################################
7
+#
8
+# STM32F1 Architecture with LibMaple STM32F1 HAL
9
+#
10
+# Naming Example: STM32F103RCT6
11
+#
12
+#   F : Foundation (sometimes High Performance F2/F4)
13
+#   1 : Cortex M1 core
14
+#  03 : Line/Features
15
+#   R : 64 or 66 pins  (V:100, Z:144, I:176)
16
+#   C : 256KB Flash-memory  (D:384KB, E:512KB, G:1024KB)
17
+#   T : LQFP package
18
+#   6 : -40...85°C   (7: ...105°C)
19
+#
20
+#################################
21
+
22
+#
23
+# HAL/STM32F1 Common Environment values
24
+#
25
+[common_stm32f1]
26
+platform          = ststm32@~12.1
27
+board_build.core  = maple
28
+build_flags       = !python Marlin/src/HAL/STM32F1/build_flags.py
29
+  ${common.build_flags}
30
+  -DARDUINO_ARCH_STM32
31
+build_unflags     = -std=gnu11 -std=gnu++11
32
+src_filter        = ${common.default_src_filter} +<src/HAL/STM32F1>
33
+lib_ignore        = SPI, FreeRTOS701, FreeRTOS821
34
+lib_deps          = ${common.lib_deps}
35
+  SoftwareSerialM
36
+platform_packages = tool-stm32duino
37
+extra_scripts     = ${common.extra_scripts}
38
+  pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
39
+
40
+#
41
+# STM32F103RC
42
+#
43
+[common_STM32F103RC_maple]
44
+platform          = ${common_stm32f1.platform}
45
+extends           = common_stm32f1
46
+board             = genericSTM32F103RC
47
+monitor_speed     = 115200
48
+
49
+#
50
+# MEEB_3DP (STM32F103RCT6 with 512K)
51
+#
52
+[env:STM32F103RC_meeb]
53
+platform          = ${common_stm32f1.platform}
54
+extends           = common_STM32F103RC_maple
55
+board             = marlin_MEEB_3DP
56
+build_flags       = ${common_stm32f1.build_flags}
57
+                    -DDEBUG_LEVEL=0
58
+                    -DSS_TIMER=4
59
+                    -DSTM32_FLASH_SIZE=512
60
+                    -DHSE_VALUE=12000000U
61
+                    -DUSE_USB_COMPOSITE
62
+                    -DVECT_TAB_OFFSET=0x2000
63
+                    -DGENERIC_BOOTLOADER
64
+extra_scripts     = ${common_stm32f1.extra_scripts}
65
+  pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
66
+  buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
67
+lib_deps          = ${common.lib_deps}
68
+  SoftwareSerialM
69
+  USBComposite for STM32F1@0.91
70
+custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
71
+debug_tool        = stlink
72
+upload_protocol   = dfu
73
+
74
+#
75
+# FYSETC STM32F103RC
76
+#
77
+[env:STM32F103RC_fysetc]
78
+platform          = ${common_stm32f1.platform}
79
+extends           = common_STM32F103RC_maple
80
+extra_scripts     = ${common_stm32f1.extra_scripts}
81
+  buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
82
+build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
83
+lib_ldf_mode      = chain
84
+debug_tool        = stlink
85
+upload_protocol   = serial
86
+
87
+#
88
+# BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
89
+#
90
+#   STM32F103RC_btt_maple ............. RCT6 with 256K
91
+#   STM32F103RC_btt_USB_maple ......... RCT6 with 256K (USB mass storage)
92
+#   STM32F103RC_btt_512K_maple ........ RCT6 with 512K
93
+#   STM32F103RC_btt_512K_USB_maple .... RCT6 with 512K (USB mass storage)
94
+#
95
+# WARNING! If you have an SKR Mini v1.1 or an SKR Mini E3 1.0 / 1.2 / 2.0 / DIP
96
+# and experience a printer freeze, re-flash Marlin using the regular (non-512K)
97
+# build option. 256K chips may be re-branded 512K chips, but this means the
98
+# upper 256K is sketchy, and failure is very likely.
99
+#
100
+
101
+[env:STM32F103RC_btt_maple]
102
+platform             = ${common_stm32f1.platform}
103
+extends              = common_STM32F103RC_maple
104
+board_build.address  = 0x08007000
105
+board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld
106
+extra_scripts        = ${common_stm32f1.extra_scripts}
107
+  buildroot/share/PlatformIO/scripts/custom_board.py
108
+build_flags          = ${common_stm32f1.build_flags}
109
+  -DDEBUG_LEVEL=0 -DSS_TIMER=4
110
+monitor_speed        = 115200
111
+
112
+[env:STM32F103RC_btt_USB_maple]
113
+platform          = ${common_stm32f1.platform}
114
+extends           = env:STM32F103RC_btt_maple
115
+build_flags       = ${env:STM32F103RC_btt_maple.build_flags} -DUSE_USB_COMPOSITE
116
+lib_deps          = ${env:STM32F103RC_btt_maple.lib_deps}
117
+  USBComposite for STM32F1@0.91
118
+
119
+[env:STM32F103RC_btt_512K_maple]
120
+platform                  = ${common_stm32f1.platform}
121
+extends                   = env:STM32F103RC_btt_maple
122
+board_build.ldscript      = STM32F103RC_SKR_MINI_512K.ld
123
+board_upload.maximum_size = 524288
124
+build_flags               = ${env:STM32F103RC_btt_maple.build_flags} -DSTM32_FLASH_SIZE=512
125
+
126
+[env:STM32F103RC_btt_512K_USB_maple]
127
+platform          = ${common_stm32f1.platform}
128
+extends           = env:STM32F103RC_btt_512K_maple
129
+build_flags       = ${env:STM32F103RC_btt_512K_maple.build_flags} -DUSE_USB_COMPOSITE
130
+lib_deps          = ${env:STM32F103RC_btt_512K_maple.lib_deps}
131
+  USBComposite for STM32F1@0.91
132
+
133
+#
134
+# STM32F103RE with Unified STM32F1 HAL
135
+#
136
+[common_STM32F103RE]
137
+platform          = ${common_stm32f1.platform}
138
+extends           = common_stm32f1
139
+board             = genericSTM32F103RE
140
+monitor_speed     = 115200
141
+
142
+#
143
+# Creality (STM32F103RET6)
144
+#
145
+[env:STM32F103RET6_creality_maple]
146
+platform             = ${common_stm32f1.platform}
147
+extends              = common_STM32F103RE
148
+build_flags          = ${common_stm32f1.build_flags} -DTEMP_TIMER_CHAN=4
149
+board_build.address  = 0x08007000
150
+board_build.ldscript = creality.ld
151
+extra_scripts        = ${common_stm32f1.extra_scripts}
152
+  pre:buildroot/share/PlatformIO/scripts/random-bin.py
153
+  buildroot/share/PlatformIO/scripts/custom_board.py
154
+debug_tool           = jlink
155
+upload_protocol      = jlink
156
+
157
+#
158
+#   STM32F103RE_btt ............. RET6
159
+#   STM32F103RE_btt_USB ......... RET6 (USB mass storage)
160
+#
161
+[env:STM32F103RE_btt]
162
+platform          = ${common_stm32f1.platform}
163
+extends           = common_STM32F103RE
164
+board_build.address  = 0x08007000
165
+board_build.ldscript = STM32F103RE_SKR_E3_DIP.ld
166
+extra_scripts     = ${common_stm32f1.extra_scripts}
167
+  buildroot/share/PlatformIO/scripts/custom_board.py
168
+build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
169
+debug_tool        = stlink
170
+upload_protocol   = stlink
171
+
172
+[env:STM32F103RE_btt_USB]
173
+platform          = ${common_stm32f1.platform}
174
+extends           = env:STM32F103RE_btt
175
+build_flags       = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
176
+lib_deps          = ${common_stm32f1.lib_deps}
177
+  USBComposite for STM32F1@0.91
178
+
179
+#
180
+# Geeetech GTM32 (STM32F103VET6)
181
+#
182
+[env:STM32F103VE_GTM32]
183
+platform        = ${common_stm32f1.platform}
184
+extends         = common_stm32f1
185
+board           = genericSTM32F103VE
186
+build_flags     = ${common_stm32f1.build_flags}
187
+  -ffunction-sections -fdata-sections -nostdlib -MMD
188
+  -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
189
+  -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
190
+  -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
191
+upload_protocol = serial
192
+
193
+#
194
+# Longer 3D board in Alfawise U20 (STM32F103VET6)
195
+#
196
+[env:STM32F103VE_longer]
197
+platform      = ${common_stm32f1.platform}
198
+extends       = common_stm32f1
199
+board         = genericSTM32F103VE
200
+board_build.address  = 0x08010000
201
+board_build.ldscript = STM32F103VE_longer.ld
202
+extra_scripts = ${common_stm32f1.extra_scripts}
203
+  buildroot/share/PlatformIO/scripts/custom_board.py
204
+  buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
205
+build_flags   = ${common_stm32f1.build_flags}
206
+  -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
207
+build_unflags = ${common_stm32f1.build_unflags}
208
+  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
209
+
210
+#
211
+# MKS Robin Mini (STM32F103VET6)
212
+#
213
+[env:mks_robin_mini]
214
+platform      = ${common_stm32f1.platform}
215
+extends       = common_stm32f1
216
+board         = genericSTM32F103VE
217
+extra_scripts = ${common_stm32f1.extra_scripts}
218
+  buildroot/share/PlatformIO/scripts/mks_robin_mini.py
219
+build_flags   = ${common_stm32f1.build_flags}
220
+  -DMCU_STM32F103VE
221
+
222
+#
223
+# MKS Robin Nano (STM32F103VET6)
224
+#
225
+[env:mks_robin_nano35_maple]
226
+platform        = ${common_stm32f1.platform}
227
+extends         = common_stm32f1
228
+board           = genericSTM32F103VE
229
+extra_scripts   = ${common_stm32f1.extra_scripts}
230
+  buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
231
+build_flags     = ${common_stm32f1.build_flags}
232
+  -DMCU_STM32F103VE -DSS_TIMER=4
233
+debug_tool      = jlink
234
+upload_protocol = jlink
235
+
236
+#
237
+# MKS Robin (STM32F103ZET6)
238
+#
239
+[env:mks_robin_maple]
240
+platform      = ${common_stm32f1.platform}
241
+extends       = common_stm32f1
242
+board         = genericSTM32F103ZE
243
+extra_scripts = ${common_stm32f1.extra_scripts}
244
+  buildroot/share/PlatformIO/scripts/mks_robin.py
245
+build_flags   = ${common_stm32f1.build_flags}
246
+  -DSS_TIMER=4 -DSTM32_XL_DENSITY
247
+
248
+#
249
+# MKS Robin Pro (STM32F103ZET6)
250
+#
251
+[env:mks_robin_pro]
252
+platform      = ${common_stm32f1.platform}
253
+extends       = env:mks_robin_maple
254
+extra_scripts = ${common_stm32f1.extra_scripts}
255
+  buildroot/share/PlatformIO/scripts/mks_robin_pro.py
256
+
257
+#
258
+# TRIGORILLA PRO (STM32F103ZET6)
259
+#
260
+[env:trigorilla_pro]
261
+platform      = ${common_stm32f1.platform}
262
+extends       = env:mks_robin_maple
263
+extra_scripts = ${common_stm32f1.extra_scripts}
264
+
265
+#
266
+# MKS Robin E3D (STM32F103RCT6) and
267
+# MKS Robin E3 with TMC2209
268
+#
269
+[env:mks_robin_e3]
270
+platform      = ${common_stm32f1.platform}
271
+extends       = common_stm32f1
272
+board         = genericSTM32F103RC
273
+extra_scripts = ${common_stm32f1.extra_scripts}
274
+  buildroot/share/PlatformIO/scripts/mks_robin_e3.py
275
+build_flags   = ${common_stm32f1.build_flags}
276
+  -DDEBUG_LEVEL=0 -DSS_TIMER=4
277
+
278
+#
279
+# MKS Robin E3p (STM32F103VET6)
280
+#  - LVGL UI
281
+#
282
+[env:mks_robin_e3p]
283
+platform        = ${common_stm32f1.platform}
284
+extends         = common_stm32f1
285
+board           = genericSTM32F103VE
286
+extra_scripts   = ${common_stm32f1.extra_scripts}
287
+  buildroot/share/PlatformIO/scripts/mks_robin_e3p.py
288
+build_flags     = ${common_stm32f1.build_flags}
289
+  -DMCU_STM32F103VE -DSS_TIMER=4
290
+debug_tool      = jlink
291
+upload_protocol = jlink
292
+
293
+#
294
+# MKS Robin Lite/Lite2 (STM32F103RCT6)
295
+#
296
+[env:mks_robin_lite]
297
+platform      = ${common_stm32f1.platform}
298
+extends       = common_stm32f1
299
+board         = genericSTM32F103RC
300
+extra_scripts = ${common_stm32f1.extra_scripts}
301
+  buildroot/share/PlatformIO/scripts/mks_robin_lite.py
302
+
303
+#
304
+# MKS ROBIN LITE3 (STM32F103RCT6)
305
+#
306
+[env:mks_robin_lite3]
307
+platform      = ${common_stm32f1.platform}
308
+extends       = common_stm32f1
309
+board         = genericSTM32F103RC
310
+extra_scripts = ${common_stm32f1.extra_scripts}
311
+  buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
312
+
313
+#
314
+# JGAurora A5S A1 (STM32F103ZET6)
315
+#
316
+[env:jgaurora_a5s_a1]
317
+platform      = ${common_stm32f1.platform}
318
+extends       = common_stm32f1
319
+board         = genericSTM32F103ZE
320
+board_build.address  = 0x0800A000
321
+board_build.ldscript = jgaurora_a5s_a1.ld
322
+extra_scripts = ${common_stm32f1.extra_scripts}
323
+  buildroot/share/PlatformIO/scripts/custom_board.py
324
+  buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
325
+build_flags   = ${common_stm32f1.build_flags}
326
+  -DSTM32F1xx -DSTM32_XL_DENSITY
327
+
328
+#
329
+# Malyan M200 (STM32F103CB)
330
+#
331
+[env:STM32F103CB_malyan]
332
+platform      = ${common_stm32f1.platform}
333
+extends       = common_stm32f1
334
+board         = marlin_malyanM200
335
+build_flags   = ${common_stm32f1.build_flags}
336
+  -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
337
+  -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
338
+lib_ignore    = ${common_stm32f1.lib_ignore}
339
+  SoftwareSerialM
340
+
341
+#
342
+# Chitu boards like Tronxy X5s (STM32F103ZET6)
343
+#
344
+[env:chitu_f103]
345
+platform      = ${common_stm32f1.platform}
346
+extends       = common_stm32f1
347
+board         = marlin_CHITU_F103
348
+extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
349
+  pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
350
+  buildroot/share/PlatformIO/scripts/chitu_crypt.py
351
+build_flags   = ${common_stm32f1.build_flags}
352
+  -DSTM32F1xx -DSTM32_XL_DENSITY
353
+build_unflags = ${common_stm32f1.build_unflags}
354
+  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
355
+
356
+#
357
+# Some Chitu V5 boards have a problem with GPIO init.
358
+# Use this target if G28 or G29 are always failing.
359
+#
360
+[env:chitu_v5_gpio_init]
361
+platform      = ${common_stm32f1.platform}
362
+extends       = env:chitu_f103
363
+build_flags   = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX

+ 33
- 358
ini/stm32f1.ini Wyświetl plik

@@ -5,7 +5,7 @@
5 5
 
6 6
 #################################
7 7
 #
8
-# STM32F1 Architecture
8
+# STM32F1 Architecture with unified STM32 HAL
9 9
 #
10 10
 # Naming Example: STM32F103RCT6
11 11
 #
@@ -33,71 +33,6 @@ build_unflags = -std=gnu++11
33 33
 src_filter    = ${common.default_src_filter} +<src/HAL/STM32> +<src/HAL/shared/backtrace>
34 34
 
35 35
 #
36
-# HAL/STM32F1 Common Environment values
37
-#
38
-[common_stm32f1]
39
-platform          = ststm32@~12.1
40
-board_build.core  = maple
41
-build_flags       = !python Marlin/src/HAL/STM32F1/build_flags.py
42
-  ${common.build_flags}
43
-  -DARDUINO_ARCH_STM32
44
-build_unflags     = -std=gnu11 -std=gnu++11
45
-src_filter        = ${common.default_src_filter} +<src/HAL/STM32F1>
46
-lib_ignore        = SPI, FreeRTOS701, FreeRTOS821
47
-lib_deps          = ${common.lib_deps}
48
-  SoftwareSerialM
49
-platform_packages = tool-stm32duino
50
-extra_scripts     = ${common.extra_scripts}
51
-  pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
52
-
53
-#
54
-# STM32F103RC
55
-#
56
-[env:STM32F103RC]
57
-platform          = ${common_stm32f1.platform}
58
-extends           = common_stm32f1
59
-board             = genericSTM32F103RC
60
-monitor_speed     = 115200
61
-
62
-#
63
-# MEEB_3DP (STM32F103RCT6 with 512K)
64
-#
65
-[env:STM32F103RC_meeb]
66
-platform          = ${common_stm32f1.platform}
67
-extends           = common_stm32f1
68
-board             = marlin_MEEB_3DP
69
-build_flags       = ${common_stm32f1.build_flags}
70
-                    -DDEBUG_LEVEL=0
71
-                    -DSS_TIMER=4
72
-                    -DSTM32_FLASH_SIZE=512
73
-                    -DHSE_VALUE=12000000U
74
-                    -DUSE_USB_COMPOSITE
75
-                    -DVECT_TAB_OFFSET=0x2000
76
-                    -DGENERIC_BOOTLOADER
77
-extra_scripts     = ${common_stm32f1.extra_scripts}
78
-  pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
79
-  buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
80
-lib_deps          = ${common.lib_deps}
81
-  SoftwareSerialM
82
-  USBComposite for STM32F1@0.91
83
-custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
84
-debug_tool        = stlink
85
-upload_protocol   = dfu
86
-
87
-#
88
-# STM32F103RC_fysetc
89
-#
90
-[env:STM32F103RC_fysetc]
91
-platform          = ${common_stm32f1.platform}
92
-extends           = env:STM32F103RC
93
-extra_scripts     = ${common_stm32f1.extra_scripts}
94
-  buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
95
-build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
96
-lib_ldf_mode      = chain
97
-debug_tool        = stlink
98
-upload_protocol   = serial
99
-
100
-#
101 36
 # BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3)
102 37
 #
103 38
 #   STM32F103RC_btt ............. RCT6 with 256K
@@ -110,44 +45,7 @@ upload_protocol   = serial
110 45
 # build option. 256K chips may be re-branded 512K chips, but this means the
111 46
 # upper 256K is sketchy, and failure is very likely.
112 47
 #
113
-
114
-[env:STM32F103RC_btt]
115
-platform          = ${common_stm32f1.platform}
116
-extends           = env:STM32F103RC
117
-board_build.address  = 0x08007000
118
-board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld
119
-extra_scripts     = ${common_stm32f1.extra_scripts}
120
-  buildroot/share/PlatformIO/scripts/custom_board.py
121
-build_flags       = ${common_stm32f1.build_flags}
122
-  -DDEBUG_LEVEL=0 -DSS_TIMER=4
123
-monitor_speed     = 115200
124
-
125
-[env:STM32F103RC_btt_USB]
126
-platform          = ${common_stm32f1.platform}
127
-extends           = env:STM32F103RC_btt
128
-build_flags       = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE
129
-lib_deps          = ${env:STM32F103RC_btt.lib_deps}
130
-  USBComposite for STM32F1@0.91
131
-
132
-[env:STM32F103RC_btt_512K]
133
-platform          = ${common_stm32f1.platform}
134
-extends           = env:STM32F103RC_btt
135
-board_build.ldscript = STM32F103RC_SKR_MINI_512K.ld
136
-board_upload.maximum_size=524288
137
-build_flags       = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512
138
-
139
-[env:STM32F103RC_btt_512K_USB]
140
-platform          = ${common_stm32f1.platform}
141
-extends           = env:STM32F103RC_btt_512K
142
-build_flags       = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE
143
-lib_deps          = ${env:STM32F103RC_btt_512K.lib_deps}
144
-  USBComposite for STM32F1@0.91
145
-
146
-#
147
-# STM32 HAL version of STM32F103RC_btt envs
148
-#
149
-
150
-[env:STM32F103RC_stm32]
48
+[common_STM32F103RC]
151 49
 platform             = ${common_stm32.platform}
152 50
 extends              = common_stm32
153 51
 board                = genericSTM32F103RC
@@ -159,21 +57,21 @@ extra_scripts        = ${common.extra_scripts}
159 57
   pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
160 58
   buildroot/share/PlatformIO/scripts/stm32_bootloader.py
161 59
 
162
-[env:STM32F103RC_btt_stm32]
60
+[env:STM32F103RC_btt]
163 61
 platform             = ${common_stm32.platform}
164
-extends              = env:STM32F103RC_stm32
62
+extends              = common_STM32F103RC
165 63
 build_flags          = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5
166 64
 board_build.offset   = 0x7000
167 65
 board_build.encrypt  = No
168 66
 board_build.firmware = firmware.bin
169 67
 board_upload.offset_address = 0x08007000
170 68
 
171
-[env:STM32F103RC_btt_USB_stm32]
172
-extends           = env:STM32F103RC_btt_stm32
69
+[env:STM32F103RC_btt_USB]
70
+extends           = env:STM32F103RC_btt
173 71
 platform          = ${common_stm32.platform}
174 72
 platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip
175 73
 build_unflags     = ${common_stm32.build_unflags} -DUSBD_USE_CDC
176
-build_flags       = ${env:STM32F103RC_btt_stm32.build_flags} ${env:stm32_flash_drive.build_flags}
74
+build_flags       = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags}
177 75
   -DUSBCON
178 76
   -DUSE_USBHOST_HS
179 77
   -DUSBD_IRQ_PRIO=5
@@ -181,122 +79,23 @@ build_flags       = ${env:STM32F103RC_btt_stm32.build_flags} ${env:stm32_flash_d
181 79
   -DUSE_USB_HS_IN_FS
182 80
   -DUSBD_USE_CDC_MSC
183 81
 
184
-[env:STM32F103RC_btt_512K_stm32]
82
+[env:STM32F103RC_btt_512K]
185 83
 platform          = ${common_stm32.platform}
186
-extends           = env:STM32F103RC_btt_stm32
84
+extends           = env:STM32F103RC_btt
187 85
 board_upload.maximum_size = 524288
188
-build_flags       = ${env:STM32F103RC_btt_stm32.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
86
+build_flags       = ${env:STM32F103RC_btt.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
189 87
 
190
-[env:STM32F103RC_btt_512K_USB_stm32]
88
+[env:STM32F103RC_btt_512K_USB]
191 89
 platform          = ${common_stm32.platform}
192
-extends           = env:STM32F103RC_btt_USB_stm32
90
+extends           = env:STM32F103RC_btt_USB
193 91
 board_upload.maximum_size = 524288
194
-build_flags       = ${env:STM32F103RC_btt_USB_stm32.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
195
-
196
-#
197
-# STM32F103RE
198
-#
199
-[env:STM32F103RE]
200
-platform          = ${common_stm32f1.platform}
201
-extends           = common_stm32f1
202
-board             = genericSTM32F103RE
203
-monitor_speed     = 115200
204
-
205
-#
206
-#   STM32F103RE_btt ............. RET6
207
-#   STM32F103RE_btt_USB ......... RET6 (USB mass storage)
208
-#
209
-[env:STM32F103RE_btt]
210
-platform          = ${common_stm32f1.platform}
211
-extends           = env:STM32F103RE
212
-board_build.address  = 0x08007000
213
-board_build.ldscript = STM32F103RE_SKR_E3_DIP.ld
214
-extra_scripts     = ${common_stm32f1.extra_scripts}
215
-  buildroot/share/PlatformIO/scripts/custom_board.py
216
-build_flags       = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
217
-debug_tool        = stlink
218
-upload_protocol   = stlink
219
-
220
-[env:STM32F103RE_btt_USB]
221
-platform          = ${common_stm32f1.platform}
222
-extends           = env:STM32F103RE_btt
223
-build_flags       = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE
224
-lib_deps          = ${common_stm32f1.lib_deps}
225
-  USBComposite for STM32F1@0.91
226
-
227
-#
228
-# Geeetech GTM32 (STM32F103VET6)
229
-#
230
-[env:STM32F103VE_GTM32]
231
-platform        = ${common_stm32f1.platform}
232
-extends         = common_stm32f1
233
-board           = genericSTM32F103VE
234
-build_flags     = ${common_stm32f1.build_flags}
235
-  -ffunction-sections -fdata-sections -nostdlib -MMD
236
-  -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v
237
-  -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000
238
-  -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
239
-upload_protocol = serial
240
-
241
-#
242
-# Longer 3D board in Alfawise U20 (STM32F103VET6)
243
-#
244
-[env:STM32F103VE_longer]
245
-platform      = ${common_stm32f1.platform}
246
-extends       = common_stm32f1
247
-board         = genericSTM32F103VE
248
-board_build.address  = 0x08010000
249
-board_build.ldscript = STM32F103VE_longer.ld
250
-extra_scripts = ${common_stm32f1.extra_scripts}
251
-  buildroot/share/PlatformIO/scripts/custom_board.py
252
-  buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
253
-build_flags   = ${common_stm32f1.build_flags}
254
-  -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
255
-build_unflags = ${common_stm32f1.build_unflags}
256
-  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
257
-
258
-#
259
-# MKS Robin Mini (STM32F103VET6)
260
-#
261
-[env:mks_robin_mini]
262
-platform      = ${common_stm32f1.platform}
263
-extends       = common_stm32f1
264
-board         = genericSTM32F103VE
265
-extra_scripts = ${common_stm32f1.extra_scripts}
266
-  buildroot/share/PlatformIO/scripts/mks_robin_mini.py
267
-build_flags   = ${common_stm32f1.build_flags}
268
-  -DMCU_STM32F103VE
269
-
270
-#
271
-# MKS Robin Nano (STM32F103VET6)
272
-#
273
-[env:mks_robin_nano35]
274
-platform        = ${common_stm32f1.platform}
275
-extends         = common_stm32f1
276
-board           = genericSTM32F103VE
277
-extra_scripts   = ${common_stm32f1.extra_scripts}
278
-  buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
279
-build_flags     = ${common_stm32f1.build_flags}
280
-  -DMCU_STM32F103VE -DSS_TIMER=4
281
-debug_tool      = jlink
282
-upload_protocol = jlink
92
+build_flags       = ${env:STM32F103RC_btt_USB.build_flags} -DLD_MAX_DATA_SIZE=524288 -DSTM32_FLASH_SIZE=512
283 93
 
284 94
 #
285 95
 # MKS Robin (STM32F103ZET6)
286
-#
287
-[env:mks_robin]
288
-platform      = ${common_stm32f1.platform}
289
-extends       = common_stm32f1
290
-board         = genericSTM32F103ZE
291
-extra_scripts = ${common_stm32f1.extra_scripts}
292
-  buildroot/share/PlatformIO/scripts/mks_robin.py
293
-build_flags   = ${common_stm32f1.build_flags}
294
-  -DSS_TIMER=4 -DSTM32_XL_DENSITY
295
-
296
-# MKS Robin (STM32F103ZET6)
297 96
 # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
298 97
 #
299
-[env:mks_robin_stm32]
98
+[env:mks_robin]
300 99
 platform             = ${common_stm32.platform}
301 100
 extends              = common_stm32
302 101
 board                = genericSTM32F103ZE
@@ -317,153 +116,29 @@ extra_scripts        = ${common.extra_scripts}
317 116
 lib_deps             =
318 117
 
319 118
 #
320
-# MKS Robin Pro (STM32F103ZET6)
321
-#
322
-[env:mks_robin_pro]
323
-platform      = ${common_stm32f1.platform}
324
-extends       = env:mks_robin
325
-extra_scripts = ${common_stm32f1.extra_scripts}
326
-  buildroot/share/PlatformIO/scripts/mks_robin_pro.py
327
-
328
-#
329
-# TRIGORILLA PRO (STM32F103ZET6)
330
-#
331
-[env:trigorilla_pro]
332
-platform      = ${common_stm32f1.platform}
333
-extends       = env:mks_robin
334
-extra_scripts = ${common_stm32f1.extra_scripts}
335
-
336
-#
337
-# MKS Robin E3D (STM32F103RCT6) and
338
-# MKS Robin E3 with TMC2209
339
-#
340
-[env:mks_robin_e3]
341
-platform      = ${common_stm32f1.platform}
342
-extends       = common_stm32f1
343
-board         = genericSTM32F103RC
344
-extra_scripts = ${common_stm32f1.extra_scripts}
345
-  buildroot/share/PlatformIO/scripts/mks_robin_e3.py
346
-build_flags   = ${common_stm32f1.build_flags}
347
-  -DDEBUG_LEVEL=0 -DSS_TIMER=4
348
-
349
-#
350
-# MKS Robin E3p (STM32F103VET6)
351
-#  - LVGL UI
352
-#
353
-[env:mks_robin_e3p]
354
-platform        = ${common_stm32f1.platform}
355
-extends         = common_stm32f1
356
-board           = genericSTM32F103VE
357
-extra_scripts   = ${common_stm32f1.extra_scripts}
358
-  buildroot/share/PlatformIO/scripts/mks_robin_e3p.py
359
-build_flags     = ${common_stm32f1.build_flags}
360
-  -DMCU_STM32F103VE -DSS_TIMER=4
361
-debug_tool      = jlink
362
-upload_protocol = jlink
363
-
364
-#
365
-# MKS Robin Lite/Lite2 (STM32F103RCT6)
366
-#
367
-[env:mks_robin_lite]
368
-platform      = ${common_stm32f1.platform}
369
-extends       = common_stm32f1
370
-board         = genericSTM32F103RC
371
-extra_scripts = ${common_stm32f1.extra_scripts}
372
-  buildroot/share/PlatformIO/scripts/mks_robin_lite.py
373
-
374
-#
375
-# MKS ROBIN LITE3 (STM32F103RCT6)
376
-#
377
-[env:mks_robin_lite3]
378
-platform      = ${common_stm32f1.platform}
379
-extends       = common_stm32f1
380
-board         = genericSTM32F103RC
381
-extra_scripts = ${common_stm32f1.extra_scripts}
382
-  buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
383
-
384
-#
385
-# FLY MINI (STM32F103RCT6)
386
-#
387
-[env:FLY_MINI]
388
-platform          = ${common_stm32f1.platform}
389
-extends           = common_stm32f1
390
-board             = genericSTM32F103RC
391
-board_build.address  = 0x08005000
392
-board_build.ldscript = fly_mini.ld
393
-extra_scripts     = ${common_stm32f1.extra_scripts}
394
-  buildroot/share/PlatformIO/scripts/custom_board.py
395
-build_flags       = ${common_stm32f1.build_flags}
396
-  -DDEBUG_LEVEL=0 -DSS_TIMER=4
397
-
398
-#
399
-# JGAurora A5S A1 (STM32F103ZET6)
400
-#
401
-[env:jgaurora_a5s_a1]
402
-platform      = ${common_stm32f1.platform}
403
-extends       = common_stm32f1
404
-board         = genericSTM32F103ZE
405
-board_build.address  = 0x0800A000
406
-board_build.ldscript = jgaurora_a5s_a1.ld
407
-extra_scripts = ${common_stm32f1.extra_scripts}
408
-  buildroot/share/PlatformIO/scripts/custom_board.py
409
-  buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
410
-build_flags   = ${common_stm32f1.build_flags}
411
-  -DSTM32F1xx -DSTM32_XL_DENSITY
412
-
413
-#
414
-# Malyan M200 (STM32F103CB)
415
-#
416
-[env:STM32F103CB_malyan]
417
-platform      = ${common_stm32f1.platform}
418
-extends       = common_stm32f1
419
-board         = marlin_malyanM200
420
-build_flags   = ${common_stm32f1.build_flags}
421
-  -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
422
-  -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
423
-lib_ignore    = ${common_stm32f1.lib_ignore}
424
-  SoftwareSerialM
425
-
426
-#
427
-# Chitu boards like Tronxy X5s (STM32F103ZET6)
428
-#
429
-[env:chitu_f103]
430
-platform      = ${common_stm32f1.platform}
431
-extends       = common_stm32f1
432
-board         = marlin_CHITU_F103
433
-extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
434
-  pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
435
-  buildroot/share/PlatformIO/scripts/chitu_crypt.py
436
-build_flags   = ${common_stm32f1.build_flags}
437
-  -DSTM32F1xx -DSTM32_XL_DENSITY
438
-build_unflags = ${common_stm32f1.build_unflags}
439
-  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
440
-
441
-#
442
-# Some Chitu V5 boards have a problem with GPIO init.
443
-# Use this target if G28 or G29 are always failing.
444
-#
445
-[env:chitu_v5_gpio_init]
446
-platform      = ${common_stm32f1.platform}
447
-extends       = env:chitu_f103
448
-build_flags   = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
449
-
450
-#
451 119
 # Creality (STM32F103RET6)
452 120
 #
453 121
 [env:STM32F103RET6_creality]
454
-platform        = ${env:STM32F103RE.platform}
455
-extends         = env:STM32F103RE
456
-build_flags     = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4
457
-board_build.address  = 0x08007000
458
-board_build.ldscript = creality.ld
459
-extra_scripts   = ${env:STM32F103RE.extra_scripts}
122
+platform             = ${common_stm32.platform}
123
+extends              = common_stm32
124
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
125
+board                = genericSTM32F103RE
126
+monitor_speed        = 115200
127
+board_build.core     = stm32
128
+board_build.variant  = MARLIN_F103Rx
129
+board_build.offset   = 0x7000
130
+board_build.ldscript = ldscript.ld
131
+board_upload.offset_address = 0x08007000
132
+build_unflags        = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
133
+extra_scripts        = ${common.extra_scripts}
134
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
460 135
   pre:buildroot/share/PlatformIO/scripts/random-bin.py
461
-  buildroot/share/PlatformIO/scripts/custom_board.py
462
-debug_tool      = jlink
463
-upload_protocol = jlink
136
+  buildroot/share/PlatformIO/scripts/stm32_bootloader.py
137
+debug_tool           = jlink
138
+upload_protocol      = jlink
464 139
 
465 140
 #
466
-# FLSUN QQS Pro (STM32F103VET6) using hal STM32
141
+# FLSUN QQS Pro (STM32F103VET6)
467 142
 # board Hispeedv1
468 143
 #
469 144
 [env:flsun_hispeedv1]
@@ -485,9 +160,9 @@ extra_scripts        = ${common.extra_scripts}
485 160
   buildroot/share/PlatformIO/scripts/mks_encrypt.py
486 161
 
487 162
 #
488
-# MKS Robin Nano V1.2 and V2 using hal STM32
163
+# MKS Robin Nano V1.2 and V2
489 164
 #
490
-[env:mks_robin_nano35_stm32]
165
+[env:mks_robin_nano35]
491 166
 platform             = ${common_stm32.platform}
492 167
 extends              = common_stm32
493 168
 build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3

+ 1
- 0
platformio.ini Wyświetl plik

@@ -24,6 +24,7 @@ extra_configs =
24 24
     ini/native.ini
25 25
     ini/samd51.ini
26 26
     ini/stm32f0.ini
27
+    ini/stm32f1-maple.ini
27 28
     ini/stm32f1.ini
28 29
     ini/stm32f4.ini
29 30
     ini/stm32f7.ini

Ładowanie…
Anuluj
Zapisz