Skip to main content
PMart.1
Associate II
Aug 14, 2020 2:49 PM UTC
Solved

Custom Linker Script with CubeMX

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!

This topic has been closed for replies.
KnarfB
KnarfBBest answer
Super User
Aug 14, 2020 2:59 PM UTC

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.

5 replies

KnarfB
KnarfBBest answer
Super User
Aug 14, 2020 2:59 PM UTC

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
Aug 19, 2020 3:49 PM UTC

Thanks @KnarfB​  that did the trick.

Sid Price
Associate III
Jun 29, 2021 5:11 PM UTC

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
Sep 7, 2023 10:19 AM UTC

in case anyone still wondering:

it's here:

Screenshot 2023-09-07 at 12.17.50.png

 

Andrew Neil
Super User
Sep 26, 2024 5:52 PM UTC
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.