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 $< $@