arm: Mis-aligned data issue fix. 96/996/5
authorJason Moehlman <jmoehlma@linux-software.com>
Mon, 19 Nov 2012 23:33:34 +0000 (18:33 -0500)
committerØyvind Harboe <oyvindharboe@gmail.com>
Fri, 30 Nov 2012 11:02:05 +0000 (11:02 +0000)
Fixes issue with big endian hosts and mis-aligned data on some hosts.
Fixes unaligned access exception on hosts that do not support unaligned
access when debugging some arm targets.

Signed-off-by: Jason Moehlman <jmoehlma@linux-software.com>
Change-Id: I6bc6fb1b3c3565b256674b9ef43ed2afd14f5178
Reviewed-on: http://openocd.zylin.com/996
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
src/target/arm_adi_v5.c

index 65d29f0c2dc121444adea4ba6ab1500667608957..a0fd4cb4a620b148c440040016e4a70a669e714d 100644 (file)
@@ -307,8 +307,9 @@ int mem_ap_write_buf_u32(struct adiv5_dap *dap, const uint8_t *buffer, int count
                        return retval;
 
                for (writecount = 0; writecount < blocksize; writecount++) {
-                       retval = dap_queue_ap_write(dap, AP_REG_DRW,
-                               *(uint32_t *) ((void *) (buffer + 4 * writecount)));
+                       uint32_t tmp;
+                       tmp = buf_get_u32(buffer + 4 * writecount, 0, 32);
+                       retval = dap_queue_ap_write(dap, AP_REG_DRW, tmp);
                        if (retval != ERROR_OK)
                                break;
                }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)