From 0398a0b780afe73115374900814f4c87b43a3889 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Thu, 3 Jun 2021 18:52:25 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BD=EF=B8=8F=20Fix=20usb-host-msc-cdc-?= =?UTF-8?q?msc=20issue=20(#22025)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/inc/Conditionals_adv.h | 2 +- buildroot/share/PlatformIO/scripts/generic_create_variant.py | 2 +- ini/stm32f1.ini | 2 +- ini/stm32f4.ini | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h index 9c9a7014c7..d71a5c61b9 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h @@ -21,7 +21,7 @@ */ #pragma once -#if defined(USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) +#if BOTH(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) #define HAS_SD_HOST_DRIVE 1 #endif diff --git a/buildroot/share/PlatformIO/scripts/generic_create_variant.py b/buildroot/share/PlatformIO/scripts/generic_create_variant.py index 3290dcea19..75c62ef70e 100644 --- a/buildroot/share/PlatformIO/scripts/generic_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -28,7 +28,7 @@ if len(platform_packages) == 0: else: platform_name = PackageSpec(platform_packages[0]).name -if platform_name in [ "usb-host-msc", "usb-host-msc-cdc-msc", "tool-stm32duino" ]: +if platform_name in [ "usb-host-msc", "usb-host-msc-cdc-msc", "usb-host-msc-cdc-msc-2", "tool-stm32duino" ]: platform_name = "framework-arduinoststm32" FRAMEWORK_DIR = platform.get_package_dir(platform_name) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 7bf8ea3617..a0dd38fcd4 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -96,7 +96,7 @@ board_upload.offset_address = 0x08007000 [env:STM32F103RC_btt_USB] extends = env:STM32F103RC_btt platform = ${common_stm32.platform} -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags} -DUSBCON diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 087a446ede..d730387cb9 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -146,7 +146,7 @@ debug_init_break = # USB Flash Drive mix-ins for STM32 # [stm_flash_drive] -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc.zip +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4 @@ -424,7 +424,7 @@ build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} [env:mks_robin_nano_v3_usb_flash_drive_msc] platform = ${common_stm32.platform} extends = env:mks_robin_nano_v3 -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} -DUSBCON