2025-02-20 12:47 AM
When building with STM32CubeIDE, an error related to gnu-toolchain occurs.
I am attaching the error log.
Looking at the log, it seems that the error occurs because libc.a and libm.a cannot be found.
However, since the above libraries are eventually found in another folder, the error seems to be avoided, but the following error is output afterwards.
collect2.exe: error: ld returned 5 exit status
Even though this error is displayed, the executable file (*.elf) is generated, so the build itself seems to be successful, but I don't know why the error is displayed.
I am not sure what caused this error, but I think it was probably after I upgraded CubeIDE.
I have tried reinstalling CubeIDE and reverting to older versions (Ver1.14.0, Ver1.16.0, etc.), but it did not improve.
If you have any workarounds for this phenomenon, please let me know.
2025-02-20 01:14 AM
Hello @k_kato ,
First let me thank you for posting and welcome to the ST Community.
For more investigation, I suggest please that you provide your STM32CubeIDE project.
Thanks.
Mahmoud
2025-02-20 06:39 PM
Dear Mahmoud.
Thank you for your reply.
I confirmed this problem by creating a new test project in my environment.
I have attached the entire project file.
This project was created in CubeIDE (Ver1.17.0) by selecting the STM32F072 chip from the new project creation screen.
After creation, no other changes were made to the source code, only a build was performed.
I have also attached the build log from this time, and the error is almost identical to the error log I presented last time.
Does this information tell us anything?