From: Jan "Yenya" Kasprzak Date: Fri, 8 Jun 2012 16:17:58 +0000 (+0200) Subject: Makefile: more targets X-Git-Tag: gedasymbols-20120913~69 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=5eade939bcfc14b937f1040587fa65e11d09249c;p=bike-lights.git Makefile: more targets --- diff --git a/Makefile b/Makefile index 227e395..99b9793 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ FORMAT=ihex CC=avr-gcc OBJCOPY=avr-objcopy +OBJDUMP=avr-objdump AVRDUDE=avrdude all: $(PROGRAM).hex $(PROGRAM).eep @@ -24,6 +25,20 @@ all: $(PROGRAM).hex $(PROGRAM).eep program: $(PROGRAM).hex $(PROGRAM).eep $(AVRDUDE) $(AVRDUDE_FLAGS) -U flash:w:$(PROGRAM).hex:i -U eeprom:w:$(PROGRAM).eep:i +program_flash: $(PROGRAM).hex + $(AVRDUDE) $(AVRDUDE_FLAGS) -U flash:w:$(PROGRAM).hex:i + +program_eeprom: $(PROGRAM).eep + $(AVRDUDE) $(AVRDUDE_FLAGS) eeprom:w:$(PROGRAM).eep:i + +dump_eeprom: + $(AVRDUDE) $(AVRDUDE_FLAGS) -U eeprom:r:eeprom.raw:r + od -tx1 eeprom.raw + +objdump: $(PROGRAM).elf + $(OBJDUMP) --disassemble $< + + .PRECIOUS : $(OBJ) $(PROGRAM).elf %.hex: %.elf @@ -46,7 +61,7 @@ program: $(PROGRAM).hex $(PROGRAM).eep $(CC) -c $(CFLAGS) $< -o $@ clean: - rm -f $(PROGRAM).hex $(PROGRAM).eep $(PROGRAM).elf *.o *.s + rm -f $(PROGRAM).hex $(PROGRAM).eep $(PROGRAM).elf *.o *.s eeprom.raw -.PHONY: all clean +.PHONY: all clean dump_eeprom program program_flash program_eeprom objdump