Browse Source

add target to generate list of sysinits used

This is to help make sure everything you think is starting is..
main
John-Mark Gurney 2 years ago
parent
commit
cf78ec4531
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      mk/mu.progs.mk

+ 4
- 1
mk/mu.progs.mk View File

@@ -34,7 +34,7 @@ PROGEXT = .elf
DEPENDS += .arm_deps DEPENDS += .arm_deps


.for i in $(PROGS) .for i in $(PROGS)
ALLTGTS+= $(i)$(PROGEXT) $(i).list
ALLTGTS+= $(i)$(PROGEXT) $(i).list $(i).sysinit
ASRCS.$(i) = $(SRCS) $(SRCS.$(i)) ASRCS.$(i) = $(SRCS) $(SRCS.$(i))
OBJS.$(i) = $(ASRCS.$(i):C/.c$/.o/) OBJS.$(i) = $(ASRCS.$(i):C/.c$/.o/)


@@ -43,6 +43,9 @@ ARM_DEP_SRCS+= $(ASRCS.$(i))
$(i)$(PROGEXT) $(i).map: $(OBJS.$(i)) $(i)$(PROGEXT) $(i).map: $(OBJS.$(i))
$(ARMCC) $(ARMTARGET) -o $(i)$(PROGEXT) $(.ALLSRC) -T$(LINKER_SCRIPT) --specs=nosys.specs -Wl,-Map="$(i).map" -Wl,--gc-sections -static --specs=nano.specs -Wl,--start-group -lc -lm -Wl,--end-group $(ARMCC) $(ARMTARGET) -o $(i)$(PROGEXT) $(.ALLSRC) -T$(LINKER_SCRIPT) --specs=nosys.specs -Wl,-Map="$(i).map" -Wl,--gc-sections -static --specs=nano.specs -Wl,--start-group -lc -lm -Wl,--end-group


$(i).sysinit: $(ASRCS.$(i))
grep ^SYSINIT $(.ALLSRC) | sort -k 2 -k 3 > $@ || (rm -f $@ && false)

$(i).list: $(i)$(PROGEXT) $(i).list: $(i)$(PROGEXT)
$(ARMOBJDUMP) -h -S $(.ALLSRC) > $@ || (rm -f $@ && false) $(ARMOBJDUMP) -h -S $(.ALLSRC) > $@ || (rm -f $@ && false)
.endfor .endfor


Loading…
Cancel
Save