Associate III
February 12, 2026
Solved
STM32CubeMX generated USBPD not compiling
- February 12, 2026
- 1 reply
- 301 views
Hello,
I created a complex project for a STM32H573 based custom board. That project is ThreadX based and it shall use the USPBD package.
I generated to project with STM32CubeMX version 6.16.1 using STM32Cube MCU Package for STM32H5 Series 1.5.1 (see attached IOC file for reference)
I create the code for the latest STM32CubeIDE 2.0.0. The project is imported successfully, but does not compile and the following errors are logged:
Description Resource Path Location Type
'USBPD_CORE_PDO_TYPE_APDO' undeclared (first use in this function); did you mean 'USBPD_CORE_PDO_TYPE_FIXED'? usbpd_dpm_user.c /test03/USBPD/Target line 1100 C/C++ Problem
'USBPD_CORE_PDO_TYPE_APDO' undeclared (first use in this function); did you mean 'USBPD_CORE_PDO_TYPE_FIXED'? usbpd_dpm_user.c /test03/USBPD/Target line 1577 C/C++ Problem
'USBPD_ParamsTypeDef' has no member named 'PE_UnchunkSupport' usbpd_dpm_user.c /test03/USBPD/Target line 1507 C/C++ Problem
'USBPD_ParamsTypeDef' has no member named 'PE_UnchunkSupport' usbpd_dpm_user.c /test03/USBPD/Target line 1511 C/C++ Problem
'USBPD_PDO_TypeDef' has no member named 'SRCSNKAPDO' usbpd_dpm_user.c /test03/USBPD/Target line 1275 C/C++ Problem
'USBPD_PDO_TypeDef' has no member named 'SRCSNKAPDO' usbpd_dpm_user.c /test03/USBPD/Target line 1276 C/C++ Problem
'USBPD_PDO_TypeDef' has no member named 'SRCSNKAPDO' usbpd_dpm_user.c /test03/USBPD/Target line 1295 C/C++ Problem
'USBPD_PDO_TypeDef' has no member named 'SRCSNKAPDO' usbpd_dpm_user.c /test03/USBPD/Target line 1296 C/C++ Problem
'USBPD_PDO_TypeDef' has no member named 'SRCSNKAPDO' usbpd_dpm_user.c /test03/USBPD/Target line 1297 C/C++ Problem
make: *** [USBPD/App/subdir.mk:28: USBPD/App/usbpd_dpm_core.o] Error 1 test03 C/C++ Problem
make: *** [USBPD/App/subdir.mk:28: USBPD/App/usbpd_pwr_if.o] Error 1 test03 C/C++ Problem
make: *** [USBPD/App/subdir.mk:28: USBPD/App/usbpd.o] Error 1 test03 C/C++ Problem
make: *** [USBPD/Target/subdir.mk:22: USBPD/Target/usbpd_dpm_user.o] Error 1 test03 C/C++ Problem
make: *** Waiting for unfinished jobs.... test03 C/C++ Problem
unknown type name 'USBPD_PPSSDB_TypeDef' usbpd_dpm_user.h /test03/USBPD/Target line 96 C/C++ Problem
When looking at the code, I do not understand why these defines and types are missing, they should all be there.It looks like there are some project settings missing or wrong set. Maybe there is a bug in the code generator?
Any help on getting this to compile would be highly appreciated.
Thank you!
/Thomas

