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