From 6f072793cc4dc84f2b2e6084b0440035b56e0f54 Mon Sep 17 00:00:00 2001 From: travisutk Date: Wed, 16 Nov 2011 20:16:34 +0000 Subject: [PATCH] More code cleanup. Broke support for the Launchpad. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1061 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/Makefile | 13 ++++--------- firmware/README.txt | 3 ++- firmware/config.mk | 2 ++ firmware/include/platform.h | 8 +++++++- firmware/lib/msp430.c | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/firmware/Makefile b/firmware/Makefile index 758ecf5..07f1765 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -1,12 +1,6 @@ -include config.mk -#platform?=goodfet -#platform?=telosb -#platform?=z1 -#platform?=nhbadge -#platform?=nhbadgeb -#platofrm?=arduino -#platform?=tilaunchpad + platform?=goodfet # donb @@ -377,11 +371,12 @@ installinfo: $(MSP430BSL) -P $(app).hex -p info.txt || true #MSP430F2xx targets only, inelegant. verify: $(MSP430BSL) -P $(app).hex -v $(app).hex +erase: + $(MSP430BSL) -e + endif dumpinfo: $(MSP430BSL) --dumpinfo -erase: - $(MSP430BSL) -e $(app).c: config builddate appsfiles err $(app): $(libs) $(apps) diff --git a/firmware/README.txt b/firmware/README.txt index d912a36..fa0e8f6 100644 --- a/firmware/README.txt +++ b/firmware/README.txt @@ -6,9 +6,10 @@ Set \$GOODFET to be the port of your GoodFET, such as export GOODFET=/dev/cu.usbserial-* #Darwin export GOODFET=/dev/ttyUSB* #Linux (Default) -The target board must be specified. Export one of the following: +The target board must be specified. For example, board=goodfet31 make clean install board=goodfet41 make clean install +board=telosb make clean install We require at least msp430-gcc-4.4.5, but older versions should work if you're lucky. diff --git a/firmware/config.mk b/firmware/config.mk index f393f18..bd1f49b 100644 --- a/firmware/config.mk +++ b/firmware/config.mk @@ -24,6 +24,7 @@ ifneq (,$(findstring $(board),telosb)) mcu :=msp430x1612 CFLAGS := -DDEBUG_LEVEL=3 -DDEBUG_START=1 -DINBAND_DEBUG #CFLAGS+= -Werror +config := monitor spi ccspi endif @@ -51,6 +52,7 @@ 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 diff --git a/firmware/include/platform.h b/firmware/include/platform.h index 299b5a6..c138e0d 100644 --- a/firmware/include/platform.h +++ b/firmware/include/platform.h @@ -6,6 +6,9 @@ definition file, such as msp430x1612.c or msp430x2618.c. */ +#ifndef __PLATFORM_H +#define __PLATFORM_H + #include "gfports.h" @@ -21,7 +24,7 @@ #endif void msp430_init(); -void led_init(); +void led_init(); //deprecated void led_on(); void led_off(); void led_toggle(); @@ -62,3 +65,6 @@ void msp430_init_dco(); //! Called by monitor() when the DCO is correct and communication established. void msp430_init_dco_done(); + +#endif + diff --git a/firmware/lib/msp430.c b/firmware/lib/msp430.c index ec1a5c8..19bca37 100644 --- a/firmware/lib/msp430.c +++ b/firmware/lib/msp430.c @@ -17,6 +17,7 @@ void led_init() { PLEDDIR |= PLEDPIN; } + void led_on() { PLEDOUT |= PLEDPIN; @@ -24,7 +25,6 @@ void led_on() void led_off() { PLEDOUT&=~PLEDPIN; - } void led_toggle() { -- 2.20.1