int retval = ERROR_OK;
int blocksize;
- int bytesread;
+ int wordsread;
uint32_t param_in[2];
- bytesread = 0;
+ wordsread = 0;
while (count > 0) {
blocksize = count;
param_in[1] = blocksize;
retval = mips32_pracc_exec(ejtag_info, ARRAY_SIZE(code), code,
- ARRAY_SIZE(param_in), param_in, blocksize, &buf[bytesread], 1);
+ ARRAY_SIZE(param_in), param_in, blocksize, &buf[wordsread], 1);
if (retval != ERROR_OK)
return retval;
count -= blocksize;
- addr += blocksize;
- bytesread += blocksize;
+ addr += blocksize*sizeof(uint32_t);
+ wordsread += blocksize;
}
return retval;