Add hex generation

This commit is contained in:
NIIBE Yutaka
2013-11-26 13:21:26 +09:00
parent a528292476
commit 5968e2a053
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2013-11-26 Niibe Yutaka <gniibe@fsij.org>
* rules.mk (OUTFILES) [ENABLE_OUTPUT_HEX]: Add hex generation.
2013-11-21 Niibe Yutaka <gniibe@fsij.org> 2013-11-21 Niibe Yutaka <gniibe@fsij.org>
* example-cdc/usb_stm32f103.c, example-cdc/usb_lld.h: Update from * example-cdc/usb_stm32f103.c, example-cdc/usb_lld.h: Update from

View File

@@ -10,6 +10,10 @@ INCDIR += $(CHOPSTX)
BUILDDIR = build BUILDDIR = build
OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).bin OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).bin
ifneq ($(ENABLE_OUTPUT_HEX),)
OUTFILES += $(BUILDDIR)/$(PROJECT).hex
endif
OPT += -ffunction-sections -fdata-sections -fno-common OPT += -ffunction-sections -fdata-sections -fno-common
@@ -49,6 +53,9 @@ $(OBJS) : $(BUILDDIR)/%.o : %.c Makefile
%.bin: %.elf $(LDSCRIPT) %.bin: %.elf $(LDSCRIPT)
$(OBJCOPY) -O binary $< $@ $(OBJCOPY) -O binary $< $@
%.hex: %.elf $(LDSCRIPT)
$(OBJCOPY) -O ihex $< $@
clean: clean:
-rm -f -r .dep $(BUILDDIR) -rm -f -r .dep $(BUILDDIR)