Skip to main content
PMart.1
Associate II
August 14, 2020
Solved

Custom Linker Script with CubeMX

  • August 14, 2020
  • 3 replies
  • 6467 views

Hi there,

I would like to customize the linker script generated by CubeMX.

Right now, any changes to the linker file get overwritten when I generate code from CubeMX.

Is there a way I can accomplish this? Thanks!

Best answer by KnarfB

You can rename the generated .ld file and specify the new file name in the linker settings. The renamed file should not be touched anymore.

3 replies

KnarfB
KnarfBBest answer
Super User
August 14, 2020

You can rename the generated .ld file and specify the new file name in the linker settings. The renamed file should not be touched anymore.

PMart.1
PMart.1Author
Associate II
August 19, 2020

Thanks @KnarfB​  that did the trick.

Sid Price
Associate III
June 29, 2021

I cannot get this solution to work for my project. I have renamed the linker script AND moved it to a different folder (Core) but CubeIDE still overwrites it when I generate code.

DSala.18
Associate
September 7, 2023

in case anyone still wondering:

it's here:

Screenshot 2023-09-07 at 12.17.50.png

 

Andrew Neil
Super User
September 26, 2024
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.