How do I override the linker script file?

Hello,

I have created a custom linker script for my project to slightly adjust the memory usage when using the Daisy Bootloader. It is based off of the Daisy xxxxx_SRAM.LDS file.

I would like to modify my Makefile to use my custom linker script.

Currently I have tried:
LDFLAGS += -T myscript.ld

This does not seem to override the file that is used. Is there a better way to do this?

Thank you for your time and help,
Brett

This is the makefile section that set the app type.

2 Likes

@polyclash ,

Thank you,

I’ll use LDSCRIPT and set it my Makefile as then the below one should not be used.

LDSCRIPT ?= $(SYSTEM_FILES_DIR)/STM32H750IB_flash.lds

Thank you for the help, much appreciated.