diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-09 16:12:44 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-09 16:12:44 +0000 |
commit | c497006430ed270e047bf2e911165f7c826600ed (patch) | |
tree | b11313cc58b5d6f69c76c809408d21d73ab56e3d | |
parent | fbdc87effc21f72f5519a53e34ebeadb06e4bb33 (diff) | |
download | openocd_libswd-c497006430ed270e047bf2e911165f7c826600ed.tar.gz openocd_libswd-c497006430ed270e047bf2e911165f7c826600ed.tar.bz2 openocd_libswd-c497006430ed270e047bf2e911165f7c826600ed.tar.xz openocd_libswd-c497006430ed270e047bf2e911165f7c826600ed.zip |
abort writing algorithm to target upon failure
git-svn-id: svn://svn.berlios.de/openocd/trunk@1037 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/target/arm7_9_common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 2ae04070..cd4eba1a 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2280,7 +2280,12 @@ int arm7_9_checksum_memory(struct target_s *target, u32 address, u32 count, u32* /* convert flash writing code into a buffer in target endianness */ for (i = 0; i < (sizeof(arm7_9_crc_code)/sizeof(u32)); i++) - target_write_u32(target, crc_algorithm->address + i*sizeof(u32), arm7_9_crc_code[i]); + { + if ((retval=target_write_u32(target, crc_algorithm->address + i*sizeof(u32), arm7_9_crc_code[i]))!=ERROR_OK) + { + return retval; + } + } armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC; armv4_5_info.core_mode = ARMV4_5_MODE_SVC; |