summaryrefslogtreecommitdiff
path: root/src/target/etb.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-06-14 09:47:00 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-06-14 09:47:00 +0000
commit53d1f9b2ca5718e4996e9cf3406f857d0ed26df2 (patch)
tree76c0dbf27a9114fb6f8a4c9f71af6117716a05d5 /src/target/etb.c
parent7087b66f19a7d60025f7315baa26d682804f3640 (diff)
downloadopenocd_libswd-53d1f9b2ca5718e4996e9cf3406f857d0ed26df2.tar.gz
openocd_libswd-53d1f9b2ca5718e4996e9cf3406f857d0ed26df2.tar.bz2
openocd_libswd-53d1f9b2ca5718e4996e9cf3406f857d0ed26df2.tar.xz
openocd_libswd-53d1f9b2ca5718e4996e9cf3406f857d0ed26df2.zip
- added manpage for OpenOCD (thanks to Uwe Hermann)
- fixed bug in ARM926EJ-S cache handling that caused cache linefills to be disabled after first debug entry - added support for auto image type detection (thanks to Vincent Palatin) - further work on ETM trace decoding (tested with a ETB interface using an ETM in normal 16-bit port mode, still experimental) git-svn-id: svn://svn.berlios.de/openocd/trunk@169 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/etb.c')
-rw-r--r--src/target/etb.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/target/etb.c b/src/target/etb.c
index 257c4b18..81e20af0 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -582,11 +582,29 @@ int etb_read_trace(etm_context_t *etm_ctx)
{
etm_ctx->trace_data[j].pipestat = trace_data[i] & 0x7;
etm_ctx->trace_data[j].packet = (trace_data[i] & 0x7f8) >> 3;
- etm_ctx->trace_data[j].tracesync = (trace_data[i] & 0x800) >> 11;
+ etm_ctx->trace_data[j].flags = 0;
+ if ((trace_data[i] & 0x800) >> 11)
+ {
+ etm_ctx->trace_data[j].flags |= ETMV1_TRACESYNC_CYCLE;
+ }
+ if (etm_ctx->trace_data[j].pipestat == STAT_TR)
+ {
+ etm_ctx->trace_data[j].pipestat = etm_ctx->trace_data[j].packet & 0x7;
+ etm_ctx->trace_data[j].flags |= ETMV1_TRIGGER_CYCLE;
+ }
etm_ctx->trace_data[j+1].pipestat = (trace_data[i] & 0x7000) >> 12;
etm_ctx->trace_data[j+1].packet = (trace_data[i] & 0x7f8000) >> 15;
- etm_ctx->trace_data[j+1].tracesync = (trace_data[i] & 0x800000) >> 23;
+ etm_ctx->trace_data[j+1].flags = 0;
+ if ((trace_data[i] & 0x800000) >> 23)
+ {
+ etm_ctx->trace_data[j+1].flags |= ETMV1_TRACESYNC_CYCLE;
+ }
+ if (etm_ctx->trace_data[j+1].pipestat == STAT_TR)
+ {
+ etm_ctx->trace_data[j+1].pipestat = etm_ctx->trace_data[j+1].packet & 0x7;
+ etm_ctx->trace_data[j+1].flags |= ETMV1_TRIGGER_CYCLE;
+ }
j += 2;
}
@@ -594,7 +612,16 @@ int etb_read_trace(etm_context_t *etm_ctx)
{
etm_ctx->trace_data[j].pipestat = trace_data[i] & 0x7;
etm_ctx->trace_data[j].packet = (trace_data[i] & 0x7fff8) >> 3;
- etm_ctx->trace_data[j].tracesync = (trace_data[i] & 0x80000) >> 19;
+ etm_ctx->trace_data[j].flags = 0;
+ if ((trace_data[i] & 0x80000) >> 19)
+ {
+ etm_ctx->trace_data[j].flags |= ETMV1_TRACESYNC_CYCLE;
+ }
+ if (etm_ctx->trace_data[j].pipestat == STAT_TR)
+ {
+ etm_ctx->trace_data[j].pipestat = etm_ctx->trace_data[j].packet & 0x7;
+ etm_ctx->trace_data[j].flags |= ETMV1_TRIGGER_CYCLE;
+ }
j += 1;
}