projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add TeleMini v1.0
[fw/altos]
/
src
/
Makefile.proto
diff --git
a/src/Makefile.proto
b/src/Makefile.proto
index 958b7572ac783ed1487ceaea0f5911fb69bac78e..625ca459f58e20916978b565272e7e2217a42a8e 100644
(file)
--- a/
src/Makefile.proto
+++ b/
src/Makefile.proto
@@
-10,7
+10,7
@@
vpath ao-make-product.5c ..
CC=sdcc
ifndef VERSION
CC=sdcc
ifndef VERSION
-VERSION=$(shell git describe)
+include ../Version
endif
CFLAGS=--model-small --debug --opt-code-speed
endif
CFLAGS=--model-small --debug --opt-code-speed
@@
-35,17
+35,22
@@
ALTOS_SRC = \
ao_panic.c \
ao_task.c \
ao_timer.c \
ao_panic.c \
ao_task.c \
ao_timer.c \
+ ao_romconfig.c \
_bp.c
#
# Shared AltOS drivers
#
ALTOS_DRIVER_SRC = \
_bp.c
#
# Shared AltOS drivers
#
ALTOS_DRIVER_SRC = \
- ao_beep.c \
ao_config.c \
ao_led.c \
ao_radio.c \
ao_config.c \
ao_led.c \
ao_radio.c \
- ao_stdio.c \
+ ao_stdio.c
+
+BEEP_DRIVER_SRC = \
+ ao_beep.c
+
+USB_DRIVER_SRC = \
ao_usb.c
TELE_COMMON_SRC = \
ao_usb.c
TELE_COMMON_SRC = \
@@
-67,9
+72,20
@@
TELE_RECEIVER_SRC =\
#
TELE_DRIVER_SRC = \
#
TELE_DRIVER_SRC = \
- ao_convert.c \
+ ao_convert.c
+
+#
+# Serial port driver
+#
+SERIAL_DRIVER_SRC = \
ao_serial.c
ao_serial.c
+#
+# Spi bus driver
+#
+SPI_DRIVER_SRC = \
+ ao_spi.c
+
#
# Debug dongle driver (only on TI)
#
#
# Debug dongle driver (only on TI)
#
@@
-82,19
+98,31
@@
DBG_SRC = \
TM_DRIVER_SRC = \
ao_adc.c \
ao_gps_report.c \
TM_DRIVER_SRC = \
ao_adc.c \
ao_gps_report.c \
- ao_ignite.c
+ ao_ignite.c \
+ $(BEEP_DRIVER_SRC) \
+ $(USB_DRIVER_SRC)
#
# 25LC1024 driver source
EE_DRIVER_SRC = \
#
# 25LC1024 driver source
EE_DRIVER_SRC = \
+ ao_storage.c \
ao_ee.c
#
# AT45DB161D driver source
FLASH_DRIVER_SRC = \
ao_ee.c
#
# AT45DB161D driver source
FLASH_DRIVER_SRC = \
+ ao_storage.c \
ao_flash.c
ao_flash.c
+#
+# Numonyx M25P80 driver source
+#
+
+M25_DRIVER_SRC = \
+ ao_storage.c \
+ ao_m25.c
+
#
# SiRF driver source
#
#
# SiRF driver source
#
@@
-125,11
+153,39
@@
TM_BASE_SRC = \
$(ALTOS_SRC) \
$(ALTOS_DRIVER_SRC) \
$(TELE_DRIVER_SRC) \
$(ALTOS_SRC) \
$(ALTOS_DRIVER_SRC) \
$(TELE_DRIVER_SRC) \
+ $(SERIAL_DRIVER_SRC) \
$(TELE_COMMON_SRC) \
$(TM_DRIVER_SRC) \
$(TM_TASK_SRC) \
$(TM_MAIN_SRC)
$(TELE_COMMON_SRC) \
$(TM_DRIVER_SRC) \
$(TM_TASK_SRC) \
$(TM_MAIN_SRC)
+#
+# Sources for TeleMini
+TMINI_DRIVER_SRC = \
+ ao_adc.c \
+ ao_ignite.c \
+ ao_config.c \
+ ao_storage.c \
+ ao_intflash.c
+
+TMINI_TASK_SRC = \
+ ao_flight.c \
+ ao_log.c \
+ ao_report.c \
+ ao_telemetry.c
+
+TMINI_MAIN_SRC = \
+ ao_telemini.c
+
+TMINI_BASE_SRC = \
+ $(ALTOS_SRC) \
+ $(ALTOS_DRIVER_SRC) \
+ $(TELE_DRIVER_SRC) \
+ $(TELE_COMMON_SRC) \
+ $(TMINI_DRIVER_SRC) \
+ $(TMINI_TASK_SRC) \
+ $(TMINI_MAIN_SRC)
+
TI_MAIN_SRC = \
ao_tidongle.c
TI_MAIN_SRC = \
ao_tidongle.c
@@
-141,6
+197,7
@@
TI_SRC = \
$(ALTOS_DRIVER_SRC) \
$(TELE_RECEIVER_SRC) \
$(TELE_COMMON_SRC) \
$(ALTOS_DRIVER_SRC) \
$(TELE_RECEIVER_SRC) \
$(TELE_COMMON_SRC) \
+ $(USB_DRIVER_SRC) \
$(TI_MAIN_SRC) \
$(DBG_SRC)
$(TI_MAIN_SRC) \
$(DBG_SRC)
@@
-155,6
+212,7
@@
TT_SRC = \
$(TELE_RECEIVER_SRC) \
$(TELE_DRIVER_SRC) \
$(TELE_COMMON_SRC) \
$(TELE_RECEIVER_SRC) \
$(TELE_DRIVER_SRC) \
$(TELE_COMMON_SRC) \
+ $(USB_DRIVER_SRC) \
$(TT_MAIN_SRC)
$(TT_MAIN_SRC)
@@
-170,10
+228,16
@@
TD_SRC = \
$(ALTOS_DRIVER_SRC) \
$(TELE_RECEIVER_SRC) \
$(TELE_COMMON_SRC) \
$(ALTOS_DRIVER_SRC) \
$(TELE_RECEIVER_SRC) \
$(TELE_COMMON_SRC) \
+ $(USB_DRIVER_SRC) \
$(TD_MAIN_SRC)
include Makefile.defs
$(TD_MAIN_SRC)
include Makefile.defs
+CFLAGS += $(PRODUCT_DEF) -I.
+
+NICKLE=nickle
+CHECK_STACK=sh ../check-stack
+
REL=$(SRC:.c=.rel) ao_product.rel
ADB=$(REL:.rel=.adb)
ASM=$(REL:.rel=.asm)
REL=$(SRC:.c=.rel) ao_product.rel
ADB=$(REL:.rel=.adb)
ASM=$(REL:.rel=.asm)
@@
-188,29
+252,39
@@
PMAP=$(PROG:.ihx=.map)
PMEM=$(PROG:.ihx=.mem)
PAOM=$(PROG:.ihx=)
PMEM=$(PROG:.ihx=.mem)
PAOM=$(PROG:.ihx=)
+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)
+
%.rel : %.c $(INC)
%.rel : %.c $(INC)
- $(
CC) -c $(CFLAGS)
-o$@ $<
+ $(
call quiet,CC,$(PRODUCT_DEF)) $(CFLAGS) -c
-o$@ $<
-all: $(PROG)
+all:
../
$(PROG)
-$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
- $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(REL)
+../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+ $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
../altitude.h: make-altitude
nickle $< > $@
../altitude.h: make-altitude
nickle $< > $@
-ao_product.h: ao-make-product.5c
-
nickle $< -m altusmetrum.org
-p $(PRODUCT) -v $(VERSION) > $@
+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
ao_product.rel: ao_product.c ao_product.h
- $(CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
+ $(
call quiet,
CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
distclean: clean
clean:
rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
distclean: clean
clean:
rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
- rm -f $(P
ROG) $(P
CDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+ rm -f $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
rm -f ao_product.h
rm -f ao_product.h
+ rm -f ../$(PROG)
install:
install: