Make sure checksum_memory is present. Otherwise it'll segfault.
Change-Id: If31123323bd8a03282da43505c9604fde735ad0e
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6758
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
LOG_ERROR("Target not examined yet");
return ERROR_FAIL;
}
+ if (!target->type->checksum_memory) {
+ LOG_ERROR("Target %s doesn't support checksum_memory", target_name(target));
+ return ERROR_FAIL;
+ }
retval = target->type->checksum_memory(target, address, size, &checksum);
if (retval != ERROR_OK) {