altos: Check pdata+xdata memory usage during build
[fw/altos] / src / product / Makefile.telenano
1 #
2 # TeleNano build file
3 #
4 # Define TELENANO_VER and TELENANO_DEF and then
5 # include this file
6
7 vpath %.c ..:../core:../cc1111:../drivers:../product
8 vpath %.h ..:../core:../cc1111:../drivers:../product
9 vpath ao-make-product.5c ../util
10
11 ifndef VERSION
12 include ../Version
13 endif
14
15 INC = \
16         ao.h \
17         ao_pins.h \
18         cc1111.h \
19         ao_product.h
20
21 CORE_SRC = \
22         ao_cmd.c \
23         ao_config.c \
24         ao_convert.c \
25         ao_flight_nano.c \
26         ao_kalman.c \
27         ao_log.c \
28         ao_log_tiny.c \
29         ao_mutex.c \
30         ao_panic.c \
31         ao_report.c \
32         ao_sample.c \
33         ao_stdio.c \
34         ao_storage.c \
35         ao_task.c \
36         ao_telemetry.c
37
38 CC1111_SRC = \
39         ao_adc.c \
40         ao_dma.c \
41         ao_intflash.c \
42         ao_led.c \
43         ao_packet.c \
44         ao_packet_slave.c \
45         ao_radio.c \
46         ao_romconfig.c \
47         ao_string.c \
48         ao_timer.c \
49         _bp.c
50
51 DRIVER_SRC =
52
53 PRODUCT_SRC = \
54         ao_telenano.c
55
56 SRC = \
57         $(CORE_SRC) \
58         $(CC1111_SRC) \
59         $(DRIVER_SRC) \
60         $(PRODUCT_SRC)
61
62 PROG = telenano-v$(TELENANO_VER)-$(VERSION).ihx
63 PRODUCT=TeleNano-v$(TELENANO_VER)
64 PRODUCT_DEF=-DTELENANO_V_$(TELENANO_DEF)
65 IDPRODUCT=0x000a
66 CODESIZE=0x6700
67
68 include ../cc1111/Makefile.cc1111
69
70 NICKLE=nickle
71 CHECK_STACK=sh ../util/check-stack
72
73 V=0
74 # The user has explicitly enabled quiet compilation.
75 ifeq ($(V),0)
76 quiet = @printf "  $1 $2 $@\n"; $($1)
77 endif
78 # Otherwise, print the full command line.
79 quiet ?= $($1)
80
81 all: ../$(PROG)
82
83 ../$(PROG): $(REL) Makefile
84         $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
85         $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
86
87 ao_product.h: ao-make-product.5c ../Version
88         $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
89
90 distclean:      clean
91
92 clean:
93         rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
94         rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
95         rm -f ao_product.h
96         rm -f ../$(PROG) ../$(PMAP)
97
98 install:
99
100 uninstall: