Reflex jamming is now absurdly accurate and reliable.
[goodfet] / firmware / config.mk
1 ##################################
2 ## These are production boards.
3 ##################################
4
5
6 ifneq (,$(findstring $(board),goodfet20 goodfet10 goodfet11))
7 mcu ?= msp430f1612
8 platform := goodfet
9 endif
10
11 ifneq (,$(findstring $(board),goodfet21))
12 mcu ?= msp430f2618
13 platform := goodfet
14 endif
15
16 ifneq (,$(findstring $(board),goodfet30 goodfet31))
17 mcu ?= msp430f2274
18 platform := goodfet
19 # This will link to fit in a '2254, so unneeded packages should be omited.
20 CONFIG_ccspi = n
21 endif
22
23 ifneq (,$(findstring $(board),goodfet40 goodfet41))
24 mcu ?= msp430f2618
25 platform := goodfet
26 endif
27
28 ifneq (,$(findstring $(board),goodfet24))
29 mcu ?= msp430f2618
30 platform := goodfet
31 endif
32
33 ifneq (,$(findstring $(board),nhb12b))
34 mcu ?= msp430f2618
35 CONFIG_nrf = y
36 platform := nhb12b
37 endif
38
39 ifneq (,$(findstring $(board),nhb12))
40 mcu ?= msp430f2618
41 CONFIG_nrf = y
42 platform := nhb12
43 endif
44
45 ifneq (,$(findstring $(board),goodfet50 goodfet51))
46 mcu ?= msp430f5510
47 platform := goodfet
48 endif
49
50 ifeq ($(board),telosb)
51 mcu ?= msp430f1611
52 platform := telosb
53 config := monitor spi ccspi
54 CFLAGS += -Duseuart1
55 endif
56
57 ifeq ($(board),telosbbt)
58 mcu ?=msp430f1612
59 platform := telosb
60 config := monitor spi ccspi
61 endif
62
63
64
65
66 ##################################
67 ## These are experimental boards.
68 ##################################
69
70 ifneq (,$(findstring $(board),donbfet))
71 GCC := avr-gcc
72 mcu ?= atmega644p
73 CFLAGS=$(DEBUG) -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
74 config := monitor avr spi jscan
75 endif
76
77 ifneq (,$(findstring $(board),arduino))
78 GCC := avr-gcc
79 mcu ?= atmega168
80 #BSL := avrdude -V -F -c stk500v1 -p m328p -b 57600 -P /dev/tty.usbserial-* -U flash:w:blink.hex
81 LDFLAGS := 
82 config := monitor
83 endif
84
85 ifneq (,$(findstring $(board),tilaunchpad))
86 mcu ?=msp430f1612
87 CFLAGS := -DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG
88 CFLAGS+= -Werror -Wall
89 config := monitor chipcon i2c
90 endif
91
92
93
94 mcu ?= undef
95 ifeq ($(mcu),undef)
96 $(error Please define board, as explained in the README)
97 endif
98 #platform := $(board)
99
100 AVAILABLE_APPS = monitor spi jtag sbw jtag430 jtag430x2 i2c jtagarm7 ejtag jtagxscale openocd chipcon avr pic adc nrf ccspi glitch smartcard ps2 slc2 
101
102 # defaults
103 CONFIG_monitor    ?= y
104 CONFIG_spi        ?= y
105 CONFIG_jtag       ?= n
106 CONFIG_sbw        ?= n
107 CONFIG_jtag430    ?= y
108 CONFIG_jtag430x2  ?= y
109 CONFIG_i2c        ?= n
110 CONFIG_jtagarm7   ?= n
111 CONFIG_ejtag      ?= n
112 CONFIG_jtagxscale ?= n
113 CONFIG_openocd    ?= y
114 CONFIG_chipcon    ?= y
115 CONFIG_avr        ?= y
116 CONFIG_pic        ?= n
117 CONFIG_adc        ?= n
118 CONFIG_nrf        ?= n
119 CONFIG_ccspi      ?= y
120 CONFIG_glitch     ?= n
121 CONFIG_smartcard  ?= n
122 CONFIG_ps2        ?= n
123 CONFIG_slc2       ?= n
124
125 #The CONFIG_foo vars are only interpreted if $(config) is unset.
126 ifeq ($(config),undef)
127 config += $(foreach app,$(AVAILABLE_APPS),$(if $(findstring $(CONFIG_$(app)),y yes t true Y YES T TRUE),$(app)))
128 endif