Trying to clean up port.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 25 Jan 2010 20:50:35 +0000 (20:50 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 25 Jan 2010 20:50:35 +0000 (20:50 +0000)
Not nearly complete.

git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@285 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/apps/monitor/monitor.c
firmware/include/command.h
firmware/include/gfports.h
firmware/include/monitor.h
firmware/include/platform.h

index 323691f..85c523f 100644 (file)
@@ -89,7 +89,9 @@ void monitor_ram_pattern(){
   txdata(0x00,0x90,0);
   
   //Reboot
+  #ifdef MSP430
   asm("br &0xfffe");
+  #endif
 }
 
 //! Return the number of contiguous bytes 0xBEEF, to measure RAM usage.
index 1fe9e42..d909e33 100644 (file)
@@ -74,7 +74,12 @@ extern unsigned char silent;
 #define OCT_CMP 0x90
 #define OCT_RES 0x91
 
+#ifdef GCC
 #define WEAKDEF __attribute__ ((weak))
+#else
+//Compiler doesn't support weak linking. :(
+#define WEAKDEF
+#endif
 
 //! Handle a plugin, weak-linked to error.
 extern int pluginhandle(unsigned char app,
index 8cc1012..38757cd 100644 (file)
@@ -6,7 +6,9 @@
 #ifndef GFPORTS
 #define GFPORTS
 
+#ifdef MSP430
 #include <io.h>
+#endif
 
 // N.B., only asm-clean CPP definitions allowed.
 
 #endif
 #endif
 
+//Use these instead of the explicit names.
+#ifdef MSP430
+#define gfout P5OUT
+#define gfin  P5IN
+#define gfdir P5DIR
+#define gfren P5REN
+#endif
+
+
 
 #endif //GFPORTS
index ecae3fd..b36ceab 100644 (file)
@@ -3,9 +3,11 @@
   \brief Debug monitor commands.
 */
 
+#ifdef MSP430
 #include <signal.h>
 #include <io.h>
 #include <iomacros.h>
+#endif
 
 // Generic Commands
 
index 113549c..87b18cc 100644 (file)
@@ -6,10 +6,6 @@
   definition file, such as msp430x1612.c or msp430x2618.c.
 */
 
-#include <signal.h>
-#include <io.h>
-#include <iomacros.h>
-
 #include "gfports.h"
 
 unsigned char serial_rx();