From e1e00a4b67fbdbae339219b35aefd44a1bcf9486 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 8 Mar 2014 21:39:33 -0800 Subject: [PATCH] Add USB True Random Number Generator product Just basic device support Signed-off-by: Keith Packard --- src/usbtrng/Makefile | 70 +++++++++++++++++++++++++++++++ src/usbtrng/flash-loader/Makefile | 8 ++++ 2 files changed, 78 insertions(+) create mode 100644 src/usbtrng/Makefile create mode 100644 src/usbtrng/flash-loader/Makefile diff --git a/src/usbtrng/Makefile b/src/usbtrng/Makefile new file mode 100644 index 00000000..80e137e7 --- /dev/null +++ b/src/usbtrng/Makefile @@ -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 index 00000000..e34f1089 --- /dev/null +++ b/src/usbtrng/flash-loader/Makefile @@ -0,0 +1,8 @@ +# +# AltOS flash loader build +# +# + +TOPDIR=../.. +HARDWARE=usbtrng-v0.1 +include $(TOPDIR)/lpc/Makefile-flash.defs -- 2.30.2