Hi Oyvind, Please see the patch below. Please update the parameter num_param_in of mips32_pracc_exec while removing dynamic arrays. Thanks.
- Jerry --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -618,11 +618,11 @@ int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int c param_in[1] = addr + count * sizeof(uint32_t); //last address memcpy(¶m_in[2], buf, count * sizeof(uint32_t)); mips32_pracc_exec(ejtag_info, sizeof(code)/sizeof(code[0]), code, \ - sizeof(param_in)/sizeof(param_in[0]),param_in, 0, NULL, 1); + count + 2, param_in, 0, NULL, 1); free(param_in); return ERROR_OK; } @@ -713,11 +713,11 @@ int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int c { param_in[i + 2] = buf[i]; } mips32_pracc_exec(ejtag_info, sizeof(code)/sizeof(code[0]), code, \ - sizeof(param_in)/sizeof(param_in[0]), param_in, 0, NULL, 1); + count + 2, param_in, 0, NULL, 1); free(param_in); return ERROR_OK; } @@ -776,11 +776,11 @@ int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int co { param_in[i + 2] = buf[i]; } retval = mips32_pracc_exec(ejtag_info, sizeof(code)/sizeof(code[0]), code, \ - sizeof(param_in)/sizeof(param_in[0]), param_in, 0, NULL, 1); + count + 2, param_in, 0, NULL, 1); free(param_in); return retval; } -- This message has been scanned for viruses and dangerous content by Draytek E-mail System, and is believed to be clean. _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development