]> git.sur5r.net Git - openocd/commitdiff
abort writing algorithm to target upon failure
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 9 Oct 2008 16:12:44 +0000 (16:12 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 9 Oct 2008 16:12:44 +0000 (16:12 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1037 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/arm7_9_common.c

index 2ae04070f73bb918f14a41ebcd7b667f97d144cd..cd4eba1ad8a1c1a45205a28dd34807a57c279a40 100644 (file)
@@ -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;