Add USB True Random Number Generator product
authorKeith Packard <keithp@keithp.com>
Sun, 9 Mar 2014 05:39:33 +0000 (21:39 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 9 Mar 2014 05:39:33 +0000 (21:39 -0800)
Just basic device support

Signed-off-by: Keith Packard <keithp@keithp.com>
src/usbtrng/Makefile [new file with mode: 0644]
src/usbtrng/flash-loader/Makefile [new file with mode: 0644]

diff --git a/src/usbtrng/Makefile b/src/usbtrng/Makefile
new file mode 100644 (file)
index 0000000..80e137e
--- /dev/null
@@ -0,0 +1,70 @@
+#
+# AltOS build
+#
+#
+
+include ../lpc/Makefile.defs
+
+INC = \
+       ao.h \
+       ao_arch.h \
+       ao_arch_funcs.h \
+       ao_pins.h \
+       ao_product.h \
+       lpc.h
+
+#
+# Common AltOS sources
+#
+ALTOS_SRC = \
+       ao_interrupt.c \
+       ao_boot_chain.c \
+       ao_romconfig.c \
+       ao_product.c \
+       ao_mutex.c \
+       ao_panic.c \
+       ao_stdio.c \
+       ao_task.c \
+       ao_cmd.c \
+       ao_timer_lpc.c \
+       ao_exti_lpc.c \
+       ao_usb_lpc.c \
+       ao_serial_lpc.c \
+       ao_spi_lpc.c \
+       ao_led_lpc.c
+
+PRODUCT=usbtrng-v0.1
+PRODUCT_DEF=-DUSBTRNG_V_0_1
+IDPRODUCT=0x0028
+
+CFLAGS = $(PRODUCT_DEF) $(LPC_CFLAGS) -g -Os
+
+PROGNAME=usbtrng-v0.1
+PROG=$(PROGNAME)-$(VERSION).elf
+HEX=$(PROGNAME)-$(VERSION).ihx
+
+SRC=$(ALTOS_SRC) ao_usbtrng.c
+OBJ=$(SRC:.c=.o)
+
+all: $(PROG) $(HEX)
+
+$(PROG): Makefile $(OBJ) altos.ld
+       $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
+
+ao_product.h: ao-make-product.5c ../Version
+       $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+$(OBJ): $(INC)
+
+load: $(PROG)
+       lpc-load $(PROG)
+
+distclean:     clean
+
+clean:
+       rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
+       rm -f ao_product.h
+
+install:
+
+uninstall:
diff --git a/src/usbtrng/flash-loader/Makefile b/src/usbtrng/flash-loader/Makefile
new file mode 100644 (file)
index 0000000..e34f108
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# AltOS flash loader build
+#
+#
+
+TOPDIR=../..
+HARDWARE=usbtrng-v0.1
+include $(TOPDIR)/lpc/Makefile-flash.defs