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 fd4b5b3..d2adcc3 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,9 +40,12 @@ 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 $< $@ %.bin: %.elf $(OBJCOPY) -j .text -j .data -O binary $< $@