2020-08-12 08:16 AM
After running STM32CubeMX a few times with different USBPD Stack configuration settings (while I was experimenting to see how much code was being generated for each) I found that it was exporting the following preprocessor values to my project (shown in the .cproject snippet), and thus breaking the build:
<listOptionValue builtIn="false" value="USBPD_PORT_COUNT=1"/>
<listOptionValue builtIn="false" value="USBPD_STATE_MACHINE"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32G474xx"/>
<listOptionValue builtIn="false" value="_RTOS"/>
<listOptionValue builtIn="false" value="USBPDCORE_LIB_PD3_CONFIG_MINSNK"/>
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="_SNK"/>
<listOptionValue builtIn="false" value="USBPDCORE_LIB_NO_PD"/>
<listOptionValue builtIn="false" value="USBPDCORE_LIB_PD3_FULL"/>
All of the USBPDCORE_LIB_xxxxx libraries associated with the above USCPDCORExxxx preprocessor defines were also referenced in the .cproject file.
e.g. ../Middlewares/ST/STM32_USBPD_Library/Core/lib/USBPDCORE_PD3_FULL_CM4_wc32.a
A couple of questions:
Kind Regards
Jan