[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openocd-development
Subject:    Re: [OpenOCD-devel] bugged transport_select() ?
From:       Phillip Pearson <pp () myelin ! nz>
Date:       2016-03-04 1:59:46
Message-ID: CA+xj3pf70TPGv0R1sELNxAvbsBQg-2tPgDqRoHWB4OwV8HL3Vg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Yes, JTAG isn't implemented for CMSIS-DAP interfaces.  I've been working on
implementing this recently, although it isn't ready yet.

Cheers,
Phil

On Thu, Mar 3, 2016 at 2:58 PM, Michał Byrecki <
michal.byrecki@techniline.com> wrote:

> Howdy,
> I am a bit curious, if the code is still being developed. Last package is
> dated on summer :-)
>
> I've been doing some workaround to interface Atmel Ice to at91sam9263
> controller via openocd. This costs me lots of digging via source codes and
> the internet.
>
> First of all: Atmel Ice has to be defined as: cmsis-dap. That was the easy
> part. OpenOCD finds it correctly.
> Now the hard part: I am trying to interface that to a board with
> controller. I even took the logic analyzer to find out "WTF?".
> OpenOCD continuously exits with -4 error:
>
> Info : 52 9 cmsis_dap_usb.c:587 cmsis_dap_get_version_info(): CMSIS-DAP:
> FW Version = 01.1C.0067
> Debug: 53 10 cmsis_dap_usb.c:797 cmsis_dap_init(): CMSIS-DAP: Packet Size
> = 512
> Debug: 54 10 cmsis_dap_usb.c:808 cmsis_dap_init(): CMSIS-DAP: Packet Count
> = 4
> Info : 55 11 cmsis_dap_usb.c:628 cmsis_dap_get_status(): SWCLK/TCK = 1
> SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
> Debug: 56 14 cmsis_dap_usb.c:638 cmsis_dap_reset_link(): CMSIS-DAP:
> cmsis_dap_reset_link
> Info : 57 14 cmsis_dap_usb.c:639 cmsis_dap_reset_link(): DAP_SWJ Sequence
> (reset: 50+ '1' followed by 0)
> Debug: 58 21 cmsis_dap_usb.c:709 cmsis_dap_reset_link(): Result 0x00 0x07
> Debug: 59 21 cmsis_dap_usb.c:711 cmsis_dap_reset_link(): DAP Reset Target
> Debug: 60 22 cmsis_dap_usb.c:715 cmsis_dap_reset_link(): Result 0x00 0x00
> Debug: 61 22 cmsis_dap_usb.c:717 cmsis_dap_reset_link(): DAP Write Abort
> Debug: 62 23 cmsis_dap_usb.c:726 cmsis_dap_reset_link(): Result 0x00
> Debug: 63 23 command.c:628 run_command(): Command failed with error code -4
> User : 64 23 command.c:666 command_run_line(): in procedure 'init'
>
> I have traced all the signal lines from a controller to the JTAG plug -
> wiring is fine. As an act of desperation i've tried to check my hardware
> setup with Keil - and amazingly it seems OK. AT91SAM is being detected!
> Moreover, I got a completely different traces on a logic analyzer - TMS &
> TDO started flipping. By the way - above listing is inacurate - nTRST isn't
> LO (always HI).
>
> Now, the thing is, that Atmel-ICE provides two interfaces of "swd" and
> "jtag" in a combo box. Thing that has to be done is a transport selection -
> and according to a manual... is not according to the software code and
> reality. While I am trying to select a transport by:
> openocd -f interface/cmsis-dap.cfg -d -c "transport select jtag" -f
> target/at91sam9263.cfg
> ... openocd shows me a mid finger with:
> Debug: 39 7 cmsis_dap_usb.c:179 cmsis_dap_usb_open(): Cannot read product
> string of device 0x4d9:0x1133
> Info : 40 9 cmsis_dap_usb.c:607 cmsis_dap_get_caps_info(): CMSIS-DAP: SWD
> Supported
> Info : 41 9 cmsis_dap_usb.c:609 cmsis_dap_get_caps_info(): CMSIS-DAP: JTAG
> Supported
> Info : 42 9 cmsis_dap_usb.c:884 cmsis_dap_swd_init(): CMSIS-DAP: Interface
> Initialised (SWD)
> Debug: 43 9 command.c:145 script_debug(): command - ocd_command
> ocd_command type ocd_transport select jtag
> Debug: 44 9 command.c:145 script_debug(): command - ocd_transport
> ocd_transport select jtag
> *Error: 45 9 transport.c:290 jim_transport_select(): session's transport
> is already selected.*
> User : 46 10 command.c:666 command_run_line(): Runtime Error:
> embedded:startup.tcl:20:
> in procedure 'transport'
> in procedure 'ocd_bouncer'
> at file "embedded:startup.tcl", line 20
>
> ...it's been late night and I am way too tired to find out - but are You
> aware of that? So - shall i continue RTFM or the driver is incomplete? I.e.
> it provides only "swd" interface while "jtag" is uncoded yet or is it just
> a buggy procedure of transport_select()?
>
> Cheers, Mike
>
>
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> OpenOCD-devel mailing list
> OpenOCD-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openocd-devel
>
>

