Bladeren bron

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

EvilGremlin 1 jaar geleden
bovenliggende
commit
e94fa7d5dc
No account linked to committer's email address
3 gewijzigde bestanden met toevoegingen van 40 en 18 verwijderingen
  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 Bestand weergeven

678
 #elif MB(MKS_ROBIN_NANO_V3_1)
678
 #elif MB(MKS_ROBIN_NANO_V3_1)
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
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
 #elif MB(ANET_ET4)
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
 #elif MB(ANET_ET4P)
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
 #elif MB(FYSETC_CHEETAH_V20)
684
 #elif MB(FYSETC_CHEETAH_V20)
685
   #include "stm32f4/pins_FYSETC_CHEETAH_V20.h"  // STM32F4                                env:FYSETC_CHEETAH_V20
685
   #include "stm32f4/pins_FYSETC_CHEETAH_V20.h"  // STM32F4                                env:FYSETC_CHEETAH_V20
686
 #elif MB(MKS_MONSTER8)
686
 #elif MB(MKS_MONSTER8)
687
   #include "stm32f4/pins_MKS_MONSTER8.h"        // STM32F4                                env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc
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
 #elif MB(TH3D_EZBOARD_V2)
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
 #elif MB(OPULO_LUMEN_REV3)
690
 #elif MB(OPULO_LUMEN_REV3)
691
   #include "stm32f4/pins_OPULO_LUMEN_REV3.h"    // STM32F4                                env:Opulo_Lumen_REV3
691
   #include "stm32f4/pins_OPULO_LUMEN_REV3.h"    // STM32F4                                env:Opulo_Lumen_REV3
692
 #elif MB(MKS_ROBIN_NANO_V1_3_F4)
692
 #elif MB(MKS_ROBIN_NANO_V1_3_F4)

+ 3
- 3
buildroot/share/PlatformIO/scripts/openblt.py Bestand weergeven

10
 
10
 
11
 	board = env.BoardConfig()
11
 	board = env.BoardConfig()
12
 	board_keys = board.get("build").keys()
12
 	board_keys = board.get("build").keys()
13
-	if 'encrypt' in board_keys:
13
+	if 'encode' in board_keys:
14
 		env.AddPostAction(
14
 		env.AddPostAction(
15
 			join("$BUILD_DIR", "${PROGNAME}.bin"),
15
 			join("$BUILD_DIR", "${PROGNAME}.bin"),
16
 			env.VerboseAction(" ".join([
16
 			env.VerboseAction(" ".join([
17
 				"$OBJCOPY", "-O", "srec",
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 Bestand weergeven

106
 
106
 
107
 #
107
 #
108
 # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
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
 extends                     = stm32_variant
111
 extends                     = stm32_variant
114
 board                       = marlin_STM32F407VGT6_CCM
112
 board                       = marlin_STM32F407VGT6_CCM
115
 board_build.variant         = MARLIN_F4x7Vx
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
 build_flags                 = ${stm32_variant.build_flags}
114
 build_flags                 = ${stm32_variant.build_flags}
120
                               -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
115
                               -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
121
 build_unflags               = ${stm32_variant.build_unflags}
116
 build_unflags               = ${stm32_variant.build_unflags}
122
                               -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
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
 extra_scripts               = ${stm32_variant.extra_scripts}
135
 extra_scripts               = ${stm32_variant.extra_scripts}
124
                               buildroot/share/PlatformIO/scripts/openblt.py
136
                               buildroot/share/PlatformIO/scripts/openblt.py
125
-debug_tool                  = jlink
126
-upload_protocol             = jlink
127
 
137
 
128
 #
138
 #
129
 # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
139
 # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
546
 #
556
 #
547
 # TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
557
 # TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
548
 #
558
 #
549
-[env:TH3D_EZBoard_V2]
559
+[TH3D_EZBoard_V2]
550
 extends                     = stm32_variant
560
 extends                     = stm32_variant
551
 board                       = genericSTM32F405RG
561
 board                       = genericSTM32F405RG
552
 board_build.variant         = MARLIN_TH3D_EZBOARD_V2
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
 build_flags                 = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
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
 debug_tool                  = stlink
570
 debug_tool                  = stlink
558
 upload_protocol             = stlink
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
 extra_scripts               = ${stm32_variant.extra_scripts}
581
 extra_scripts               = ${stm32_variant.extra_scripts}
560
                               buildroot/share/PlatformIO/scripts/openblt.py
582
                               buildroot/share/PlatformIO/scripts/openblt.py
561
 
583
 

Laden…
Annuleren
Opslaan