Skip to main content
Associate II
Oct 25, 2024 10:39 AM UTC
Question

makefile does not rebuild after the .ld file has been edited

The makefile generated by STM32CubeMX has the following line describing the linkers dependencies.

    $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile

 

Unfortunately editing the .ld file will not force the linker to be executed next time make is executed. This could be resolved if $(LDSCRIPT) was added to this line. The makefile line would become…

    $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) $(LDSCRIPT) Makefile

 

Could STM32CueMX change the generated makefile to include this?

This topic has been closed for replies.