mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
make: Improve dependency tracking for exe targets
- Add wildcarded linker scripts to dependencies - Run flash-push only on current hex file Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9c773838c7
commit
5210ba2acf
4 changed files with 23 additions and 19 deletions
|
|
@ -280,7 +280,8 @@ ifeq ($(TARGET_TRIPLET),arm-none-eabi)
|
|||
PROJECT_LDFLAGS += -nostartfiles
|
||||
|
||||
# garbage collect unused input sections
|
||||
PROJECT_LDFLAGS += -Xlinker --gc-sections
|
||||
PROJECT_LDFLAGS += -Xlinker --gc-sections
|
||||
PROJECT_LDFLAGS += -Xlinker --print-gc-sections
|
||||
|
||||
# create map file
|
||||
PROJECT_LDFLAGS += -Wl,-Map,"$(EXE_MAP)"
|
||||
|
|
@ -367,16 +368,6 @@ ifeq ($(TARGET_TRIPLET),arm-none-eabi)
|
|||
LD_DEFINE_SYMBOLS += _sbrk
|
||||
endif
|
||||
|
||||
# ----- tagged templates
|
||||
#MCU_LD_DIR = $(wildcard $(firstword $(call $(TAGGED_TMPL_DIRS),ld)))
|
||||
#MCU_LD_DIR = $(firstword $(foreach tag,$(TAGGED_TMPL_TAGS),$(foreach repo,$(TOPDIR)/tmpl/tagged $(MODDIR)/tmpl/tagged,$(wildcard $(repo)/$(tag)/ld))))
|
||||
#MCU_LD_DIR = $(firstword $(wildcard $(foreach tag,$(TAGGED_TMPL_TAGS),$(foreach repo,$(TOPDIR)/tmpl/tagged $(MODDIR)/tmpl/tagged,$(repo)/$(tag)/ld))))
|
||||
MCU_LD_CHECK_DIRS = $(foreach tag,$(TAGGED_TMPL_TAGS),$(foreach repo,$(TOPDIR)/tmpl/tagged $(MODDIR)/tmpl/tagged,$(repo)/$(tag)/ld))
|
||||
MCU_LD_DIRS = $(wildcard $(MCU_LD_CHECK_DIRS))
|
||||
MCU_LD_DIR = $(firstword $(MCU_LD_DIRS))
|
||||
|
||||
PROJECT_LDFLAGS += -L$(MCU_LD_DIR) $(addprefix -T ,$(sort $(notdir $(wildcard $(MCU_LD_DIR)/*.ld))))
|
||||
|
||||
endif
|
||||
|
||||
PROJECT_LDFLAGS += $(addprefix -u ,$(LD_DEFINE_SYMBOLS))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue