projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TI Launchpad patch from Peter Lorenzen, edited to ease the mergequake.
[goodfet]
/
firmware
/
apps
/
monitor
/
monitor.c
diff --git
a/firmware/apps/monitor/monitor.c
b/firmware/apps/monitor/monitor.c
index
ab6f8a4
..
54d9cd0
100644
(file)
--- a/
firmware/apps/monitor/monitor.c
+++ b/
firmware/apps/monitor/monitor.c
@@
-7,6
+7,11
@@
#include "platform.h"
#include "monitor.h"
#include "builddate.h"
#include "platform.h"
#include "monitor.h"
#include "builddate.h"
+#if (platform == tilaunchpad)
+#include <setjmp.h>
+extern jmp_buf warmstart;
+
+#endif
#define MONITOR_APP
#define MONITOR_APP
@@
-78,14
+83,22
@@
void monitor_handle_fn(uint8_t const app,
break;
case PEEK:
break;
case PEEK:
+ #ifdef MSP430
cmddata[0]=memorybyte[cmddataword[0]];
cmddata[0]=memorybyte[cmddataword[0]];
+ #else
+ debugstr("Monitor peeks are unsupported on this platform.");
+ #endif
txdata(app,verb,1);
break;
case POKE:
txdata(app,verb,1);
break;
case POKE:
+ #ifdef MSP430
//Todo, make word or byte.
memorybyte[cmddataword[0]] = cmddata[2];
cmddata[0] = memorybyte[cmddataword[0]];
//Todo, make word or byte.
memorybyte[cmddataword[0]] = cmddata[2];
cmddata[0] = memorybyte[cmddataword[0]];
+ #else
+ debugstr("Monitor pokes are unsupported on this platform.");
+ #endif
txdata(app,verb,1);
break;
txdata(app,verb,1);
break;
@@
-123,19
+136,22
@@
void monitor_handle_fn(uint8_t const app,
break;
case MONITOR_DIR:
break;
case MONITOR_DIR:
- P5DIR=cmddata[0];
- txdata(app,verb,1);
- break;
+ //P5DIR=cmddata[0];
+ debugstr("Command deprecated.");
+ txdata(app,verb,1);
+ break;
case MONITOR_IN:
case MONITOR_IN:
- cmddata[0]=P5IN;
- txdata(app,verb,1);
- break;
+ //cmddata[0]=P5IN;
+ debugstr("Command deprecated.");
+ txdata(app,verb,1);
+ break;
case MONITOR_OUT:
case MONITOR_OUT:
- P5OUT=cmddata[0];
- txdata(app,verb,1);
- break;
+ //P5OUT=cmddata[0];
+ debugstr("Command deprecated.");
+ txdata(app,verb,1);
+ break;
case MONITOR_SILENT:
silent=cmddata[0];
case MONITOR_SILENT:
silent=cmddata[0];
@@
-143,9
+159,11
@@
void monitor_handle_fn(uint8_t const app,
break;
case MONITOR_CONNECTED:
break;
case MONITOR_CONNECTED:
- msp430_init_dco_done();
- txdata(app,verb,0);
- break;
+ #ifdef MSP430
+ msp430_init_dco_done();
+ #endif
+ txdata(app,verb,0);
+ break;
}
}
}
}
@@
-161,10
+179,14
@@
void monitor_ram_pattern()
}
txdata(0x00,0x90,0);
}
txdata(0x00,0x90,0);
+#if (platform == tilaunchpad)
+ longjmp(warmstart,1);
+#else
//Reboot
#ifdef MSP430
asm("br &0xfffe");
#endif
//Reboot
#ifdef MSP430
asm("br &0xfffe");
#endif
+#endif
}
//! Return the number of contiguous bytes 0xBEEF, to measure RAM usage.
}
//! Return the number of contiguous bytes 0xBEEF, to measure RAM usage.