On Fri, Apr 1, 2011 at 1:23 PM, Drasko DRASKOVIC
<[email protected]> wrote:
>
> Hi Øyvind,
> just one quick question. In mips_m4k.c, in
> mips_m4k_bulk_write_memory() in the code like this :
>
> t = malloc(count * sizeof(uint32_t));
> if (t == NULL)
> {
> LOG_ERROR("Out of memory");
> return ERROR_FAIL;
> }
>
> uint32_t i, t32;
> for(i = 0; i < (count * 4); i += 4)
> {
> t32 = be_to_h_u32((uint8_t *) &buffer[i]);
> h_u32_to_le(&t[i], t32);
> }
>
> Who frees the t (malloc'ed mem) after ?
A bit further down:
if (t != NULL)
free(t);
> Otherwise, really good work. I merged the changes and it works. I have
> an impression there is performance benefit also - quicker image
> writing to the RAM.
Hmm... w.r.t. performance only drscan_8 comes to mind.
If you cleaned up the mips_ejtag_drscan_32 like I did for the
mips_ejtag_drscan_8 then that would probably help.
There are two things to do with mips_ejtag_drscan_32. Create
an _out version that returns void(only adds to the queue) and
does not read back and introduce error propagation for the
remainder of the cases.
--
Øyvind Harboe
Can Zylin Consulting help on your project?
US toll free 1-866-980-3434 / International +47 51 87 40 27
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development