STM32CubeIDE(Ver1.17.0)build link error.(GNU toolchain)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-02-20 1: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-02-20 6: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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-02-25 4:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-02-27 3:56 PM
Dear Mahmoud.
Thank you for testing.
I'm sorry that I couldn't reproduce it on your side.
In my environment, the error is occurring as before.
However, I cannot confirm the problem because I do not know the details of the error output by this linker.
I have not changed this project since I created it with the CubeIDE wizard, so I don't think there is a problem with the project itself.
If it does not occur in your environment, it may be an environmental problem with the PC I am using.
It is highly likely that the problem occurred after updating CubeIDE, so there may be some problem when updating from the old version to the new version.
(This problem did not occur when I used it before)
Reinstalling CubeIDE did not improve the situation, so it may be difficult to pursue the root cause of the problem.
Fortunately, I will be able to replace my development environment (PC) with a new model soon, so I would like to test CubeIDE under a clean OS at that time.
It will be a while before I replace my PC, but I will report back when I know the results.
Thank you for your response.
