Skip to main content
Icont.1
Associate III
October 22, 2021
Solved

Linker error in STM32 project

  • October 22, 2021
  • 5 replies
  • 4264 views

I created a project with CubeIde for the nucleo144 board. I managed the pins for my specific configuration, I inserted files already created externally to perform functions but at the time of compilation I get this error

Cannot find the specified linker script. Check the linker settings in the build configuration. 

Cannot find the specified linker script. Check the linker settings in the build configuration.

but in the configuration I have not touched anything from the initial creation of the project and its first compilation.

This topic has been closed for replies.
Best answer by TDK

The two *.ld files are linker files. By default, it should be using the one that ends in _FLASH.

Including the full error message would be helpful. The linker command will specify the filename it's using and trying to find.

5 replies

ST Technical Moderator
October 22, 2021

​Hello @Icont.1​ ,

Make sure that you have the correct linker script path.

You should set properly Under "Linker Script" the right path in CubeIde (Properties->C/C++ Build ->Setting ->Tool Settings->MCU G++ Linker ->General).

You can share a screenshot if your issue is not resolved.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Icont.1
Icont.1Author
Associate III
October 22, 2021

the screen of the setting is this but in the project folder I have no reference to anything about the linker. Which file or folder should I go to recover and insert to fix the problem?0693W00000FDQnjQAH.png0693W00000FDQm2QAH.png

TDK
TDKBest answer
October 22, 2021

The two *.ld files are linker files. By default, it should be using the one that ends in _FLASH.

Including the full error message would be helpful. The linker command will specify the filename it's using and trying to find.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Icont.1
Icont.1Author
Associate III
October 25, 2021

full error message0693W00000FDb1MQAT.png

Icont.1
Icont.1Author
Associate III
October 25, 2021

thanks I solved by manually setting as linker the file *.ld (FLASH) from the settings.