Skip to content

Commit 3592c1f

Browse files
committed
- fixed building for STM32 flash-drive mix-in enabled board configurations
Please check PR rhapsodyv/Arduino_Core_STM32#1 and if @rhapsodyv has merged then adjust the dependency to an official one!
1 parent 95b1a5a commit 3592c1f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

buildroot/share/PlatformIO/scripts/generic_create_variant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
else:
3535
platform_name = PackageSpec(platform_packages[0]).name
3636

37-
if platform_name in [ "usb-host-msc", "usb-host-msc-cdc-msc", "usb-host-msc-cdc-msc-2", "usb-host-msc-cdc-msc-3", "tool-stm32duino", "biqu-bx-workaround", "main" ]:
37+
if platform_name in [ "Arduino_Core_STM32", "usb-host-msc", "usb-host-msc-cdc-msc", "usb-host-msc-cdc-msc-2", "usb-host-msc-cdc-msc-3", "tool-stm32duino", "biqu-bx-workaround", "main" ]:
3838
platform_name = "framework-arduinoststm32"
3939

4040
FRAMEWORK_DIR = Path(platform.get_package_dir(platform_name))

ini/stm32-common.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extra_scripts = ${stm32_variant.extra_scripts}
4949
# USB Flash Drive mix-ins for STM32
5050
#
5151
[stm_flash_drive]
52-
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
52+
platform_packages = framework-arduinoststm32@https://github.com/quiret/Arduino_Core_STM32.git#usb-host-msc-cdc-msc-3
5353
build_flags = ${common_stm32.build_flags}
5454
-DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
5555
-DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4

ini/stm32f1.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ board_upload.offset_address = 0x08007000
6666
[env:STM32F103RC_btt_USB]
6767
extends = env:STM32F103RC_btt
6868
platform_packages = ${stm_flash_drive.platform_packages}
69+
board_build.variant = MARLIN_F103Rx
6970
build_flags = ${env:STM32F103RC_btt.build_flags}
7071
-DUSE_USB_FS
7172
-DUSBD_IRQ_PRIO=5
@@ -204,6 +205,7 @@ upload_protocol = jlink
204205
[env:STM32F103RE_btt_USB]
205206
extends = env:STM32F103RE_btt
206207
platform_packages = ${stm_flash_drive.platform_packages}
208+
board_build.variant = MARLIN_F103Rx
207209
build_flags = ${env:STM32F103RE_btt.build_flags}
208210
-DUSE_USB_FS -DUSBD_IRQ_PRIO=5
209211
-DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
@@ -463,17 +465,17 @@ build_unflags = ${stm32_variant_latest.build_unflags} -DUSBD_USE_CDC
463465
[env:STM32F103RC_ZM3E2_USB]
464466
extends = ZONESTAR_ZM3E
465467
board = genericSTM32F103RC
466-
#board_build.variant = MARLIN_F103Rx
468+
board_build.variant = MARLIN_F103Rx
467469

468470
[env:STM32F103VC_ZM3E4_USB]
469471
extends = ZONESTAR_ZM3E
470472
board = genericSTM32F103VC
471-
#board_build.variant = MARLIN_F103Vx
473+
board_build.variant = MARLIN_F103Vx
472474
build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
473475

474476
[env:STM32F103VE_ZM3E4V2_USB]
475477
extends = ZONESTAR_ZM3E
476478
board = genericSTM32F103VE
477-
#board_build.variant = MARLIN_F103Vx
479+
board_build.variant = MARLIN_F103Vx
478480
build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
479481
board_upload.maximum_size = 499712

0 commit comments

Comments
 (0)