Open jmz52 opened 1 year ago
I've pinged @rhapsodyv on Discord and they were willing to update their fork, but we may want to bringArduino_Core_STM32
under Marlin's list of managed code / bring in my Arduino_Core_STM32
fork with SoftwareSerial fix for the Biqu BX as well while we're at it.
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Unlike their more expensive STM32F407 cousins, the STM32F4x1Cx MCUs do not have a luxury of secondary USB controller.
USB_FLASH_DRIVE_SUPPORT on STM32 requires custom framework-arduinoststm32
https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
USB Host initialization function expects bothUSB_OTG_FS
(Full Speed) andUSB_OTG_HS
(High Speed) to be defined at compilation time. STM32F401CC MCU only hasUSB_OTG_FS
which leads to compilation errors due to undefinedUSB_OTG_HS
macro.USBH_LL_Init()
function should be updated to excludeHOST_HS
code whenUSB_OTG_HS
is not defined. https://github.com/rhapsodyv/Arduino_Core_STM32/blob/usb-host-msc-cdc-msc-3/cores/arduino/stm32/usb_host/usbh_conf.c#L237Here is the corrected code where the
#ifdef USB_OTG_HS
check is used to block unused section of the code. @rhapsodyv, please apply this fix to usb-host-msc-cdc-msc-3 branch.Expected behavior
Marlin can be compiled for STM32F401CC with
USB_FLASH_DRIVE_SUPPORT
andUSE_OTG_USB_HOST
options enabled.Actual behavior
Enabling
USB_FLASH_DRIVE_SUPPORT
andUSE_OTG_USB_HOST
causes compilation errors.Version of Marlin Firmware
bugfix-2.1.x
Electronics
STM32F401CCU6 and STM32F411CEU6 boards a.k.a
black pill