MxCube Bug: STM32H747XI USB_HS includes API's in both projects
When attempting to configure USB_OTG_HS and corresponding USB_DEVICE_M4/M7 middleware on STM32H747XI (on either M7 or M4 cores), the "STM32_USB_Device_Library" directory gets included on both cores, causing the core that isn't using the USB peripheral to fail build. Here are the errors that occur:
/.../H7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:20:10: fatal error: usbd_core.h: No such file or directory
20 | #include "usbd_core.h"
| ^~~~~~~~~~~~~
compilation terminated.
/.../H7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c:20:10: fatal error: usbd_ctlreq.h: No such file or directory
20 | #include "usbd_ctlreq.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
/.../H7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c:20:10: fatal error: usbd_ioreq.h: No such file or directory
20 | #include "usbd_ioreq.h"
| ^~~~~~~~~~~~~~
compilation terminated.
/.../H7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c:59:10: fatal error: usbd_cdc.h: No such file or directory
59 | #include "usbd_cdc.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk:25: Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk:27: Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o] Error 1
make: *** [Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk:29: Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o] Error 1
make: *** [Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/subdir.mk:19: Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.o] Error 1
"make -j24 all" terminated with exit code 2. Build might be incomplete.
15:38:03 Build Failed. 9 errors, 0 warnings. (took 277ms)
