Hi guys,

It seemed that I've been in this bug before. 

The reason cause this bug I guess is from the new line characters are much 
different between linux (\n) and windows(\r\n). When you generate your svf file 
in windows, the new line is one more character than linux. This cause the 
OpenOCD code in srv/svf/svf.c line 646 (for 0.6.1 and 0.7.0 version) realloc 
size too small. When you change this line from:

                    svf_command_buffer = realloc(svf_command_buffer, (cmd_pos + 
2));

to:

                    svf_command_buffer = realloc(svf_command_buffer, (cmd_pos + 
3));

you will not get this crash again.

I did not post a bug report, because I did not check the real reason of this 
bug. The new line character reason is only from my suspection.


Please somebody in charge of this module consider about this modification and 
update it in new version. Thank you.


------------------ Original ------------------
From:  "Paul Fertser";<fercer...@gmail.com>;
Date:  Tue, Sep 10, 2013 06:15 PM
To:  "Nicolas Produit"<nicolas.prod...@unige.ch>; 
Cc:  "openocd-devel"<openocd-devel@lists.sourceforge.net>; 
Subject:  Re: [OpenOCD-devel] bug in svf



Hi,

On Tue, Sep 10, 2013 at 12:06:45PM +0200, Nicolas Produit wrote:
> thanks a lot. Very fast reaction on this list! The openocd web site
> suggest forum for bug report...

I hope one of the devs will fix it soon, thanks for reporting.

> Native raspberry driver? How do I do that? another -f interface?

Yes, -f interface/raspberrypi-native.cfg

> By the way there is a typo in the SysfsGPIO message:
...
> SysfsGPIO nums: tck = 11, tms = 25, tdi = 10, tdi = 9
...
> SysfsGPIO nums: tck = 11, tms = 25, tdi = 10, tdo = 9

Right, needs to be fixed.
 
> FREQUENCY 4E6 HZ;
> Error: Translation from khz to jtag_speed not implemented
> in procedure 'adapter_khz'

That's probably the first error that prevents everything else from
working. You can try deleting this line from your SVF altogether. Or
use the native raspberrypi driver that supports speed setting.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel
.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to