Commented some outdated debugging strings in the maxusb firmware, added some counter...
[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 ifeq ($(board),z1)
33 mcu ?= msp430f2617
34 platform := z1
35 config = monitor spi ccspi
36 MSP430BSL?=goodfet.bsl --z1  --speed=38400
37 endif
38
39 ifneq (,$(findstring $(board),goodfet24))
40 mcu ?= msp430f2618
41 platform := goodfet
42 CONFIG_glitch = y
43 endif
44
45 ifneq (,$(findstring $(board),nhb12b))
46 mcu ?= msp430f2618
47 CONFIG_nrf = y
48 platform := nhb12b
49 endif
50
51 ifneq (,$(findstring $(board),nhb12))
52 mcu ?= msp430f2618
53 CONFIG_nrf = y
54 platform := nhb12
55 endif
56
57 ifneq (,$(findstring $(board),goodfet50 goodfet51))
58 mcu ?= msp430f5510
59 platform := goodfet
60 endif
61
62 ifeq ($(board),telosb)
63 mcu ?= msp430f1611
64 platform := telosb
65 config := monitor spi ccspi
66 CFLAGS += -Duseuart1
67 endif
68
69 ifeq ($(board),telosbbt)
70 mcu ?=msp430f1612
71 platform := telosb
72 config := monitor spi ccspi
73 endif
74
75
76
77
78 ##################################
79 ## These are experimental boards.
80 ##################################
81
82 ifneq (,$(findstring $(board),donbfet))
83 GCC := avr-gcc
84 mcu ?= atmega644p
85 CFLAGS=$(DEBUG) -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
86 config := monitor avr spi jscan
87 endif
88
89 ifneq (,$(findstring $(board),arduino))
90 GCC := avr-gcc
91 mcu ?= atmega168
92 #BSL := avrdude -V -F -c stk500v1 -p m328p -b 57600 -P /dev/tty.usbserial-* -U flash:w:blink.hex
93 LDFLAGS := 
94 config := monitor
95 endif
96
97 ifneq (,$(findstring $(board),tilaunchpad))
98 mcu ?=msp430f1612
99 CFLAGS := -DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG
100 CFLAGS+= -Werror -Wall
101 config := monitor chipcon i2c
102 endif
103
104
105
106 mcu ?= undef
107 ifeq ($(mcu),undef)
108 $(error Please define board, as explained in the README)
109 endif
110 #platform := $(board)
111
112 AVAILABLE_APPS = monitor spi jtag sbw jtag430 jtag430x2 i2c jtagarm7 ejtag jtagxscale openocd chipcon avr pic adc nrf ccspi glitch smartcard ps2 slc2  maxusb
113
114 # defaults
115 CONFIG_monitor    ?= y
116 CONFIG_spi        ?= y
117 CONFIG_maxusb     ?= y
118 CONFIG_jtag       ?= n
119 CONFIG_sbw        ?= n
120 CONFIG_jtag430    ?= y
121 CONFIG_jtag430x2  ?= y
122 CONFIG_i2c        ?= n
123 CONFIG_jtagarm7   ?= n
124 CONFIG_ejtag      ?= n
125 CONFIG_jtagxscale ?= n
126 CONFIG_openocd    ?= y
127 CONFIG_chipcon    ?= y
128 CONFIG_avr        ?= y
129 CONFIG_pic        ?= n
130 CONFIG_adc        ?= n
131 CONFIG_nrf        ?= n
132 CONFIG_ccspi      ?= n
133 CONFIG_glitch     ?= n
134 CONFIG_smartcard  ?= n
135 CONFIG_ps2        ?= n
136 CONFIG_slc2       ?= n
137
138 #The CONFIG_foo vars are only interpreted if $(config) is "unset".
139 ifeq ($(config),undef)
140 config += $(foreach app,$(AVAILABLE_APPS),$(if $(findstring $(CONFIG_$(app)),y yes t true Y YES T TRUE),$(app)))
141 endif