From adc17933cddcd21b359708f3db4b08ace23331ab Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Sun, 13 Jun 2021 21:01:53 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20Serial+MSC=20for=20=5FUSB?= =?UTF-8?q?=20envs=20(#22116)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/PlatformIO/scripts/generic_create_variant.py | 2 +- ini/stm32f1.ini | 10 ++++------ ini/stm32f4.ini | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/generic_create_variant.py b/buildroot/share/PlatformIO/scripts/generic_create_variant.py index 75c62ef70..7f76ef942 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", "usb-host-msc-cdc-msc-2", "tool-stm32duino" ]: +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" ]: platform_name = "framework-arduinoststm32" FRAMEWORK_DIR = platform.get_package_dir(platform_name) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index de5c4b6c8..dca640cd5 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -89,14 +89,13 @@ 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-2.zip +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags} -DUSBCON - -DUSE_USBHOST_HS + -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 - -DUSE_USB_HS_IN_FS -DUSBD_USE_CDC_MSC # @@ -188,14 +187,13 @@ upload_protocol = jlink [env:STM32F103RE_btt_USB] extends = env:STM32F103RE_btt platform = ${common_stm32.platform} -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-2.zip +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.build_flags} -DUSBCON - -DUSE_USBHOST_HS + -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 - -DUSE_USB_HS_IN_FS -DUSBD_USE_CDC_MSC # diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 4fa5fa24a..dec7fea56 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -145,7 +145,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-cdc-msc-2.zip +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4 @@ -420,7 +420,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-2.zip +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} -DUSBCON