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>
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;
}