Merge pull request #8 from aibara/master

One-liner fix for black magic firmware issue corrupting un-aligned memory reads from target.
This commit is contained in:
Gareth McMullin 2013-01-10 16:45:34 -08:00
commit a84052915f
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ ap_mem_read_bytes(struct target_s *target, uint8_t *dest, uint32_t src, int len)
ADIV5_AP_DRW, 0);
while(--len) {
tmp = adiv5_dp_low_access(ap->dp, 1, 1, ADIV5_AP_DRW, 0);
*dest++ = (tmp >> ((src++ & 0x3) << 3) & 0xFF);
*dest++ = (tmp >> ((src & 0x3) << 3) & 0xFF);
src++;
/* Check for 10 bit address overflow */