projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use 'ao-dbg' instead of 's51' to communicate with TeleMetrum
[fw/sdcc]
/
debugger
/
mcs51
/
simi.c
diff --git
a/debugger/mcs51/simi.c
b/debugger/mcs51/simi.c
index d75e420d73a73f3b47d20e8c39e382a7047ef1c6..4a771a339fcc4782fa304011bb4b6aa4afb2733b 100644
(file)
--- a/
debugger/mcs51/simi.c
+++ b/
debugger/mcs51/simi.c
@@
-82,7
+82,14
@@
static char *getMemCache(unsigned int addr,int cachenum, int size)
{
sendSim("ds 0x80 0xff\n");
}
{
sendSim("ds 0x80 0xff\n");
}
- else
+ else if ( cachenum == CMEM_CACHE )
+ {
+#define CMEM_CACHE_MASK ((MAX_CACHE_SIZE >> 2) - 1)
+ laddr = addr & ~CMEM_CACHE_MASK;
+ sprintf(cache->buffer,"dump rom 0x%x 0x%x\n",laddr,laddr+CMEM_CACHE_MASK );
+ sendSim(cache->buffer);
+ }
+ else
{
laddr = addr & 0xffffffc0;
sprintf(cache->buffer,"dx 0x%x 0x%x\n",laddr,laddr+0xff );
{
laddr = addr & 0xffffffc0;
sprintf(cache->buffer,"dx 0x%x 0x%x\n",laddr,laddr+0xff );
@@
-283,6
+290,7
@@
void openSimulator (char **args, int nargs)
invalidateCache(XMEM_CACHE);
invalidateCache(IMEM_CACHE);
invalidateCache(SREG_CACHE);
invalidateCache(XMEM_CACHE);
invalidateCache(IMEM_CACHE);
invalidateCache(SREG_CACHE);
+ invalidateCache(CMEM_CACHE);
if (INVALID_SOCKET == (sock = WSASocket(PF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0))) {
fprintf(stderr, "cannot create socket: %d\n", WSAGetLastError());
if (INVALID_SOCKET == (sock = WSASocket(PF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0))) {
fprintf(stderr, "cannot create socket: %d\n", WSAGetLastError());
@@
-386,6
+394,7
@@
void openSimulator (char **args, int nargs)
invalidateCache(XMEM_CACHE);
invalidateCache(IMEM_CACHE);
invalidateCache(SREG_CACHE);
invalidateCache(XMEM_CACHE);
invalidateCache(IMEM_CACHE);
invalidateCache(SREG_CACHE);
+ invalidateCache(CMEM_CACHE);
if ((sock = socket(AF_INET,SOCK_STREAM,0)) < 0)
{
if ((sock = socket(AF_INET,SOCK_STREAM,0)) < 0)
{
@@
-474,12
+483,14
@@
static int getMemString(char *buffer, char wrflag,
{
case 'A': /* External stack */
case 'F': /* External ram */
{
case 'A': /* External stack */
case 'F': /* External ram */
+ case 'P': /* Pdata space */
prefix = "xram";
cachenr = XMEM_CACHE;
break;
case 'C': /* Code */
case 'D': /* Code / static segment */
prefix = "rom";
prefix = "xram";
cachenr = XMEM_CACHE;
break;
case 'C': /* Code */
case 'D': /* Code / static segment */
prefix = "rom";
+ cachenr = CMEM_CACHE;
break;
case 'B': /* Internal stack */
case 'E': /* Internal ram (lower 128) bytes */
break;
case 'B': /* Internal stack */
case 'E': /* Internal ram (lower 128) bytes */
@@
-754,6
+765,7
@@
void simReset (void)
invalidateCache(XMEM_CACHE);
invalidateCache(IMEM_CACHE);
invalidateCache(SREG_CACHE);
invalidateCache(XMEM_CACHE);
invalidateCache(IMEM_CACHE);
invalidateCache(SREG_CACHE);
+ invalidateCache(CMEM_CACHE);
sendSim("res\n");
waitForSim(100,NULL);
}
sendSim("res\n");
waitForSim(100,NULL);
}