2024-01-30 02:40 PM
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)
Solved! Go to Solution.
2024-02-01 02:15 AM
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
2024-01-31 12:29 AM
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
2024-01-31 08:06 AM - edited 2024-01-31 08:08 AM
2024-02-01 02:15 AM
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