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
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to