From: OpenOCD-Gerrit <ope...@us...> - 2020-06-06 17:04:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via ffc1ca4b91757911c53d5dc86cae55eb00d858d5 (commit) from 2d3bbcd56656b5f2a708541d42c6c85371323730 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ffc1ca4b91757911c53d5dc86cae55eb00d858d5 Author: Antonio Borneo <bor...@gm...> Date: Fri May 29 10:42:43 2020 +0200 nor/kinetis: add keep-alive during flash write Flashing Kinetis MCU MK22FX512VLH12 takes longer than one second, thus gdb connection can timeout. Before commit 7f260f5009a7 ("helper/command: Handle Tcl return values consistently") the openocd timeout warning was masked by a bug in gdb_put_packet() that resets the timeout counter if any message is logged out. The commit above removes one log message and the timeout warning is now triggered. While the bug in gdb_put_packet() is still to be fixed, the reason of the timeout is the lack of keep_alive() calls in kinetis flash driver. Add keep_alive() call at every iteration in function kinetis_write_sections(), that is reported as core write function in chunks of 1024 bytes in the log from the reporter. Add also a keep_alive() call at every iteration in function kinetis_write_inner(). This part is not present in the log but, by code analysis, it represents another critical loop. Change-Id: I38e631b36c7eb2f1e21cef68710ce47c03d3edda Signed-off-by: Antonio Borneo <bor...@gm...> Reported-by: Jonatan Hatakeyama Zeidler <jon...@me...> Reviewed-on: http://openocd.zylin.com/5703 Tested-by: jenkins Reviewed-by: <jon...@gm...> diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index bceaf8474..084e009ee 100644 --- a/src/flash/nor/kinetis.c +++ b/src/flash/nor/kinetis.c @@ -1793,6 +1793,8 @@ static int kinetis_write_sections(struct flash_bank *bank, const uint8_t *buffer buffer += size; offset += size; count -= size; + + keep_alive(); } free(buffer_aligned); @@ -1885,6 +1887,8 @@ static int kinetis_write_inner(struct flash_bank *bank, const uint8_t *buffer, buffer += 4; offset += 4; words_remaining--; + + keep_alive(); } } free(new_buffer); ----------------------------------------------------------------------- Summary of changes: src/flash/nor/kinetis.c | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- Main OpenOCD repository |