Repaired support for msp430-gcc-4.4.5, perhaps breaking MSP430x5xx support.
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1058
12e2690d-a6be-4b82-a7b7-
67c4a43b65c8
# very end of the command line, so they only have an effect for a
# default linker script
GCC?=msp430-gcc
-LDFLAGS?=-Wl,-dT ldscripts/msp430.x
+LDFLAGS?=-Wl,-dT ldscripts/$(mcu).x
CCEXTRA?= $(CFLAGS) -D$(mcu) -D$(platform) -Dplatform=$(platform) $(GCCINC) -I include -I platforms
CC=$(GCC) -Wall -Os -fno-strict-aliasing -g -mmcu=$(mcu) $(CCEXTRA)
GoodFET Firmware
-by Travis Goodspeed
-<travis at radiantmachines.com>
+by Travis Goodspeed <travis at radiantmachines.com>
+and some good neighbors.
-Requires MSPGCC and msp430-bsl.
+Set \$GOODFET to be the port of your GoodFET, such as
+export GOODFET=/dev/cu.usbserial-* #Darwin
+export GOODFET=/dev/ttyUSB* #Linux (Default)
-Assumes MSP430F161x by default. Call for others by the following method,
-recognizing that 2618 support is a rather recent addition and only works
-in MSPGCC from CVS.
+The target board must be specified. Export one of the following:
+board=goodfet31 make clean install
+board=goodfet41 make clean install
-export mcu=msp430x2618
-make -e
-
-
-
-Some weird switches,
-1) Build for a static DCO configuration. Useful for standalone firmware.
-CFLAGS="-DSTATICDCO=0x8F9E" make clean all
+We require at least msp430-gcc-4.4.5, but older versions should work
+if you're lucky.
mcu := msp430x1612
endif
+ifneq (,$(findstring $(board),goodfet30 goodfet31))
+mcu := msp430x2274
+endif
+
ifneq (,$(findstring $(board),goodfet40 goodfet41))
mcu := msp430x2618
endif
endif
ifeq ($(mcu),undef)
-$(error Please define board)
+$(error Please define board, as explained in the README)
endif
AVAILABLE_APPS = monitor spi jtag sbw jtag430 jtag430x2 i2c jtagarm7 ejtag jtagxscale openocd chipcon avr pic adc nrf ccspi glitch smartcard ps2
#!/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)
+cat README.txt
-The MSP430F161x is targetted by default. Build for others
-by setting one of the following.
-mcu=msp430x2618 #BadFET20
-mcu=msp430x1612 #GoodFET10, GoodFET20
-mcu=msp430x2274 #GoodFET30
-
-EOF