From 72f7fe9d3f9aa068b45318d39ff230cb726034b6 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Wed, 7 Jul 2010 03:33:15 +0000 Subject: [PATCH] Added .hex generation for the stm32 target. --- conf/Makefile.stm32 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32 index ac2ca35626..9c2856227a 100644 --- a/conf/Makefile.stm32 +++ b/conf/Makefile.stm32 @@ -107,7 +107,9 @@ LDFLAGS = -D__thumb2__ -T$(LDSCRIPT) -nostartfiles -L$(GCC_LIB_DIR) -O$(OPT) -- LDFLAGS += -Wl,-Map=$(OBJDIR)/$(TARGET).map,--cref,--gc-sections LDLIBS += -lc -lm -lgcc -lcmsis -lstm32 -CPFLAGS = -j .isr_vector -j .text -j .data -Obinary +CPFLAGS = -j .isr_vector -j .text -j .data +CPFLAGS_BIN = -Obinary +CPFLAGS_HEX = -Oihex ODFLAGS = -S @@ -116,11 +118,12 @@ ODFLAGS = -S # Default target. all: sizebefore build sizeafter -build: elf bin +build: elf bin hex # lss sym elf: $(OBJDIR)/$(TARGET).elf bin: $(OBJDIR)/$(TARGET).bin +hex: $(OBJDIR)/$(TARGET).hex lss: $(OBJDIR)/$(TARGET).lss sym: $(OBJDIR)/$(TARGET).sym @@ -135,8 +138,12 @@ sizeafter: %.bin: %.elf - @echo OBJC $@ - $(Q)$(CP) $(CPFLAGS) $< $@ + @echo OBJCB $@ + $(Q)$(CP) $(CPFLAGS) $(CPFLAGS_BIN) $< $@ + +%.hex: %.elf + @echo OBJCH $@ + $(Q)$(CP) $(CPFLAGS) $(CPFLAGS_HEX) $< $@ # Create extended listing file from ELF output file. # testing: option -C