Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Øyvind Harboe
Hi Ali, the buffer size is only part of what ails the svf parser for Xilinx. Even increasing the buffer size can make it crash. If you'd like to have a look at the problem, you can try this: https://lists.berlios.de/pipermail/openocd-development/2011-February/018217.html -- Øyvind Harboe

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Ali Lown
Hmm, well I can report that that patch alone let me successfully program my FPGA. https://lists.berlios.de/pipermail/openocd-development/2011-February/018217.html I am unable to download the attachment here, tar reports it isn't an archive, so not sure what changes were made to try to emulate

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Ali Lown
Your svf file does fail with my patch. I had to increase it from 8x the normal buffer size to 32x the normal buffer size, before it stopped reporting buffer-to-small errors. Then I simply get the: Error: tdo check error at line 33 Error: read = 0x0, want = 0xF2618093, mask = 0xFFF Error: fail

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Øyvind Harboe
I tried this with a big enough buffer on a real device and it segfaulted. -- Ø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

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Øyvind Harboe
This is the crash I see: gdb --args openocd -c interface dummy -c init -c svf nil foo.svf ... Error: tdo check error at line 33 Error: read = 0x0, want = 0xF2618093, mask = 0xFFF Error: fail to run command at line 4799 Error: tdo check error at line 33 Error: read = 0x0, want = 0xF2618093,

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Ali Lown
Hmm, this looks like a case of WOMM, because given we are both testing against the same file (the one you attached), and are both using the git master, we should both/neither get this crash. Looks like one of the buffers is becoming corrupt somehow, yet they are all malloc'ing correctly. Given

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Andrew Leech
On Mon, Mar 28, 2011 at 8:28 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I tried this with a big enough buffer on a real device and it segfaulted. Wasn't most/all of the required code for dynamic buffer resizing already present in the code but commented out with #if 0 #else #end lines? It

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Øyvind Harboe
On Mon, Mar 28, 2011 at 12:14 AM, Andrew Leech coronasen...@gmail.com wrote: On Mon, Mar 28, 2011 at 8:28 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I tried this with a big enough buffer on a real device and it segfaulted. Wasn't most/all of the required code for dynamic buffer

Re: [Openocd-development] [Patch] increase buffer size for svf files

2011-03-27 Thread Øyvind Harboe
This is what valgrind reports: SIR 6 TDI (02) ; RUNTEST 10 TCK; Error: SVF: can not move to RUN/IDLE valgrind: m_mallocfree.c:225 (mk_plain_bszB): Assertion 'bszB != 0' failed. valgrind: This is probably caused by your program erroneously writing past the end of a heap block and corrupting heap

[Openocd-development] [Patch] increase buffer size for svf files

2011-03-25 Thread Ali Lown
Xilinx ISE 13.1 produces svf files for Spartan XC3S50AN that are too large for the buffer to hold - causing it to fail to program. Attached is a patch that simply increases the buffer size - I tried a variety of sized buffers - they had no effect on the speed of programming. -Ali buffer.patch