Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Paul Fertser
Hi,

Please, refrain from top-posting.

On Tue, Sep 10, 2013 at 03:44:41PM +0200, Nicolas Produit wrote:
> Error: tdo check error at line 76
> Error: read = 0x2F9FF, want = 0x3, mask = 0x3

This means the device answered something that it's not expected to. I
guess that if it went so far, it would suggest the svf player itself
works.

I'd try to lower the speed (by editing the svf file itself) and to
make sure the electrical connection is good, sometimes adding another
ground line helps too.

> I have no idea what irlen, ircapture and irmask mean but I got from

irlen is "JTAG Instruction register length" and it should be specified
in the official documentation in the clear (or in the BSDL
file). However, I'd expect autoprobing to determine it properly in
this case.

-- 
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Nicolas Produit
Hi,
thanks a lot!!!
with this patch opencd don't crash anymore on this.
And I confirm it eat happily window created files with \r\n
But I still cannot recycle my window machine...
I am now able to run raspberry native (after finding configure needs a
--enable-bcm2835gpio)
But unfortunatley now I get a
SIR 8 TDI(89);
SDR 26 TDI(0904920);
Error: tdo check error at line 76
Error: read = 0x2F9FF, want = 0x3, mask = 0x3
Error: fail to run command at line 1639
Error: tdo check error at line 76
Error: read = 0x2F9FF, want = 0x3, mask = 0x3

I have no idea what it means.

This is my fe.cfg file I use now for my target:
adapter_khz 3000
#
# aglp
#
if { [info exists CHIPNAME] } {
   set _CHIPNAME $CHIPNAME
} else {
   set _CHIPNAME aglp
}

if { [info exists FPGA_TAPID] } {
   set _FPGA_TAPID $FPGA_TAPID
} else {
   set _FPGA_TAPID 0x1ba141cf
}
jtag newtap $_CHIPNAME.fpga tap -irlen 2 -ircapture 0x01 -irmask 0x3
-expected-id $_FPGA_TAPID

I have no idea what irlen, ircapture and irmask mean but I got from
the scan_chain. I got id from scan_chain too.
The svf file contains those comments:
!#VENDORMicrosemi Corporation;
!#IDCODE03A141CF;
!#IDMASK06FF;
and if I do 06FF & 0x1ba141cf I do get 2A141CF
as well as  03A141CF & 0x1ba141cf give also 2A141CF
so perhaps things make sense (but I am just guessing there).

I try to read Actel Igloo documentation looking for irlen, tapid...

Cheers



On 09/10/2013 01:55 PM, Paul Fertser wrote:
> On Tue, Sep 10, 2013 at 01:51:14PM +0200, Nicolas Produit wrote:
>> I checked that file do contain \r\n.
>> File was created on windows...
>> Perhaps mailer attachment changed that?
> 
> I have a feeling that it's your MUA :) Anyway, the parser handles \r
> just fine, I've checked it already. Please try the patch I posted to
> Gerrit.
> 

-- 
Nicolas Produit
ISDC, Data Centre for Astrophysics   Phone:+41 22 379 2140
16, Chemin d'Ecogia  Fax:  +41 22 379 2133
CH-1290 Versoix  www:  http://isdc.unige.ch/~produit

--
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Paul Fertser
On Tue, Sep 10, 2013 at 01:51:14PM +0200, Nicolas Produit wrote:
> I checked that file do contain \r\n.
> File was created on windows...
> Perhaps mailer attachment changed that?

I have a feeling that it's your MUA :) Anyway, the parser handles \r
just fine, I've checked it already. Please try the patch I posted to
Gerrit.

-- 
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Nicolas Produit
Hi,

I checked that file do contain \r\n.
File was created on windows...
if I do a od -c I get:
000   !   #   A   C   T   I   O   N   V   E   R   I
020   F   Y   _   A   R   R   A   Y   ;  \r  \n   !   #   P   R   O
Perhaps mailer attachment changed that?

Cheers


On 09/10/2013 12:44 PM, Paul Fertser wrote:
> Hi,
> 
> On Tue, Sep 10, 2013 at 06:40:33PM +0800, 徐光晓 wrote:
>> 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).
> 
> The file in question has no 0x0d's, only 0x0a's, so that's probably
> unrelated. Thanks for the report though. I'm not sure if anyone would
> be willing to investigate this any time soon, unfortunately, but I'll
> try to check \r\n line endings with the svf player if I have time.
> 

