This is an automated email from Gerrit. Antonio Borneo ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4829
-- gerrit commit 9378d943ffacb754ee6c9f8b2ed73e760ec2b00b Author: Antonio Borneo <[email protected]> Date: Mon Jun 4 18:08:38 2018 +0200 target/arm_adi_v5: avoid gdb timeout during buffer r/w For big buffers and slow interface we can easily get gdb to timeout. Add keep_alive() in both mem_ap_read() and mem_ap_write() to inform gdb we are still alive. Change-Id: Ib5fe94e12b154812358c73dacbe2a960d9d2f635 Signed-off-by: Antonio Borneo <[email protected]> diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 03e642b..56832d7 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -331,6 +331,7 @@ static int mem_ap_write(struct adiv5_ap *ap, const uint8_t *buffer, uint32_t siz const uint32_t csw_addrincr = addrinc ? CSW_ADDRINC_SINGLE : CSW_ADDRINC_OFF; uint32_t csw_size; uint32_t addr_xor; + uint32_t j = 0; int retval = ERROR_OK; /* TI BE-32 Quirks mode: @@ -424,6 +425,9 @@ static int mem_ap_write(struct adiv5_ap *ap, const uint8_t *buffer, uint32_t siz mem_ap_update_tar_cache(ap); if (addrinc) address += this_size; + + if ((j++ % 32) == 0) + keep_alive(); } /* REVISIT: Might want to have a queued version of this function that does not run. */ @@ -461,6 +465,7 @@ static int mem_ap_read(struct adiv5_ap *ap, uint8_t *buffer, uint32_t size, uint const uint32_t csw_addrincr = addrinc ? CSW_ADDRINC_SINGLE : CSW_ADDRINC_OFF; uint32_t csw_size; uint32_t address = adr; + uint32_t j = 0; int retval = ERROR_OK; /* TI BE-32 Quirks mode: @@ -523,6 +528,9 @@ static int mem_ap_read(struct adiv5_ap *ap, uint8_t *buffer, uint32_t size, uint address += this_size; mem_ap_update_tar_cache(ap); + + if ((j++ % 32) == 0) + keep_alive(); } if (retval == ERROR_OK) -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
