cancel
Showing results for 
Search instead for 
Did you mean: 

How do you fix "Cannot find the specified linker script. Check the linker settings in the build configuration" when using External Builder and default Builder Script?

JBlow.1
Associate

I found ZERO help available.

The Makeflie created by STM32CubeIED contains the line:

# Tool invocations

WRC-1734-stm32f072-win.elf WRC-1734-stm32f072-win.map: $(OBJS) $(USER_OBJS) fail-specified-linker-script-missing makefile objects.list $(OPTIONAL_TOOL_DEPS)

arm-none-eabi-gcc -o "WRC-1734-stm32f072-win.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m0 --specs=nosys.specs -Wl,-Map="WRC-1734-stm32f072-win.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

@echo 'Finished building target: $@'

@echo ' '

5 REPLIES 5
Pavel A.
Evangelist III

> fail-specified-linker-script-missing

Really? This is generated in the makefile for stm32f072?

There is no such thing as "builder script". Either you mean a linker script (usually a .ld file) or a Makefile, or Eclipse CDT project (.project + .cproject)

Have you created a new CubeIDE project, or this is an existing example or imported from other IDE?

Markus GIRDLAND
ST Employee

Hello there,

I would try to check your build configuration and make sure that the path to the linker script is set up correctly.

The reason for the error is that the path that is written in the configuration contains variables that Eclipse resolves. If the string is empty after the variables have been resolved then the error is added to the makefile to make the user aware.

I'll attach a screenshot showing where the setting is:0693W00000LxgORQAZ.png 

In my example I need to have a "STM32L412CBTX_FLASH.ld" in the root of my project, which is where it's located for me.

Mark_MT
Associate II

This problem stil exist. STM32CubeIDE Version: 1.12.0

The project was copied to another location. Now Error: Cannot find the specified linker script.

Restore defaults does not help.

When changing the Linker Script path, default: ${workspace_loc:/${ProjName}/STM32F413RGTX_FLASH.ld} to a hard path

The linker script is found but now my .bin file is 680 bytes where 200K was expected.

File comparing the project working on the original location and non working location only shows a difference in the language.settings.xml

Mark_MT
Associate II

Found it: somehow the x was upcasted:

STM32F413RGTX_FLASH.ld

STM32F413RGTx_FLASH.ld = OK

Sam.Cheng
Associate

Hi Mark,

Thank you for finding out.

I had the same issue in IDE 1.12.0 when I clone my project from git.