2025-02-10 03:50 AM
Hello,
I am trying to create a project using the STM32F429ZIT6 board, but whenever I activate and try to use the usbd libraries, I get countless "error: unknown type name 'USBD_ClassTypeDef'" and similar errors. For some reason, the library usbd_def.h is not "seen" by the other usbd libraries, and all the definitions aren't being imported despite all the header files including usbd_def.h, whether directly or indirectly. I have tried changing the header files to only directly include usbd_def.h, but there's always one file that doesn't seem to want to work; for me, it is usbd_cdc.h. Am I missing something obvious when setting up the project?
I am using STM32CubeIDE 1.17 and the firmware is "STM32Cube_FW_F4_V1.28.1", which should be the latest firmware. The steps I took to create these errors are:
After fiddling with the code for some time, I can reduce the errors to around 43 or so when I remove some circular dependencies between the usbd libraries. Still, there shouldn't be any errors with the generated code in the first place, which makes me wonder what I'm doing wrong. I saw that there was one forum post in the past that was similar, but the problem they had was outdated firmware. Attached is the console output for the errors.