summaryrefslogtreecommitdiff
path: root/src/telescience-v0.1
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-26 15:02:43 -0700
committerKeith Packard <keithp@keithp.com>2011-08-26 20:56:25 -0700
commitc32893ce79835a8f861d6ef414644c2ff9769ff6 (patch)
treea6fd36123685f6880d35612782ddff2ed2d9b18c /src/telescience-v0.1
parent8125acc030574afed6f23aa8aa302d9c768bb04e (diff)
altos: Integrate telescience support
Adds a few drivers including an LCD driver Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/telescience-v0.1')
-rw-r--r--src/telescience-v0.1/Makefile109
1 files changed, 109 insertions, 0 deletions
diff --git a/src/telescience-v0.1/Makefile b/src/telescience-v0.1/Makefile
new file mode 100644
index 00000000..3ccbb787
--- /dev/null
+++ b/src/telescience-v0.1/Makefile
@@ -0,0 +1,109 @@
+#
+# AltOS build
+#
+#
+vpath % ..:../core:../product:../drivers:../avr
+vpath ao-make-product.5c ../util
+
+MCU=atmega32u4
+DUDECPUTYPE=m32u4
+#PROGRAMMER=stk500v2 -P usb
+PROGRAMMER=usbtiny
+LOADCMD=avrdude
+LOADARG=-p $(DUDECPUTYPE) -c $(PROGRAMMER) -e -U flash:w:
+CC=avr-gcc
+OBJCOPY=avr-objcopy
+
+ifndef VERSION
+include ../Version
+endif
+
+INC = \
+ ao.h \
+ ao_usb.h \
+ ao_pins.h \
+ altitude.h
+
+#
+# Common AltOS sources
+#
+TELESCIENCE_STORAGE= \
+ ao_m25.c \
+ ao_spi_usart.c \
+ ao_storage.c \
+
+ALTOS_SRC = \
+ ao_cmd.c \
+ ao_mutex.c \
+ ao_panic.c \
+ ao_product.c \
+ ao_stdio.c \
+ ao_task.c \
+ ao_timer.c \
+ ao_led.c \
+ ao_avr_stdio.c \
+ ao_romconfig.c \
+ ao_usb_avr.c \
+ ao_adc_avr.c \
+ ao_spi_slave.c \
+ ao_log_telescience.c \
+ $(TELESCIENCE_STORAGE)
+
+PRODUCT=TeleScience-v0.1
+MCU=atmega32u4
+PRODUCT_DEF=-DTELESCIENCE
+IDPRODUCT=0x0011
+CFLAGS = $(PRODUCT_DEF) -I. -I../avr -I../core -I..
+CFLAGS += -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O3 -mcall-prologues -DAVR
+
+NICKLE=nickle
+
+PROG=telescience-v0.1
+
+SRC=$(ALTOS_SRC) ao_telescience.c
+OBJ=$(SRC:.c=.o)
+
+V=0
+# The user has explicitly enabled quiet compilation.
+ifeq ($(V),0)
+quiet = @printf " $1 $2 $@\n"; $($1)
+endif
+# Otherwise, print the full command line.
+quiet ?= $($1)
+
+all: $(PROG)
+
+CHECK=sh ../util/check-avr-mem
+
+$(PROG): Makefile $(OBJ)
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ)
+ $(call quiet,CHECK) $(PROG) || ($(RM) -f $(PROG); exit 1)
+
+$(PROG).hex: $(PROG)
+ avr-size $(PROG)
+ $(OBJCOPY) -R .eeprom -O ihex $(PROG) $@
+
+
+load: $(PROG).hex
+ $(LOADCMD) $(LOADARG)$(PROG).hex
+
+../altitude.h: make-altitude
+ nickle $< > $@
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+ao_product.rel: ao_product.c ao_product.h
+ $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
+
+distclean: clean
+
+clean:
+ rm -f $(OBJ)
+ rm -f ao_product.h
+
+install:
+
+uninstall:
+
+$(OBJ): ao.h ao_product.h ao_usb.h