This patch breaks 2274 support, but fixes everything else.
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@103
12e2690d-a6be-4b82-a7b7-
67c4a43b65c8
-PORT=/dev/ttyUSB0
-BSL=../../contrib/tos-bsl --invert-reset --invert-test -c $(PORT) --speed=38400
+#include `uname`.mak
+GOODFET?=/dev/ttyUSB0
+BSL=../../contrib/tos-bsl --invert-reset --invert-test -c $(GOODFET) --speed=38400
+
+#mcu=msp430x2274
#mcu=msp430x2618
-mcu=msp430x1612
+mcu?=msp430x1612
#N.B., gcc WILL NOT BITCH if this file doesn't exist.
--- /dev/null
+#!/bin/sh
+
+cat <<EOF
+Set $GOODFET to be the port of your GoodFET, such as
+GOODFET=/dev/cu.usbserial-* #Darwin
+GOODFET=/dev/ttyUSB* #Linux (Default)
+
+The MSP430F161x is targetted by default. Build for others
+by setting one of the following.
+mcu=msp430x2618
+mcu=msp430x1612 #MSP430F1612 or 1611
+mcu=msp430x2274 #2272 or 2274
+
+EOF
#include "command.h"\r
#include "apps.h"\r
\r
-#include <signal.h>\r
-#include <io.h>\r
-#include <iomacros.h>\r
\r
\r
//LED on P1.0\r
//! \file platform.h
+#include <signal.h>
+#include <io.h>
+#include <iomacros.h>
+
+
+//Use P3 instead of P5 for target I/O on chips without P5.
+//#ifndef P5OUT
+//#warning "P5OUT undefined, using P3 instead."
+//#define P5OUT P3OUT
+//#define P5DIR P3DIR
+//#define P5REN P3REN
+//#define P5IN P3IN
+//#endif
+
unsigned char serial_rx();
void serial_tx(unsigned char);
--- /dev/null
+
+//platform.h will handle patching Port 5 to be Port 3.
+
+#include "msp430x2618.c"