diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2019-01-29 09:23:09 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-02-07 19:32:41 +0000 |
commit | 6c2020eb48803b941a94d600e2a96728d05a7da9 (patch) | |
tree | ef55ea52416ffa24e075588507850d0da00aa0a5 | |
parent | d869c5d3d706f2dfe6aa291cac52a32df8cba9ae (diff) | |
download | riscv-openocd-6c2020eb48803b941a94d600e2a96728d05a7da9.zip riscv-openocd-6c2020eb48803b941a94d600e2a96728d05a7da9.tar.gz riscv-openocd-6c2020eb48803b941a94d600e2a96728d05a7da9.tar.bz2 |
jlink: Use correct SWD buffer size
Currently, the SWD buffer size is adjusted corresponding to the free
device memory. However, the adjusted size is not used.
This fixes SWD operations on devices with small device memory, such as
EFM32PG12 Pearl Gecko STK. It should also fix #184.
Change-Id: I2ec5cf25c62f18bd9e99a2f4aa1aa8d85ed0821b
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4878
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
-rw-r--r-- | src/jtag/drivers/jlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index e74965e..1eae827 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -2130,7 +2130,7 @@ skip: static void jlink_swd_queue_cmd(uint8_t cmd, uint32_t *dst, uint32_t data, uint32_t ap_delay_clk) { uint8_t data_parity_trn[DIV_ROUND_UP(32 + 1, 8)]; - if (tap_length + 46 + 8 + ap_delay_clk >= sizeof(tdi_buffer) * 8 || + if (tap_length + 46 + 8 + ap_delay_clk >= swd_buffer_size * 8 || pending_scan_results_length == MAX_PENDING_SCAN_RESULTS) { /* Not enough room in the queue. Run the queue. */ queued_retval = jlink_swd_run_queue(); |