Added support for board=tilaunchpad.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 16 Nov 2011 20:06:49 +0000 (20:06 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 16 Nov 2011 20:06:49 +0000 (20:06 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1060 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/Makefile
firmware/apps/i2c/i2c.c
firmware/config.mk

index 09208f0..758ecf5 100644 (file)
@@ -16,11 +16,6 @@ mcu?=atmega644p
 CFLAGS=$(DEBUG) -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
 endif
 
-ifeq ($(platform),tilaunchpad)
-mcu?=msp430x1612
-CFLAGS+=-DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG
-#CFLAGS+= -Werror
-endif
 
 #include `uname`.mak
 GOODFET?=/dev/tty.usbser*
@@ -129,10 +124,6 @@ else
 config ?= monitor chipcon spi jtag430 jtag430x2 avr openocd ccspi
 endif
 
-# donb
-ifeq ($(platform),donbfet)
-config=monitor avr spi jscan
-endif
 
 # Build the needed list of app and lib object files from the config
 apps=
index af2c7f1..c598f54 100644 (file)
@@ -47,7 +47,7 @@ app_t const i2c_app = {
 
 
 //2xx only, need 1xx compat code
-#if (platform == tilaunchpad)
+#if (board == tilaunchpad)
 // P3.1 SDA
 // P3.3 SCL
 #define SDA (1<<1)
index c7ef14e..f393f18 100644 (file)
@@ -1,3 +1,6 @@
+##################################
+## These are production boards.
+##################################
 mcu = undef
 ifneq (,$(findstring $(board),goodfet20))
 mcu := msp430x1612
@@ -17,6 +20,34 @@ ifneq (,$(findstring $(board),goodfet50 goodfet51))
 mcu := msp430x5510
 endif
 
+ifneq (,$(findstring $(board),telosb))
+mcu :=msp430x1612
+CFLAGS := -DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG
+#CFLAGS+= -Werror
+endif
+
+
+##################################
+## These are experimental boards.
+##################################
+
+ifneq (,$(findstring $(board),donbfet))
+GCC := avr-gcc
+mcu := atmega644p
+CFLAGS=$(DEBUG) -mmcu=$(mcu) -W -Os -mcall-prologues -Wall -Wextra -Wuninitialized -fpack-struct -fshort-enums -funsigned-bitfields
+config := monitor avr spi jscan
+endif
+
+ifneq (,$(findstring $(board),tilaunchpad))
+mcu :=msp430x1612
+CFLAGS := -DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG
+#CFLAGS+= -Werror
+config := monitor chipcon i2c
+endif
+
+
+
+
 ifeq ($(mcu),undef)
 $(error Please define board, as explained in the README)
 endif
@@ -47,6 +78,7 @@ CONFIG_glitch     ?= n
 CONFIG_smartcard  ?= n
 CONFIG_ps2        ?= n
 
-
+#The CONFIG_foo vars are only interpreted if $(config) is unset.
+ifeq ($(config),undef)
 config := $(foreach app,$(AVAILABLE_APPS),$(if $(findstring $(CONFIG_$(app)),y yes t true Y YES T TRUE),$(app)))
-
+endif