cancel
Showing results for 
Search instead for 
Did you mean: 

Unknown type name errors in usb device libraries when building basic project for STM32F429ZIT6

jchang98
Visitor

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:

  1. I created the project via File -> New -> STM Project
  2. I selected the STM32F429ZIT6 Board and generated the ioc file
  3. I changed a few things in the ioc file:
    1. I added 2 address bits at PD11 and PD12
    2. I changed PG10 to FMC_NE3 and enabled NOR Flash/PSRAM/SRAM/ROM/LCD 1, to chip select -> NE3, 18 Address bits, and 16 data bits, and enabled write operation
    3. I changed USB_OTG_HS, Internal FS Phy -> Device Only, and enabled USB_DEVICE (Class for HS IP to Virtual Port Com)
  4. After saving and generating code, I included usbd_cdc.h to my main.h header. Building it generates 308 errors

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.

0 REPLIES 0