From: Salvador Date: Mon, 2 Apr 2012 14:48:52 +0000 (+0200) Subject: Minor bug fixes in Mips32 code X-Git-Tag: v0.6.0-rc1~157 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=18e6e02cdc5dce3c0741a294680a85ca70c10267;p=openocd Minor bug fixes in Mips32 code Now the the "Fast" version for memory blank check in pic32mx.c can be called: default_flash_blank_check() instead of the "fallback" default_flash_mem_blank_check(). The command "verify_image", without working area, now don't show: checksum mismatch - attempting binary compare when there are no real errors in flash. Change-Id: I256e8ae949289634e1de5c1c2861e4c4c4b7fdce Signed-off-by: Salvador Reviewed-on: http://openocd.zylin.com/549 Tested-by: jenkins Reviewed-by: Spencer Oliver --- diff --git a/src/target/mips32.c b/src/target/mips32.c index 5682e3f6..ab39e6e7 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -631,7 +631,7 @@ int mips32_checksum_memory(struct target *target, uint32_t address, destroy_reg_param(®_params[0]); destroy_reg_param(®_params[1]); target_free_working_area(target, crc_algorithm); - return 0; + return retval; } *checksum = buf_get_u32(reg_params[0].value, 0, 32); @@ -688,14 +688,14 @@ int mips32_blank_check_memory(struct target *target, retval = target_run_algorithm(target, 0, NULL, 3, reg_params, erase_check_algorithm->address, - erase_check_algorithm->address + (sizeof(erase_check_code)-2), + erase_check_algorithm->address + (sizeof(erase_check_code)-4), 10000, &mips32_info); if (retval != ERROR_OK) { destroy_reg_param(®_params[0]); destroy_reg_param(®_params[1]); destroy_reg_param(®_params[2]); target_free_working_area(target, erase_check_algorithm); - return 0; + return retval; } *blank = buf_get_u32(reg_params[2].value, 0, 32);