-- 
Nicolas Produit
ISDC, Data Centre for Astrophysics   Phone:+41 22 379 2140
16, Chemin d'Ecogia  Fax:  +41 22 379 2133
CH-1290 Versoix  www:  http://isdc.unige.ch/~produit

--
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Paul Fertser
On Tue, Sep 10, 2013 at 06:40:33PM +0800, 徐光晓 wrote:
> 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.

Imagine the current position is 0. We're going to write the character
itself, an (optional) space and then there should be one byte left for
the terminating null. So we need 3 bytes, exactly as the comment
says. So realloc should get 3 (0 + 3), not 2. Please add your comments 
to the related Gerrit change I've posted.

-- 
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Paul Fertser
On Tue, Sep 10, 2013 at 06:40:33PM +0800, 徐光晓 wrote:
> 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.

I think this shows some decent info:

valgrind ./src/openocd -c \
 "interface dummy; adapter_khz 1000; gdb_port 4445; \
 telnet_port 4446; tcl_port 4447; init; svf \
 /home/paul/tmp/FRONTEND_MODULE_180_VERIFY_ARRAY.svf"

...
ENDDR DRPAUSE;
==13939== Invalid write of size 1
==13939==at 0x80C439D: handle_svf_command (svf.c:668)
==13939==by 0x80BBE79: script_command_run (command.c:616)
...
SIR 8 TDI(0F);
==13939== Invalid read of size 1
==13939==at 0x402BA53: strlen (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==13939==by 0x80C22A7: svf_run_command (svf.c:900)
==13939==by 0x80C4428: handle_svf_command (svf.c:483)
==13939==by 0x80BBE79: script_command_run (command.c:616)

And once the TDO checks are commented out, it's possible to run the
whole SVF through it.

-- 
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Peter Stuge
Hello,

徐光晓 wrote:
> 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.

It sounds likely to me.


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

You are just as much in charge of this module as others. :)

Please do check that your fix is correct, and then submit a patch
through gerrit as described in the HACKING file in the source tree.

Many thanks!


//Peter

--
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Paul Fertser
Hi,

On Tue, Sep 10, 2013 at 06:40:33PM +0800, 徐光晓 wrote:
> 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).

The file in question has no 0x0d's, only 0x0a's, so that's probably
unrelated. Thanks for the report though. I'm not sure if anyone would
be willing to investigate this any time soon, unfortunately, but I'll
try to check \r\n line endings with the svf player if I have time.

-- 
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread ??????
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";;
Date:  Tue, Sep 10, 2013 06:15 PM
To:  "Nicolas Produit"; 
Cc:  "openocd-devel"; 
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=5127&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=5127&iu=/4140/ostg.clktrk___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Paul Fertser
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Nicolas Produit
Hi,

thanks a lot. Very fast reaction on this list! The openocd web site
suggest forum for bug report...

I attach here start of the svf file (if mail attachment work on this
mailing list...)

Native raspberry driver? How do I do that? another -f interface?
By the way there is a typo in the SysfsGPIO message:

sudo openocd -f interface/sysfsgpio-raspberrypi.cfg
Open On-Chip Debugger 0.8.0-dev-00131-gf4943ac (2013-09-03-16:56)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
SysfsGPIO nums: tck = 11, tms = 25, tdi = 10, tdi = 9
SysfsGPIO num: trst = 7

Should read:
SysfsGPIO nums: tck = 11, tms = 25, tdi = 10, tdo = 9
SysfsGPIO num: trst = 7

Then it continue like that (see that message that I get from openocd for
some reason is not the full contains of svf file at the crash place)
Info : SysfsGPIO JTAG bitbang driver
Info : This adapter doesn't support configurable speed
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id
0x1ba141cf ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Warn : gdb services need one or more targets defined
Info : accepting 'telnet' connection from 
   TapName Enabled  IdCode Expected   IrLen IrCap IrMask
-- ---  -- -- - - --
 0 auto0.tap  Y 0x1ba141cf 0x1ba141cf 2 0x01  0x03
