X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fconfig.mk;h=0660f25bfc8e01e8374573d2b82148e1f82ed531;hp=c7ef14ef35efda81647b25b009a257df5d90a261;hb=18cee49968e2982cccb0e1c4a579244fd5d51fb1;hpb=f00f6dca229b8f3b641e6603106f0750d598b871 diff --git a/firmware/config.mk b/firmware/config.mk index c7ef14e..0660f25 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,9 +20,47 @@ 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 +config := monitor spi ccspi +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),arduino)) +GCC := avr-gcc +mcu := atmega168 +#BSL := avrdude -V -F -c stk500v1 -p m328p -b 57600 -P /dev/tty.usbserial-* -U flash:w:blink.hex +LDFLAGS := +config := monitor +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 +platform := $(board) AVAILABLE_APPS = monitor spi jtag sbw jtag430 jtag430x2 i2c jtagarm7 ejtag jtagxscale openocd chipcon avr pic adc nrf ccspi glitch smartcard ps2 @@ -47,6 +88,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