Sfoglia il codice sorgente

🔨 Fix OpenBLT encode; no-bootloader envs (#24446)

EvilGremlin 2 anni fa
parent
commit
e94fa7d5dc
Nessun account collegato all'indirizzo email del committer
3 ha cambiato i file con 40 aggiunte e 18 eliminazioni
  1. 3
    3
      Marlin/src/pins/pins.h
  2. 3
    3
      buildroot/share/PlatformIO/scripts/openblt.py
  3. 34
    12
      ini/stm32f4.ini

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

@@ -678,15 +678,15 @@
678 678
 #elif MB(MKS_ROBIN_NANO_V3_1)
679 679
   #include "stm32f4/pins_MKS_ROBIN_NANO_V3.h"   // STM32F4                                env:mks_robin_nano_v3_1 env:mks_robin_nano_v3_1_usb_flash_drive env:mks_robin_nano_v3_1_usb_flash_drive_msc
680 680
 #elif MB(ANET_ET4)
681
-  #include "stm32f4/pins_ANET_ET4.h"            // STM32F4                                env:Anet_ET4_OpenBLT
681
+  #include "stm32f4/pins_ANET_ET4.h"            // STM32F4                                env:Anet_ET4_no_bootloader env:Anet_ET4_OpenBLT
682 682
 #elif MB(ANET_ET4P)
683
-  #include "stm32f4/pins_ANET_ET4P.h"           // STM32F4                                env:Anet_ET4_OpenBLT
683
+  #include "stm32f4/pins_ANET_ET4P.h"           // STM32F4                                env:Anet_ET4_no_bootloader env:Anet_ET4_OpenBLT
684 684
 #elif MB(FYSETC_CHEETAH_V20)
685 685
   #include "stm32f4/pins_FYSETC_CHEETAH_V20.h"  // STM32F4                                env:FYSETC_CHEETAH_V20
686 686
 #elif MB(MKS_MONSTER8)
687 687
   #include "stm32f4/pins_MKS_MONSTER8.h"        // STM32F4                                env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc
688 688
 #elif MB(TH3D_EZBOARD_V2)
689
-  #include "stm32f4/pins_TH3D_EZBOARD_V2.h"     // STM32F4                                env:TH3D_EZBoard_V2
689
+  #include "stm32f4/pins_TH3D_EZBOARD_V2.h"     // STM32F4                                env:TH3D_EZBoard_V2_no_bootloader env:TH3D_EZBoard_V2_OpenBLT
690 690
 #elif MB(OPULO_LUMEN_REV3)
691 691
   #include "stm32f4/pins_OPULO_LUMEN_REV3.h"    // STM32F4                                env:Opulo_Lumen_REV3
692 692
 #elif MB(MKS_ROBIN_NANO_V1_3_F4)

+ 3
- 3
buildroot/share/PlatformIO/scripts/openblt.py Vedi File

@@ -10,11 +10,11 @@ if pioutil.is_pio_build():
10 10
 
11 11
 	board = env.BoardConfig()
12 12
 	board_keys = board.get("build").keys()
13
-	if 'encrypt' in board_keys:
13
+	if 'encode' in board_keys:
14 14
 		env.AddPostAction(
15 15
 			join("$BUILD_DIR", "${PROGNAME}.bin"),
16 16
 			env.VerboseAction(" ".join([
17 17
 				"$OBJCOPY", "-O", "srec",
18
-				"\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encrypt")) + "\""
19
-			]), "Building $TARGET")
18
+				"\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encode")) + "\""
19
+			]), "Building " + board.get("build.encode"))
20 20
 		)

+ 34
- 12
ini/stm32f4.ini Vedi File

@@ -106,24 +106,34 @@ extra_scripts     = ${stm32_variant.extra_scripts}
106 106
 
107 107
 #
108 108
 # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
109
-# For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases
110
-# Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000.
111 109
 #
112
-[env:Anet_ET4_OpenBLT]
110
+[Anet_ET4]
113 111
 extends                     = stm32_variant
114 112
 board                       = marlin_STM32F407VGT6_CCM
115 113
 board_build.variant         = MARLIN_F4x7Vx
116
-board_build.encrypt_mks     = firmware.srec
117
-board_build.offset          = 0x10000
118
-board_upload.offset_address = 0x08010000
119 114
 build_flags                 = ${stm32_variant.build_flags}
120 115
                               -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
121 116
 build_unflags               = ${stm32_variant.build_unflags}
122 117
                               -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
118
+
119
+#
120
+# Anet ET4 directly flashed via ST-Link
121
+#
122
+[env:Anet_ET4_no_bootloader]
123
+extends                     = Anet_ET4
124
+debug_tool                  = stlink
125
+upload_protocol             = stlink
126
+
127
+#
128
+# Anet ET4 with OpenBLT from https://github.com/davidtgbe/openblt/releases
129
+#
130
+[env:Anet_ET4_OpenBLT]
131
+extends                     = Anet_ET4
132
+board_build.encode          = firmware.srec
133
+board_build.offset          = 0x10000
134
+board_upload.offset_address = 0x08010000
123 135
 extra_scripts               = ${stm32_variant.extra_scripts}
124 136
                               buildroot/share/PlatformIO/scripts/openblt.py
125
-debug_tool                  = jlink
126
-upload_protocol             = jlink
127 137
 
128 138
 #
129 139
 # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
@@ -546,16 +556,28 @@ build_unflags     = -DUSBD_USE_CDC
546 556
 #
547 557
 # TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
548 558
 #
549
-[env:TH3D_EZBoard_V2]
559
+[TH3D_EZBoard_V2]
550 560
 extends                     = stm32_variant
551 561
 board                       = genericSTM32F405RG
552 562
 board_build.variant         = MARLIN_TH3D_EZBOARD_V2
553
-board_build.encrypt_mks     = firmware.bin
554
-board_build.offset          = 0xC000
555
-board_upload.offset_address = 0x0800C000
556 563
 build_flags                 = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
564
+
565
+#
566
+# TH3D EZBoard v2.0 directly flashed via ST-Link
567
+#
568
+[env:TH3D_EZBoard_V2_no_bootloader]
569
+extends                     = TH3D_EZBoard_V2
557 570
 debug_tool                  = stlink
558 571
 upload_protocol             = stlink
572
+
573
+#
574
+# TH3D EZBoard v2.0 with OpenBLT from https://github.com/rhapsodyv/OpenBLT-STM32
575
+#
576
+[env:TH3D_EZBoard_V2_OpenBLT]
577
+extends                     = TH3D_EZBoard_V2
578
+board_build.encode          = firmware.bin
579
+board_build.offset          = 0xC000
580
+board_upload.offset_address = 0x0800C000
559 581
 extra_scripts               = ${stm32_variant.extra_scripts}
560 582
                               buildroot/share/PlatformIO/scripts/openblt.py
561 583
 

Loading…
Annulla
Salva