altos: Add timeout for MS5607 ADC conversion
[fw/altos] / src / easymini-v1.0 / Makefile
index e146f54a46fd954224bc95ae8bb1cbe3c9b98ca8..755de1f06ea72779a7f140ad88c654b2d10746e4 100644 (file)
@@ -56,15 +56,25 @@ CFLAGS = $(PRODUCT_DEF) $(LPC_CFLAGS)
 PROGNAME=easymini-v1.0
 PROG=$(PROGNAME)-$(VERSION).elf
 HEX=$(PROGNAME)-$(VERSION).ihx
+FLASH_PROG=flash-loader/$(PROGNAME)-altos-flash-$(VERSION).elf
+BOTH_HEX=$(PROGNAME)-combined-$(VERSION).ihx
 
 SRC=$(ALTOS_SRC) ao_easymini.c
 OBJ=$(SRC:.c=.o)
 
-all: $(PROG) $(HEX)
+all: $(PROG) $(HEX) $(BOTH_HEX)
 
 $(PROG): Makefile $(OBJ) altos.ld
        $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
 
+$(BOTH_HEX): $(PROG) $(FLASH_PROG)
+       ../../ao-tools/ao-elftohex/ao-elftohex -n --output=$@ $(FLASH_PROG) $(PROG)
+
+$(FLASH_PROG): FRC
+       +cd flash-loader && make
+
+FRC:
+
 $(OBJ): $(INC)
 
 load: $(PROG)