cancel
Showing results for 
Search instead for 
Did you mean: 

MxCube Bug: STM32H747XI USB_HS includes API's in both projects

MFolk.1
Senior

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)

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @MFolk.1 

Thank you for your contributions and for your detailed explanations,

I confirm the issue on my side, it has been reported to STM32CubeMX development team .

Internal ticket number:172326(This is an internal tracking number and is not accessible or usable by customers).

For the moment in order to build the project successfully , you need to delete the ST folder under potentalH7_CM4\ Middlewares.

I will keep you posted with updates.

Thx

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
Ghofrane GSOURI
ST Employee

Hello @MFolk.1 

First let me thank you for posting.

I tried to reproduce the issue mentioned above using the latest version of CubeMX 6.10.0 and everything works correctly , could you please share your IOC in order to push further the investigation.

I will be waiting for your feedback.

Thx

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks for your willingness to look into this issue. See attached.

Note that I'm also using CubeMx 6.10.0 (within STM32CubeIDE 1.14.0).

Hello @MFolk.1 

Thank you for your contributions and for your detailed explanations,

I confirm the issue on my side, it has been reported to STM32CubeMX development team .

Internal ticket number:172326(This is an internal tracking number and is not accessible or usable by customers).

For the moment in order to build the project successfully , you need to delete the ST folder under potentalH7_CM4\ Middlewares.

I will keep you posted with updates.

Thx

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi, 

I'm facing same issue with STM32CubeMX 6.12.0 and STM32F746. How do i fix it?!

 

Regards,

Chia