Moved the firmware Makefile to trunk/firmware.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sat, 20 Jun 2009 01:37:06 +0000 (01:37 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sat, 20 Jun 2009 01:37:06 +0000 (01:37 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@42 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/Makefile [new file with mode: 0644]
firmware/apps/Makefile [deleted file]
firmware/apps/goodfet.c [deleted file]
firmware/goodfet.c [new file with mode: 0644]

diff --git a/firmware/Makefile b/firmware/Makefile
new file mode 100644 (file)
index 0000000..f1607d6
--- /dev/null
@@ -0,0 +1,35 @@
+
+PORT=/dev/ttyUSB0
+BSL=tos-bsl --invert-reset --invert-test -c $(PORT) --speed=38400
+
+#mcu=msp430x1611
+mcu=msp430x1612
+
+#ldscript is wonky
+GCCINC=-T ldscripts/161x.x
+
+CC=msp430-gcc -g -mmcu=$(mcu) -DGCC $(GCCINC) -I include
+
+apps= apps/monitor/monitor.c apps/spi/spi.c apps/i2c/i2c.c apps/chipcon/chipcon.c apps/jtag/jtag.c apps/jtag/jtag430.c
+libs= lib/msp430f1612.c lib/command.c
+app=goodfet
+
+all: $(app).hex
+
+goodfet.hex: goodfet
+
+run:
+       ../../client/goodfet.msp430
+
+install: $(app).hex
+       $(BSL) -e -p $(app).hex 
+       $(BSL) -P $(app).hex -r
+$(app): $(app).c $(libs) $(apps)
+$(app).hex: $(app)
+       msp430-objcopy goodfet -O ihex goodfet.hex
+m4s: $(app).hex
+       msp430-objdump -D -m msp430 $(app).hex | m4s init
+erase:
+       $(BSL) -e 
+clean:
+       rm -f $(app)
diff --git a/firmware/apps/Makefile b/firmware/apps/Makefile
deleted file mode 100644 (file)
index 40114b3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
-PORT=/dev/ttyUSB0
-BSL=tos-bsl --invert-reset --invert-test -c $(PORT) --speed=38400
-
-#mcu=msp430x1611
-mcu=msp430x1612
-
-#ldscript is wonky
-GCCINC=-T ../ldscripts/161x.x
-
-CC=msp430-gcc -g -mmcu=$(mcu) -DGCC $(GCCINC) -I ../include
-
-apps= monitor/monitor.c spi/spi.c i2c/i2c.c chipcon/chipcon.c jtag/jtag.c jtag/jtag430.c
-libs= ../lib/msp430f1612.c ../lib/command.c
-app=goodfet
-
-all: $(app)
-
-goodfet.hex: goodfet
-
-run:
-       ../../client/goodfet.msp430
-
-install: $(app)
-       $(BSL) -e -p $(app).hex 
-       $(BSL) -P $(app).hex -r
-$(app): $(app).c $(libs) $(apps)
-$(app).hex: $(app)
-       msp430-objcopy goodfet -O ihex goodfet.hex
-m4s: $(app).hex
-       msp430-objdump -D -m msp430 $(app).hex | m4s init
-erase:
-       $(BSL) -e 
-clean:
-       rm -f $(app)
diff --git a/firmware/apps/goodfet.c b/firmware/apps/goodfet.c
deleted file mode 100644 (file)
index a8d5b7a..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-//GOODFET Main File\r
-//Includes several applications.\r
-\r
-#include "platform.h"\r
-#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
-//IO on P5\r
-\r
-//! Initialize registers and all that jazz.\r
-void init(){\r
-  volatile unsigned int i;\r
-  WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer\r
-  \r
-  //LED and TX OUT\r
-  PLEDDIR |= PLEDPIN;\r
-  \r
-  msp430_init_dco();\r
-  msp430_init_uart();\r
-  \r
-  //Enable Interrupts.\r
-  //eint();\r
-}\r
-\r
-//! Handle a command.\r
-void handle(unsigned char app,\r
-           unsigned char verb,\r
-           unsigned char len){\r
-  switch(app){\r
-  case MONITOR:\r
-    monitorhandle(app,verb,len);\r
-    break;\r
-  case SPI:\r
-    spihandle(app,verb,len);\r
-    break;\r
-  case I2C:\r
-    i2chandle(app,verb,len);\r
-    break;\r
-  case CHIPCON:\r
-    cchandle(app,verb,len);\r
-    break;\r
-  case JTAG:\r
-    jtaghandle(app,verb,len);\r
-    break;\r
-  case JTAG430:\r
-    jtag430handle(app,verb,len);\r
-    break;\r
-  default:\r
-    txdata(app,NOK,0);\r
-    break;\r
-  }\r
-}\r
-\r
-//! Main loop.\r
-int main(void)\r
-{\r
-  volatile unsigned int i;\r
-  unsigned char app, verb, len;\r
-  \r
-  init();\r
-  \r
-  //Ready\r
-  txdata(MONITOR,OK,0);\r
-  \r
-  //Command loop.  There's no end!\r
-  while(1){\r
-    //Magic 3\r
-    app=serial_rx();\r
-    verb=serial_rx();\r
-    len=serial_rx();\r
-    \r
-    //Read data, if any\r
-    for(i=0;i<len;i++){\r
-      cmddata[i]=serial_rx();\r
-    }\r
-    handle(app,verb,len);\r
-  }\r
-}\r
-\r
diff --git a/firmware/goodfet.c b/firmware/goodfet.c
new file mode 100644 (file)
index 0000000..a8d5b7a
--- /dev/null
@@ -0,0 +1,85 @@
+//GOODFET Main File\r
+//Includes several applications.\r
+\r
+#include "platform.h"\r
+#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
+//IO on P5\r
+\r
+//! Initialize registers and all that jazz.\r
+void init(){\r
+  volatile unsigned int i;\r
+  WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer\r
+  \r
+  //LED and TX OUT\r
+  PLEDDIR |= PLEDPIN;\r
+  \r
+  msp430_init_dco();\r
+  msp430_init_uart();\r
+  \r
+  //Enable Interrupts.\r
+  //eint();\r
+}\r
+\r
+//! Handle a command.\r
+void handle(unsigned char app,\r
+           unsigned char verb,\r
+           unsigned char len){\r
+  switch(app){\r
+  case MONITOR:\r
+    monitorhandle(app,verb,len);\r
+    break;\r
+  case SPI:\r
+    spihandle(app,verb,len);\r
+    break;\r
+  case I2C:\r
+    i2chandle(app,verb,len);\r
+    break;\r
+  case CHIPCON:\r
+    cchandle(app,verb,len);\r
+    break;\r
+  case JTAG:\r
+    jtaghandle(app,verb,len);\r
+    break;\r
+  case JTAG430:\r
+    jtag430handle(app,verb,len);\r
+    break;\r
+  default:\r
+    txdata(app,NOK,0);\r
+    break;\r
+  }\r
+}\r
+\r
+//! Main loop.\r
+int main(void)\r
+{\r
+  volatile unsigned int i;\r
+  unsigned char app, verb, len;\r
+  \r
+  init();\r
+  \r
+  //Ready\r
+  txdata(MONITOR,OK,0);\r
+  \r
+  //Command loop.  There's no end!\r
+  while(1){\r
+    //Magic 3\r
+    app=serial_rx();\r
+    verb=serial_rx();\r
+    len=serial_rx();\r
+    \r
+    //Read data, if any\r
+    for(i=0;i<len;i++){\r
+      cmddata[i]=serial_rx();\r
+    }\r
+    handle(app,verb,len);\r
+  }\r
+}\r
+\r