[make] also output .hex files in intel hex format

This commit is contained in:
Travis Geiselbrecht
2012-11-02 11:48:17 -07:00
parent a6e3b0976f
commit 0e0c77c04f
2 changed files with 6 additions and 2 deletions

View File

@@ -6,6 +6,10 @@ $(OUTBIN): $(OUTELF)
$(NOECHO)$(SIZE) $<
$(NOCOPY)$(OBJCOPY) -O binary $< $@
$(OUTELF).hex: $(OUTELF)
@echo generating hex file: $@
$(NOCOPY)$(OBJCOPY) -O ihex $< $@
$(OUTELF): $(ALLMODULE_OBJS) $(EXTRA_OBJS) $(LINKER_SCRIPT)
@echo linking $@
$(NOECHO)$(SIZE) -t $(ALLMODULE_OBJS)

View File

@@ -48,7 +48,7 @@ GLOBAL_COMPILEFLAGS += -ffunction-sections -fdata-sections
GLOBAL_LDFLAGS += -gc-sections
# top level rule
all:: $(OUTBIN) $(OUTELF).lst $(OUTELF).debug.lst $(OUTELF).sym $(OUTELF).size
all:: $(OUTBIN) $(OUTELF).lst $(OUTELF).debug.lst $(OUTELF).sym $(OUTELF).size $(OUTELF).hex
# master module object list
ALLOBJS_MODULE :=
@@ -176,7 +176,7 @@ endif
include make/build.mk
clean: $(EXTRA_CLEANDEPS)
rm -f $(ALLOBJS) $(DEPS) $(GENERATED) $(OUTBIN) $(OUTELF) $(OUTELF).lst
rm -f $(ALLOBJS) $(DEPS) $(GENERATED) $(OUTBIN) $(OUTELF) $(OUTELF).lst $(OUTELF).hex
install: all
scp $(OUTBIN) 192.168.0.4:/tftproot