Hi Duane

I spent most time this week-end chasing my failing simple ir/dr scan problem
https://lists.berlios.de/pipermail/openocd-development/2009-March/004836.html
This message is only visible if you enable IO debugging.

It turns out that if you don't specify an endstate. you get the
following behviour
on reset the bypass field of the tap is set to 1
the irscan is performed and the end state is RESET
upon drscan the only available tap (the JCR)  is also in bypass.
It turns out the interface_jtag_add_dr_scan)(int num_fields,
scan_field_t *fields, tap_state_t state) method
defines the number of fields as being the number of given fields + the
number of bypassed taps in the chain.
and fails to detect that the given tap command is for the device in
bypass. anyway
(*last_cmd)->cmd.scan->num_fields = num_fields + bypass_devices;
becomes 2 and openocd crashes. simply specifing a endstate resolved the problem


Program received signal SIGSEGV, Segmentation fault.
0x0000000000452f25 in buf_set_buf (src=0xff000000ff <Address
0xff000000ff out of bounds>, src_start=<value optimized out>,
dst=0x2146830 "", dst_start=32, len=<value optimized out>) at
binarybuffer.c:153
153                     if (((src[src_idx/8] >> (src_idx % 8)) & 1) == 1)
(gdb) bt
#0  0x0000000000452f25 in buf_set_buf (src=0xff000000ff <Address
0xff000000ff out of bounds>, src_start=<value optimized out>,
dst=0x2146830 "", dst_start=32, len=<value optimized out>) at
binarybuffer.c:153
#1  0x000000000044b87e in jtag_build_buffer (cmd=0x216a328,
buffer=0x7fffb97fcfb0) at jtag.c:1254
#2  0x000000000045297e in ft2232_execute_queue () at ft2232.c:1449
#3  0x000000000044ab50 in interface_jtag_execute_queue () at jtag.c:1421
#4  0x000000000044aba9 in jtag_execute_queue () at jtag.c:1433
#5  0x000000000044c124 in Jim_Command_drscan (interp=0x2130040,
argc=4, args=<value optimized out>) at jtag.c:2827
#6  0x0000000000464712 in Jim_EvalObj (interp=0x2130040,
scriptObjPtr=0x2149a10) at jim.c:8698
#7  0x0000000000465782 in Jim_Eval_Named (interp=0x2130040,
script=<value optimized out>, filename=0x4aa29a "command.c",
lineno=456) at jim.c:8891
#8  0x0000000000454f8a in command_run_line (context=<value optimized
out>, line=0x215ae6c "drscan omap3530.jrc 32 0x0") at command.c:456
#9  0x0000000000470efc in telnet_input (connection=0x21594b0) at
telnet_server.c:343
#10 0x00000000004705d6 in server_loop (command_context=0x2130010) at
server.c:443
#11 0x0000000000402d4b in openocd_main (argc=1, argv=0x7fffb97fd948)
at openocd.c:274
#12 0x00007fc5b0c78466 in __libc_start_main () from /lib/libc.so.6
#13 0x00000000004029c9 in _start ()


Greetings

On Fri, Mar 6, 2009 at 6:01 PM, Duane Ellis <[email protected]> wrote:
> Dirk/Kees,
>
> On (3/2) I posted a patch that I believe adds the required functionality
> to openocd = specifically it adds an "endstate" option to the IRSCAN and
> DRSCAN commands.
>
> Specifically to address this comment by Dirk:
>
> Dirk Behme> In [1] Rick proposed
> Dirk Behme> "... that the C function for the irscan and drscan
> Dirk Behme> commands needs to look for another argument
> Dirk Behme> (namely the end state) and add a call to
> Dirk Behme> jtag_set_end_state.  This might also be
> Dirk Behme> handled already with a 'end_state' command. "
>
> I never heard or saw a reply about this post.   Perhaps my post got lost
> in the pile
>
> Is this what you are looking for?  If not - please let me know.
>
> -Duane.
>
> _______________________________________________
> Openocd-development mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/openocd-development
>
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to