From a97282bd712e8643a9a66016798025ccd0cf9a3e Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Fri, 5 Feb 2016 20:09:18 -0500 Subject: Add blink example. --- blink/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 blink/Makefile (limited to 'blink/Makefile') diff --git a/blink/Makefile b/blink/Makefile new file mode 100644 index 0000000..890a892 --- /dev/null +++ b/blink/Makefile @@ -0,0 +1,16 @@ +PROJECT=blink +SOURCES=$(PROJECT).c +MMCU=attiny85 +F_CPU = 1000000 + +CFLAGS=-mmcu=$(MMCU) -Wall -Os -DF_CPU=$(F_CPU) + +$(PROJECT).hex: $(PROJECT).out + avr-objcopy -O ihex $(PROJECT).out $(PROJECT).c.hex;\ + avr-size --mcu=$(MMCU) --format=avr $(PROJECT).out + +$(PROJECT).out: $(SOURCES) + avr-gcc $(CFLAGS) -I./ -o $(PROJECT).out $(SOURCES) + +program: $(PROJECT).hex + avrdude -p $(MMCU) -c avrisp -P /dev/ttyUSB0 -b 19200 -U flash:w:$(PROJECT).c.hex -- cgit v1.2.3