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