open("180_svf/FRONTEND_MODULE_180_VERIFY.svf"): No such file or directory
svf svf [-tap device.tap]  [quiet] [nil] [progress]
xsvf (tapname|'plain') filename ['virt2'] ['quiet']
in procedure 'svf'
svf processing file: "FRONTEND_MODULE_180_VERIFY.svf"
FREQUENCY 4E6 HZ;
Error: Translation from khz to jtag_speed not implemented
in procedure 'adapter_khz'
STATE RESET;
RUNTEST IDLE 5 TCK;
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(0F);
SDR 32 TDI();
STATE IDLE;
RUNTEST IDLE 1 TCK;
SDR 32 TDI() TDO(03A141CF) MASK(06FF);
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(7F);
STATE IDLE;
RUNTEST IDLE 3 TCK;
STATE IDLE;
RUNTEST IDLE 50E-6 SEC;
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(01);
924924924924924924924924924924924);
*** glibc detected *** openocd: malloc(): memory corruption: 0x00521808 ***





On 09/10/2013 11:39 AM, Paul Fertser wrote:
> Hi,
> 
> On Tue, Sep 10, 2013 at 11:11:43AM +0200, Nicolas Produit wrote:
>> this is my first mail to this list so sorry if I do something wrong.
>> I posted a bug report on sparkfun openocd forum but did not get a lot of
>> answers there...
>> https://forum.sparkfun.com/viewtopic.php?f=18&t=36484&e=0
> 
> Heh, I personally wouldn't read any webforums looking for OpenOCD
> bugs, same about some of the developers, this place is the right
> medium to discuss issues.
> 
> Please send at least the beginning of your SVF file to the list for
> investigation in a way that wouldn't mangle it anyhow.
> 
> I'm almost sure we'll make it work rather soon and you'll get rid of
> that windows machine :)
> 
> Also, using native raspberrypi driver should allow for considerably
> faster flashing than the sysfs driver.
> 

-- 
Nicolas Produit
ISDC, Data Centre for Astrophysics   Phone:+41 22 379 2140
16, Chemin d'Ecogia  Fax:  +41 22 379 2133
CH-1290 Versoix  www:  http://isdc.unige.ch/~produit
!#ACTIONVERIFY_ARRAY;
!#PROCEDUREVERIFY_IDCODE
!#PROC_PRELOAD
!#PROC_ENABLE
!#DO_VERIFY_EOL
!#DO_VERIFY_RLOCK
!#DO_EXIT;
!#SVF_PATH
C:\Users\polar\flash\fe\FRONTEND_MODULE_180_svf\FRONTEND_MODULE_180_VERIFY_ARRAY.svf;
!#Programming ModeSingle;
!#CREATORFlashPro Version: v11.1 SP1;
!#CAPTURE11.1.1.101;
!#DEVICEAGL250V2;
!#PACKAGEAGL250V2-cs196;
!#DATE2013/09/06;
!#TIME14:19:17;
!#STAPL_VERSIONJESD71;
!#VENDORMicrosemi Corporation;
!#IDCODE03A141CF;
!#IDMASK06FF;
!#DESIGNFRONTEND_MODULE;
!#DESIGN_DIRECTORY
/home/pol/polar_svn/firmware/obox/frontend_alb/firmware/designer/impl1/;
!#CHECKSUM4568;
!#SECURITYDisable;
!#ALG_VERSION20;
!#MAP_VERSION1;
!#TOOL_VERSION1;
!#MAX_FREQ1000;
!#SILSIG;
!#SPEED_GRADSTD;
!#TEMP_GRADIND;
!#PLAYER_VERSION_VARIABLEPLAYERVERSIONVARIABLE;
!#PLAYER_VERSION_SW_VARIABLEPLAYERVERSIONSWVARIABLE;
FREQUENCY 4E6 HZ;
STATE RESET;
RUNTEST IDLE 5 TCK;
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(0F);
SDR 32 TDI();
STATE IDLE;
RUNTEST IDLE 1 TCK;
SDR 32 TDI() TDO(03A141CF) MASK(06FF);
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(7F);
STATE IDLE;
RUNTEST IDLE 3 TCK;
STATE IDLE;
RUNTEST IDLE 50E-6 SEC;
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(01);
SDR 708 TDI(92492492492492492492492492492492492492492492492492492492492492492492
4924924924924924924924924924924924924924924924924924924924924924924924924924
92492492492

Re: [OpenOCD-devel] bug in svf

2013-09-10 Thread Paul Fertser
Hi,

On Tue, Sep 10, 2013 at 11:11:43AM +0200, Nicolas Produit wrote:
> this is my first mail to this list so sorry if I do something wrong.
> I posted a bug report on sparkfun openocd forum but did not get a lot of
> answers there...
> https://forum.sparkfun.com/viewtopic.php?f=18&t=36484&e=0

Heh, I personally wouldn't read any webforums looking for OpenOCD
bugs, same about some of the developers, this place is the right
medium to discuss issues.

Please send at least the beginning of your SVF file to the list for
investigation in a way that wouldn't mangle it anyhow.

I'm almost sure we'll make it work rather soon and you'll get rid of
that windows machine :)

