cmddata[0]=memorybyte[cmddataword[0]];
txdata(app,verb,1);
break;
+ case MONITOR_SIZEBUF:
+ //TODO make the data length target-specific, varying by ram.
+ cmddataword[0]=0x100;
+ txdata(app,verb,2);
+ break;
case MONITOR_CHANGE_BAUD:
//This command, and ONLY this command, does not reply.
setbaud(cmddata[0]);
P5OUT=cmddata[0];
txdata(app,verb,1);
break;
+ case MONITOR_SILENT:
+ silent=cmddata[0];
+ txdata(app,verb,1);
+ break;
}
}
*/
//! Global data buffer.
-extern unsigned char cmddata[256];
+extern unsigned char cmddata[0x100];
+extern unsigned char silent;
#define cmddataword ((unsigned int*) cmddata)
#define cmddatalong ((unsigned long*) cmddata)
#define MONITOR_OUT 0xA1
#define MONITOR_IN 0xA2
+#define MONITOR_SILENT 0xB0
+
+#define MONITOR_READBUF 0xC0
+#define MONITOR_WRITEBUF 0xC1
+#define MONITOR_SIZEBUF 0xC2
+
+
//CHIPCON commands
#define CC_CHIP_ERASE 0x80
#define CC_WR_CONFIG 0x81
#include <io.h>
#include <iomacros.h>
-
// Generic Commands
//! Overwrite all of RAM with 0xBEEF, then reboot.
#include <string.h>
unsigned char cmddata[256];
+unsigned char silent=0;
//! Transmit a string.
void txstring(unsigned char app,
unsigned char verb,
unsigned char len){
unsigned int i=0;
+ if(silent)
+ return;
serial_tx(app);
serial_tx(verb);
serial_tx(len);
#include <io.h>
#include <iomacros.h>
-
//! Receive a byte.
unsigned char serial_rx(){
char c;
return c;
}
-
//! Transmit a byte.
void serial_tx(unsigned char x){
while ((IFG1 & UTXIFG0) == 0); //loop until buffer is free
//platform.h will handle patching Port 5 to be Port 3.
+
#include "msp430x2618.c"
//! MSP430F2618 clock and I/O definitions
-// Ought to be portable to other 2xx chips.
-// 2274 looks particularly appealing.
+// Included by other 2xx ports, such as the 2274.
#include "platform.h"