From e1fec51599323277f486376ca4d562e9479cde92 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Thu, 6 Mar 2014 23:43:32 +0100 Subject: [PATCH] add .bin target to Makefile --- .hgignore | 1 + Makefile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.hgignore b/.hgignore index 5d126dc..3d29d27 100644 --- a/.hgignore +++ b/.hgignore @@ -4,4 +4,5 @@ syntax: glob *.map *.elf *.hex +*.bin diff --git a/Makefile b/Makefile index e7a1c0a..56d6d07 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ OBJDUMP = avr-objdump SIZE = avr-size -A -all: $(PRG).hex +all: $(PRG).hex $(PRG).bin $(PRG).elf: $(OBJ) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) @@ -40,7 +40,10 @@ clean: rm -rf *.lst *.map $(EXTRA_CLEAN_FILES) hex: $(PRG).hex +bin: $(PRG).bin %.hex: %.elf $(OBJCOPY) -j .text -j .data -O ihex $< $@ +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@