Closed DinkDonk closed 2 years ago
Hi @DinkDonk,
Thank you for this report. Unfortunately we don't treat aspect related to CubeMx tool in our GitHub repositories. Please allow me to redirect you to the ST Community. You can report this issue in the CubeMX related section. There you shall find people who will address your request and whom you will hopefully find a solution with.
Thank you again for your report. We are looking forward to reading from you again.
With regards,
Hi @DinkDonk,
An internal tracker has been logged and a fix will be implemented and made available in the frame of a future release of CubeMX.
Thank you for your contribution. We are looking forward to reading from you again.
With regards,
ST Internal Reference: 120440
Set-up
Makefile
selected asToolchain / IDE
Description When setting up a USB-PD project – STM32CubeMX does not generate the needed static library imports in the Makefile, causing a lot of
undefined reference
errors when compiling. These references are impossible to look up due to them being defined in archived libraries, making it impossible to debug.How To Reproduce
Set up a new project in STMCubeMX according to AN5418.
Choose
Makefile
asToolchain / IDE
in theProject Manager
tab.Generate the code and build with
$ make
Observe failed build caused by
undefined reference
errors in the output.Solution The error is caused by missing static library definitions in the generated Makefile.
Generated Makefile:
Expected Makefile:
Observe change in
LIBDIR
.The static library is chosen by selecting a
Stack Configuration
for theUSBPD
middleware in STM32CubeMX.Correct behaviour can be seen when doing the exact same project setup inside STM32CubeIDE.