Skip to main content
Associate II
October 25, 2024
Question

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

  • October 25, 2024
  • 0 replies
  • 551 views

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?