Commits

Anonymous committed d0466fd

Added makefile

Comments (0)

Files changed (1)

+# AVR-GCC Makefile
+#
+# Project:    Wacky Racers
+# Subproject: Image sensor and WiFi board firmware
+# Authors:    Lazar Sumar,
+#             Simon Gow,
+#             Tracy Jackson
+#
+# Company:    University of Canterbury
+# Department: Electrical and Computer Engineering
+# Course:     Computer Hardware II (ENEL429)
+#
+# Group:         3
+# Group Members: Lazar Sumar,
+#                Simon Gow,
+#                Tracy Jackson,
+#                Sean Thomas,
+#                Regan Gunther,
+#                Jared Hall
+
+
+PROJECT=ImageAndWiFiFirmware
+HEADERS=
+SOURCES=main.c
+CC=avr-gcc
+OBJCOPY=avr-objcopy
+MMCU=atmega324p
+
+CFLAGS=-mmcu=$(MMCU) -Wall
+
+$(PROJECT).hex: $(PROJECT).out
+	$(OBJCOPY) -j .text -O ihex $(PROJECT).out $(PROJECT).hex
+
+$(PROJECT).out: $(SOURCES) $(HEADERS)
+	$(CC) $(CFLAGS) -I./ -o $(PROJECT).out $(SOURCES)
+
+program: $(PROJECT).hex
+	avrdude -p m324p -c usbasp -e -U flash:w:$(PROJECT).hex
+
+clean:
+	rm -f $(PROJECT).out
+	rm -f $(PROJECT).hex