aboutsummaryrefslogtreecommitdiff
path: root/src/target/mips32.c
diff options
context:
space:
mode:
authorSalvador <sarroyofdez@yahoo.es>2012-04-02 16:48:52 +0200
committerSpencer Oliver <spen@spen-soft.co.uk>2012-04-10 12:09:55 +0000
commit18e6e02cdc5dce3c0741a294680a85ca70c10267 (patch)
treee38a241ce802d66f6ec4bbecbfa6be7bb82f4e77 /src/target/mips32.c
parenta6cf60c9c2387ca9f6c5a916ebf3d164554a7165 (diff)
downloadriscv-openocd-18e6e02cdc5dce3c0741a294680a85ca70c10267.zip
riscv-openocd-18e6e02cdc5dce3c0741a294680a85ca70c10267.tar.gz
riscv-openocd-18e6e02cdc5dce3c0741a294680a85ca70c10267.tar.bz2
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 <sarroyofdez@yahoo.es> Reviewed-on: http://openocd.zylin.com/549 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/target/mips32.c')
-rw-r--r--src/target/mips32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/mips32.c b/src/target/mips32.c
index 5682e3f..ab39e6e 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(&reg_params[0]);
destroy_reg_param(&reg_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(&reg_params[0]);
destroy_reg_param(&reg_params[1]);
destroy_reg_param(&reg_params[2]);
target_free_working_area(target, erase_check_algorithm);
- return 0;
+ return retval;
}
*blank = buf_get_u32(reg_params[2].value, 0, 32);