[Attachment #5 (text/html)]

<div dir="ltr">Yes, JTAG isn&#39;t implemented for CMSIS-DAP interfaces.   I&#39;ve \
been working on implementing this recently, although it isn&#39;t ready \
yet.<div><br></div><div>Cheers,</div><div>Phil</div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 3, 2016 at 2:58 PM, \
Michał Byrecki <span dir="ltr">&lt;<a href="mailto:michal.byrecki@techniline.com" \
target="_blank">michal.byrecki@techniline.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><u></u>


  
  

<div>
Howdy,<br>
I am a bit curious, if the code is still being developed. Last package is dated on \
summer :-)<br> <br>
I&#39;ve been doing some workaround to interface Atmel Ice to at91sam9263 controller \
via openocd. This costs me lots of digging via source codes and the internet.<br> \
<br> First of all: Atmel Ice has to be defined as: cmsis-dap. That was the easy part. \
OpenOCD finds it correctly.<br> Now the hard part: I am trying to interface that to a \
board with controller. I even took the logic analyzer to find out \
&quot;WTF?&quot;.<br> OpenOCD continuously exits with -4 error:<br>
<br>
<tt>Info : 52 9 cmsis_dap_usb.c:587 cmsis_dap_get_version_info(): CMSIS-DAP: FW \
Version = 01.1C.0067</tt><br> <tt>Debug: 53 10 cmsis_dap_usb.c:797 cmsis_dap_init(): \
CMSIS-DAP: Packet Size = 512</tt><br> <tt>Debug: 54 10 cmsis_dap_usb.c:808 \
cmsis_dap_init(): CMSIS-DAP: Packet Count = 4</tt><br> <tt>Info : 55 11 \
cmsis_dap_usb.c:628 cmsis_dap_get_status(): SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = \
1 nTRST = 0 nRESET = 1</tt><br> <tt>Debug: 56 14 cmsis_dap_usb.c:638 \
cmsis_dap_reset_link(): CMSIS-DAP: cmsis_dap_reset_link</tt><br> <tt>Info : 57 14 \
cmsis_dap_usb.c:639 cmsis_dap_reset_link(): DAP_SWJ Sequence (reset: 50+ &#39;1&#39; \
followed by 0)</tt><br> <tt>Debug: 58 21 cmsis_dap_usb.c:709 cmsis_dap_reset_link(): \
Result 0x00 0x07</tt><br> <tt>Debug: 59 21 cmsis_dap_usb.c:711 \
cmsis_dap_reset_link(): DAP Reset Target</tt><br> <tt>Debug: 60 22 \
cmsis_dap_usb.c:715 cmsis_dap_reset_link(): Result 0x00 0x00</tt><br> <tt>Debug: 61 \
22 cmsis_dap_usb.c:717 cmsis_dap_reset_link(): DAP Write Abort</tt><br> <tt>Debug: 62 \
23 cmsis_dap_usb.c:726 cmsis_dap_reset_link(): Result 0x00</tt><br> <tt>Debug: 63 23 \
command.c:628 run_command(): Command failed with error code -4</tt><br> <tt>User : 64 \
23 command.c:666 command_run_line(): in procedure &#39;init&#39;</tt><br> <br>
 I have traced all the signal lines from a controller to the JTAG plug - wiring is \
