Added support for board=tilaunchpad.
[goodfet] / firmware / config.mk
1 ##################################
2 ## These are production boards.
3 ##################################
4 mcu = undef
5 ifneq (,$(findstring $(board),goodfet20))
6 mcu := msp430x1612
7 endif
8
9 ifneq (,$(findstring $(board),goodfet30 goodfet31))
10 mcu := msp430x2274
11 # This will link to fit in a '2254, so unneeded packages should be omited.
12 CONFIG_ccspi = n
13 endif
14
15 ifneq (,$(findstring $(board),goodfet40 goodfet41))
16 mcu := msp430x2618
17 endif
18
19 ifneq (,$(findstring $(board),goodfet50 goodfet51))
20 mcu := msp430x5510
21 endif
22
23 ifneq (,$(findstring $(board),telosb))
24 mcu :=msp430x1612
25 CFLAGS := -DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG
26 #CFLAGS+= -Werror
27 endif
28
29
30 ##################################
31 ## These are experimental boards.
32 ##################################
33
34 ifneq (,$(findstring $(board),donbfet))
35 GCC := avr-gcc
36 mcu := atmega644p
37 CFLAGS=$(DEBUG) -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
38 config := monitor avr spi jscan
39 endif
40
41 ifneq (,$(findstring $(board),tilaunchpad))
42 mcu :=msp430x1612
43 CFLAGS := -DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG
44 #CFLAGS+= -Werror
45 config := monitor chipcon i2c
46 endif
47
48
49
50
51 ifeq ($(mcu),undef)
52 $(error Please define board, as explained in the README)
53 endif
54
55 AVAILABLE_APPS = monitor spi jtag sbw jtag430 jtag430x2 i2c jtagarm7 ejtag jtagxscale openocd chipcon avr pic adc nrf ccspi glitch smartcard ps2 
56
57 CONFIG_sbw         = y
58
59 # defaults
60 CONFIG_monitor    ?= y
61 CONFIG_spi        ?= y
62 CONFIG_jtag       ?= n
63 CONFIG_sbw        ?= n
64 CONFIG_jtag430    ?= y
65 CONFIG_jtag430x2  ?= y
66 CONFIG_i2c        ?= n
67 CONFIG_jtagarm7   ?= n
68 CONFIG_ejtag      ?= n
69 CONFIG_jtagxscale ?= n
70 CONFIG_openocd    ?= y
71 CONFIG_chipcon    ?= y
72 CONFIG_avr        ?= y
73 CONFIG_pic        ?= n
74 CONFIG_adc        ?= n
75 CONFIG_nrf        ?= n
76 CONFIG_ccspi      ?= y
77 CONFIG_glitch     ?= n
78 CONFIG_smartcard  ?= n
79 CONFIG_ps2        ?= n
80
81 #The CONFIG_foo vars are only interpreted if $(config) is unset.
82 ifeq ($(config),undef)
83 config := $(foreach app,$(AVAILABLE_APPS),$(if $(findstring $(CONFIG_$(app)),y yes t true Y YES T TRUE),$(app)))
84 endif