Steps toward plugin support.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 3 Sep 2009 23:11:28 +0000 (23:11 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 3 Sep 2009 23:11:28 +0000 (23:11 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@112 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/Makefile
firmware/apps/spi/spi.c
firmware/goodfet.c
firmware/include/apps.h

index 4e4cbc4..2317458 100644 (file)
@@ -13,11 +13,15 @@ mcu?=msp430x1612
 #GCCINC=-T ldscripts/161x.x
 GCCINC=-T ldscripts/$(mcu).x
 
-CC=msp430-gcc -Wall -g -mmcu=$(mcu) -DGCC $(GCCINC) -I include
+CCEXTRA?=
+CC=msp430-gcc -Wall -g -mmcu=$(mcu) -DGCC $(GCCINC) -I include $(CCEXTRA)
 
-apps= apps/monitor/monitor.o apps/spi/spi.o apps/i2c/i2c.o apps/chipcon/chipcon.o apps/jtag/jtag.o apps/jtag/jtag430.o
+#Define extra modules here.
+moreapps?=
+
+apps= $(moreapps) apps/monitor/monitor.o apps/spi/spi.o apps/i2c/i2c.o apps/chipcon/chipcon.o apps/jtag/jtag.o apps/jtag/jtag430.o
 libs= lib/$(mcu).o lib/command.o apps/jtag/jtag430asm.o
-app=goodfet
+app= goodfet
 
 all: $(app).hex
 
index a5f72b8..f4c6560 100644 (file)
@@ -186,7 +186,11 @@ void spihandle(unsigned char app,
     for(i=0;i<len;i++)
       spitrans8(cmddata[i]);
     P5OUT|=SS;  //Raise !SS to end transaction.
-    while(spiflash_status()&0x01);//while busy
+    
+    while(spiflash_status()&0x01)//while busy
+      P1OUT^=1;
+    P1OUT&=~1;
+    
     txdata(app,verb,len);
     break;
 
index 5d01977..7d4a88a 100644 (file)
@@ -50,7 +50,11 @@ void handle(unsigned char app,
     jtag430handle(app,verb,len);\r
     break;\r
   default:\r
+    #ifdef HANDLEOTHER\r
+    HANDLEOTHER(app,verb,len);\r
+    #else\r
     txdata(app,NOK,0);\r
+    #endif\r
     break;\r
   }\r
 }\r
index 48ec492..7c5e3b9 100644 (file)
@@ -8,3 +8,5 @@
 #define CHIPCON 0x30
 #define SIF 0x31
 
+#define OCT 0x70
+