From: OpenOCD-Gerrit <ope...@us...> - 2022-05-29 15:48:24
|
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 cc8b491856c9fee675732dc21a2307f5c9617f54 (commit) from bce93f6d513b373c1fbfb42a12cfeb2305d5e822 (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 cc8b491856c9fee675732dc21a2307f5c9617f54 Author: Tomas Vanek <va...@fb...> Date: Fri Nov 19 22:03:44 2021 +0100 flash/nor/core, target: don't ask for working mem if no target algo The command 'flash erase_check' showed the message 'Running slow fallback erase check - add working memory' even in the case the target didn't implement blank_check_memory. Change return code of target_blank_check_memory() in this case and sense it in default_flash_blank_check() and show a message without a request for working memory. Change-Id: I7cf9bf77742964b4f377c9ce48ca689e57d0882f Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/6765 Tested-by: jenkins Reviewed-by: Tim Newsome <ti...@si...> diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 30d387ae0..f4ff5dfb3 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -429,7 +429,11 @@ int default_flash_blank_check(struct flash_bank *bank) bank->sectors[i].is_erased = block_array[i].result; retval = ERROR_OK; } else { - LOG_USER("Running slow fallback erase check - add working memory"); + if (retval == ERROR_NOT_IMPLEMENTED) + LOG_USER("Running slow fallback erase check"); + else + LOG_USER("Running slow fallback erase check - add working memory"); + retval = default_flash_mem_blank_check(bank); } free(block_array); diff --git a/src/target/target.c b/src/target/target.c index 596364cdc..76327b1c7 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2590,7 +2590,7 @@ int target_blank_check_memory(struct target *target, } if (!target->type->blank_check_memory) - return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; + return ERROR_NOT_IMPLEMENTED; return target->type->blank_check_memory(target, blocks, num_blocks, erased_value); } ----------------------------------------------------------------------- Summary of changes: src/flash/nor/core.c | 6 +++++- src/target/target.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |