Add .hex rule

This commit is contained in:
Michael Hayes
2013-09-02 19:08:51 +12:00
parent 3e4ff749d7
commit 87333ae5f0
57 changed files with 331 additions and 113 deletions
+6 -2
View File
@@ -37,6 +37,11 @@ demo2.out: demo2.o pio.o system.o led.o
$(SIZE) $@
# Create hex file for programming from executable file.
demo2.hex: demo2.out
$(OBJCOPY) -O ihex demo2.out demo2.hex
# Target: clean project.
.PHONY: clean
clean:
@@ -45,8 +50,7 @@ clean:
# Target: program project.
.PHONY: program
program: demo2.out
$(OBJCOPY) -O ihex demo2.out demo2.hex
program: demo2.hex
dfu-programmer atmega32u2 erase; dfu-programmer atmega32u2 flash demo2.hex; dfu-programmer atmega32u2 start