This commit is contained in:
Stefan Rupp 2014-03-08 23:50:22 +01:00
commit 3565ff42c7
2 changed files with 5 additions and 1 deletions

View File

@ -4,4 +4,5 @@ syntax: glob
*.map *.map
*.elf *.elf
*.hex *.hex
*.bin

View File

@ -16,7 +16,7 @@ OBJDUMP = avr-objdump
SIZE = avr-size -A SIZE = avr-size -A
all: $(PRG).hex all: $(PRG).hex $(PRG).bin
$(PRG).elf: $(OBJ) $(PRG).elf: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
@ -40,9 +40,12 @@ clean:
rm -rf *.lst *.map $(EXTRA_CLEAN_FILES) rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
hex: $(PRG).hex hex: $(PRG).hex
bin: $(PRG).bin
%.hex: %.elf %.hex: %.elf
$(OBJCOPY) -j .text -j .data -O ihex $< $@ $(OBJCOPY) -j .text -j .data -O ihex $< $@
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@
%.bin: %.elf %.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@ $(OBJCOPY) -j .text -j .data -O binary $< $@