From: travisutk Date: Wed, 16 Nov 2011 20:06:49 +0000 (+0000) Subject: Added support for board=tilaunchpad. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=02ef25dd7b69fd91d5a920e1c08d7724b6818888;ds=sidebyside Added support for board=tilaunchpad. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1060 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/Makefile b/firmware/Makefile index 09208f0..758ecf5 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -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= diff --git a/firmware/apps/i2c/i2c.c b/firmware/apps/i2c/i2c.c index af2c7f1..c598f54 100644 --- a/firmware/apps/i2c/i2c.c +++ b/firmware/apps/i2c/i2c.c @@ -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) diff --git a/firmware/config.mk b/firmware/config.mk index c7ef14e..f393f18 100644 --- a/firmware/config.mk +++ b/firmware/config.mk @@ -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