aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Morton <austinpmorton@gmail.com>2017-03-28 23:22:44 -0400
committerFreddie Chopin <freddie.chopin@gmail.com>2017-04-23 20:46:32 +0100
commit568e84236bf3b58f4eef73cbed70f3544b44df1f (patch)
tree8ec14045588fbf8773836c65e67f4691831d9d8c
parentf605a23bc4b2620b493bd07241cd5928b74e197f (diff)
downloadriscv-openocd-568e84236bf3b58f4eef73cbed70f3544b44df1f.zip
riscv-openocd-568e84236bf3b58f4eef73cbed70f3544b44df1f.tar.gz
riscv-openocd-568e84236bf3b58f4eef73cbed70f3544b44df1f.tar.bz2
stlink: increase trace buffer size to maximum allowed on st-link v2 firmware
Increasing the trace buffer size on the st-link itself gives openocd a greater chance of avoiding trace data overflowing within the st-link between polls when there is a large amount of data being sent over the trace port The st-link appears to split the given buffer size in half while one half is awaiting transfer over USB, the other half is being filled by DMA transfer. If you do not poll frequently enough, the DMA transfer will overflow back to the start of its current buffer, resulting in corrupted output Buffer size of 4096 bytes is the maximum allowed by the st-link v2 Change-Id: I169189b021c34f8d18de1601d78b8c5890367d68 Signed-off-by: Austin Morton <austinpmorton@gmail.com> Reviewed-on: http://openocd.zylin.com/4085 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
-rw-r--r--src/jtag/drivers/stlink_usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c
index 699c41f..0bdcd31 100644
--- a/src/jtag/drivers/stlink_usb.c
+++ b/src/jtag/drivers/stlink_usb.c
@@ -216,7 +216,7 @@ struct stlink_usb_handle_s {
#define STLINK_DEBUG_APIV2_DRIVE_NRST_HIGH 0x01
#define STLINK_DEBUG_APIV2_DRIVE_NRST_PULSE 0x02
-#define STLINK_TRACE_SIZE 1024
+#define STLINK_TRACE_SIZE 4096
#define STLINK_TRACE_MAX_HZ 2000000
#define STLINK_TRACE_MIN_VERSION 13