fine. As an act of desperation i&#39;ve tried to check my hardware setup with Keil - \
and amazingly it seems OK. AT91SAM is being detected! Moreover, I got a completely \
different traces on a logic analyzer - TMS &amp; TDO started flipping. By the way - \
above listing is inacurate - nTRST isn&#39;t LO (always HI).<br> <br>
Now, the thing is, that Atmel-ICE provides two interfaces of &quot;swd&quot; and \
&quot;jtag&quot; in a combo box. Thing that has to be done is a transport selection - \
and according to a manual... is not according to the software code and reality. While \
I am trying to select a transport by:<br> <tt>openocd -f interface/cmsis-dap.cfg -d \
                -c &quot;transport select jtag&quot; -f \
                target/at91sam9263.cfg</tt><br>
... openocd shows me a mid finger with:<br>
<tt>Debug: 39 7 cmsis_dap_usb.c:179 cmsis_dap_usb_open(): Cannot read product string \
of device 0x4d9:0x1133</tt><br> <tt>Info : 40 9 cmsis_dap_usb.c:607 \
cmsis_dap_get_caps_info(): CMSIS-DAP: SWD   Supported</tt><br> <tt>Info : 41 9 \
cmsis_dap_usb.c:609 cmsis_dap_get_caps_info(): CMSIS-DAP: JTAG Supported</tt><br> \
<tt>Info : 42 9 cmsis_dap_usb.c:884 cmsis_dap_swd_init(): CMSIS-DAP: Interface \
Initialised (SWD)</tt><br> <tt>Debug: 43 9 command.c:145 script_debug(): command - \
ocd_command ocd_command type ocd_transport select jtag</tt><br> <tt>Debug: 44 9 \
command.c:145 script_debug(): command - ocd_transport ocd_transport select \
jtag</tt><br> <tt><u><b>Error: 45 9 transport.c:290 jim_transport_select(): \
session&#39;s transport is already selected.</b></u></tt><br> <tt>User : 46 10 \
command.c:666 command_run_line(): Runtime Error: embedded:startup.tcl:20: </tt><br> \
<tt>in procedure &#39;transport&#39; </tt><br> <tt>in procedure &#39;ocd_bouncer&#39; \
</tt><br> <tt>at file &quot;embedded:startup.tcl&quot;, line 20</tt><br>
<br>
...it&#39;s been late night and I am way too tired to find out - but are You aware of \
that? So - shall i continue RTFM or the driver is incomplete? I.e. it provides only \
&quot;swd&quot; interface while &quot;jtag&quot; is uncoded yet or is it just a buggy \
procedure of transport_select()?<br> <br>
Cheers, Mike<br>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody><tr>
<td>
<pre>
</pre>
<br>
<br>
</td>
</tr>
</tbody></table>
</div>

<br>------------------------------------------------------------------------------<br>
 Site24x7 APM Insight: Get Deep Visibility into Application Performance<br>
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month<br>
Monitor end-to-end web transactions and take corrective actions now<br>
Troubleshoot faster and improve end-user experience. Signup Now!<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=272487151&amp;iu=/4140" \
rel="noreferrer" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=272487151&amp;iu=/4140</a><br>_______________________________________________<br>
 OpenOCD-devel mailing list<br>
<a href="mailto:OpenOCD-devel@lists.sourceforge.net">OpenOCD-devel@lists.sourceforge.net</a><br>
 <a href="https://lists.sourceforge.net/lists/listinfo/openocd-devel" \
rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/openocd-devel</a><br>
 <br></blockquote></div><br></div>



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic