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 <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6765
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
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);
}
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);
}