Fixed synching bug which was introduced by dropping the custom linker scripts.
[goodfet] / firmware / tests / blink / Makefile
index 7912810..71a5c9b 100644 (file)
@@ -1,13 +1,25 @@
 
 PORT=/dev/ttyUSB0
-BSL=tos-bsl --invert-reset --invert-test -c $(PORT)
+BSL=goodfet.bsl
 
-CC=msp430-gcc -g -mmcu=msp430x1611 -DGCC
+#Default to 2001 with least resources.
+
+#mcu=msp430x1611
+#mcu=msp430x2618
+mcu?=msp430x2001
+
+#GCCINC=-T ../../ldscripts/161x.x
+CC=msp430-gcc -g -mmcu=$(mcu) -DGCC $(GCCINC) -I ../../include
 
 app=blink
 
-install: $(app)
-       $(BSL) -e -p $(app)
-       $(BSL) -P $(app) -g 0x4000
+all: $(app).hex
+$(app).hex: $(app)
+       msp430-objcopy $(app) -O ihex $(app).hex
+install: $(app).hex
+       $(BSL) -e -p $(app).hex 
+       $(BSL) -P $(app).hex -r
 erase:
        $(BSL) -e 
+clean:
+       rm -f $(app) $(app).hex