summaryrefslogtreecommitdiffstats
path: root/firmware/octoclock/Makefile
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2013-06-07 13:04:51 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2013-06-07 13:04:51 -0700
commit9fefb30f210f86c8c5964ca8ee80f63ad8856d02 (patch)
tree08c6851146d43cb045853c6ecb5069763a20e688 /firmware/octoclock/Makefile
parent265daa586730b95d803a694548479cb790ea80fd (diff)
downloaduhd-9fefb30f210f86c8c5964ca8ee80f63ad8856d02.tar.gz
uhd-9fefb30f210f86c8c5964ca8ee80f63ad8856d02.tar.bz2
uhd-9fefb30f210f86c8c5964ca8ee80f63ad8856d02.zip
OctoClock support
Diffstat (limited to 'firmware/octoclock/Makefile')
-rw-r--r--firmware/octoclock/Makefile56
1 files changed, 56 insertions, 0 deletions
diff --git a/firmware/octoclock/Makefile b/firmware/octoclock/Makefile
new file mode 100644
index 000000000..6ef662bc6
--- /dev/null
+++ b/firmware/octoclock/Makefile
@@ -0,0 +1,56 @@
+#
+# Copyright 2009 Ettus Research LLC
+#
+
+##################################################
+# Compiler
+##################################################
+CC = avr-gcc
+OBJCOPY = avr-objcopy
+STRIP = avr-strip
+OBJDUMP = avr-objdump
+SREC = srec_cat
+#CFLAGS = -O2 -std=gnu99 -fshort-enums -pedantic-errors -Wall -Werror \
+# -Wstrict-prototypes -Wmissing-prototypes -Wcast-align -Wshadow
+CFLAGS = -std=gnu99 -O2
+
+#-D IO_DEBUG
+
+##################################################
+# Files
+##################################################
+HDRS = OctoClock-io.h
+SRCS = OctoClock.c
+TARGET = octoclock_fw
+
+##################################################
+# Device
+##################################################
+MMCU = atmega128
+PROGRAMMER = avrisp2
+PORT = usb
+AVRDUDE = avrdude -p $(MMCU) -c $(PROGRAMMER) -P $(PORT)
+
+##################################################
+# Global Targets
+##################################################
+all: $(TARGET).hex
+
+clean:
+ $(RM) *.o *.elf *.hex
+
+install: all
+ $(AVRDUDE) -U flash:w:$(TARGET).hex:i
+
+##################################################
+# Dependency Targets
+##################################################
+
+$(TARGET).hex: $(TARGET).elf
+ $(OBJCOPY) -O ihex $< $@
+
+$(TARGET).elf: $(SRCS:.c=.o)
+ $(CC) -mmcu=$(MMCU) $^ -o $@
+
+%.o: %.c $(HDRS) Makefile
+ $(CC) -mmcu=$(MMCU) -c $< -o $@ $(CFLAGS)