More code cleanup. Broke support for the Launchpad.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 16 Nov 2011 20:16:34 +0000 (20:16 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 16 Nov 2011 20:16:34 +0000 (20:16 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1061 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/Makefile
firmware/README.txt
firmware/config.mk
firmware/include/platform.h
firmware/lib/msp430.c

index 758ecf5..07f1765 100644 (file)
@@ -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)
 
index d912a36..fa0e8f6 100644 (file)
@@ -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.
index f393f18..bd1f49b 100644 (file)
@@ -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 
 
index 299b5a6..c138e0d 100644 (file)
@@ -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
+
index ec1a5c8..19bca37 100644 (file)
@@ -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()
 {