Also, using native raspberrypi driver should allow for considerably
faster flashing than the sysfs driver.

-- 
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[OpenOCD-devel] bug in svf

2013-09-10 Thread Nicolas Produit
Hi,
this is my first mail to this list so sorry if I do something wrong.
I posted a bug report on sparkfun openocd forum but did not get a lot of
answers there...
https://forum.sparkfun.com/viewtopic.php?f=18&t=36484&e=0
I think it is a clear memory corruption problem in openocd.
I find reallocate calls only in the parser of the SVF file
so probably it is a feature of my svf file that was not foreseen.
I can help debugging but I need some help and advise. There is a little
bit of too many new things at the same time (debugginig on a raspberry,
openocd itself, I have zero knowledge of svf language)
What I do on the raspberry is:
sudo openocd -f interface/sysfsgpio-raspberrypi.cfg
then from another terminal on the raspberry:
telnet localhost 
scan_chain
svf 
I don't know how to declare my target (igloo fpga) but it seems to me
that an atomatic tap is found by scan_chain.
I attach here the start of the svf file that create the crash (my mailer
is rewrapping the lines, in fact this can be a problem for this bug):
!#ACTIONVERIFY_ARRAY;
!#PROCEDUREVERIFY_IDCODE
!#PROC_PRELOAD
!#PROC_ENABLE
!#DO_VERIFY_EOL
!#DO_VERIFY_RLOCK
!#DO_EXIT;
!#SVF_PATH
C:\Users\polar\flash\fe\FRONTEND_MODULE_180_svf\FRONTEND_MODULE_180_VERIFY_ARRAY.svf;
!#Programming ModeSingle;
!#CREATORFlashPro Version: v11.1 SP1;
!#CAPTURE11.1.1.101;
!#DEVICEAGL250V2;
!#PACKAGEAGL250V2-cs196;
!#DATE2013/09/06;
!#TIME14:19:17;
!#STAPL_VERSIONJESD71;
!#VENDORMicrosemi Corporation;
!#IDCODE03A141CF;
!#IDMASK06FF;
!#DESIGNFRONTEND_MODULE;
!#DESIGN_DIRECTORY
/home/pol/polar_svn/firmware/obox/frontend_alb/firmware/designer/impl1/;
!#CHECKSUM4568;
!#SECURITYDisable;
!#ALG_VERSION20;
!#MAP_VERSION1;
!#TOOL_VERSION1;
!#MAX_FREQ1000;
!#SILSIG;
!#SPEED_GRADSTD;
!#TEMP_GRADIND;
!#PLAYER_VERSION_VARIABLEPLAYERVERSIONVARIABLE;
!#PLAYER_VERSION_SW_VARIABLEPLAYERVERSIONSWVARIABLE;
FREQUENCY 4E6 HZ;
STATE RESET;
RUNTEST IDLE 5 TCK;
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(0F);
SDR 32 TDI();
STATE IDLE;
RUNTEST IDLE 1 TCK;
SDR 32 TDI() TDO(03A141CF) MASK(06FF);
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(7F);
STATE IDLE;
RUNTEST IDLE 3 TCK;
STATE IDLE;
RUNTEST IDLE 50E-6 SEC;
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(01);
SDR 708
TDI(92492492492492492492492492492492492492492492492492492492492492492492

4924924924924924924924924924924924924924924924924924924924924924924924924924
924924924924924924924924924924924);
STATE IDLE;
RUNTEST IDLE 1 TCK;
ENDIR IRPAUSE;
ENDDR DRPAUSE;
SIR 8 TDI(C0);
...

Crash is at SDR 708 TDI(92...
line
In fact mailer rewrapped those lines.
The left of those lines look like that on my screen:
SDR 708 TDI(9249
492492492492
924924924924
STATE IDLE;
RUNTEST IDLE 1 TCK;


Thanks

-- 
Nicolas Produit
ISDC, Data Centre for Astrophysics   Phone:+41 22 379 2140
16, Chemin d'Ecogia  Fax:  +41 22 379 2133
CH-1290 Versoix  www:  http://isdc.unige.ch/~produit

--
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=5127&iu=/4140/ostg.clktrk
___
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel