Hi, is there anyone good at openocd?
I have a Boundarydevices Sabrelite board(imx6q) and try to connect to the jtag port using a olimex arm-usb-ocd-h adapter and openocd 0.8.0.
While I first tried to connect it, it displayed errors:
sudo openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/imx6.cfg
Open On-Chip Debugger 0.8.0 (2014-06-24-14:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : imx6.sdma: nonstandard IR value
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: imx6.dap: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0 in JTAG-DP transaction
It turned out to be the adapter pin connection errors.
But after correcting that problem, another issue appeared:
sudo openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/imx6.cfg
Open On-Chip Debugger 0.8.0 (2014-06-24-12:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : imx6.sdma: nonstandard IR value
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: imx6.dap tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : TAP imx6.sdma does not have IDCODE
Info : JTAG tap: imx6.sjc tap/device found: 0x2191c01d (mfg: 0x00e, part: 0x191c, ver: 0x2)
Warn : Invalid ACK 0x7 in JTAG-DP transaction
and it still couldn't work properly.
I got some debug information like:
Info : 271 30 core.c:949 jtag_examine_chain_display(): JTAG tap: imx6.dap tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : 272 30 core.c:1067 jtag_examine_chain(): TAP imx6.sdma does not have IDCODE
Info : 273 30 core.c:949 jtag_examine_chain_display(): JTAG tap: imx6.sjc tap/device found: 0x2191c01d (mfg: 0x00e, part: 0x191c, ver: 0x2)
Debug: 274 30 core.c:1206 jtag_validate_ircapture(): IR capture validation scan
Debug: 275 30 core.c:1263 jtag_validate_ircapture(): imx6.dap: IR capture 0x01
Debug: 276 30 core.c:1263 jtag_validate_ircapture(): imx6.sdma: IR capture 0x00
Debug: 277 30 core.c:1263 jtag_validate_ircapture(): imx6.sjc: IR capture 0x01
Debug: 278 30 openocd.c:145 handle_init_command(): Examining targets...
Debug: 279 30 target.c:1401 target_call_event_callbacks(): target event 21 (examine-start)
Debug: 280 30 arm_adi_v5.c:827 ahbap_debugport_init():
Warn : 281 30 adi_v5_jtag.c:252 jtagdp_transaction_endcheck(): Invalid ACK 0x7 in JTAG-DP transaction
Debug: 282 30 openocd.c:147 handle_init_command(): target examination failed
Debug: 283 30 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash init
Debug: 284 30 command.c:145 script_debug(): command - ocd_flash ocd_flash init
Debug: 286 30 tcl.c:870 handle_flash_init_command(): Initializing flash devices...
Debug: 287 30 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_mflash init
Debug: 288 30 command.c:145 script_debug(): command - ocd_mflash ocd_mflash init
Debug: 290 30 mflash.c:1379 handle_mflash_init_command(): Initializing mflash devices...
Debug: 291 30 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_nand init
Debug: 292 30 command.c:145 script_debug(): command - ocd_nand ocd_nand init
Debug: 294 30 tcl.c:497 handle_nand_init_command(): Initializing NAND devices...
Debug: 295 30 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_pld init
Debug: 296 30 command.c:145 script_debug(): command - ocd_pld ocd_pld init
Debug: 298 30 pld.c:207 handle_pld_init_command(): Initializing PLDs...
Does anyone have ideas how to deal with that? Thanks for any suggestions.
Solved! Go to Solution.
Thanks ichipexpert,
This problem is solved, it turned out to be some pin compatible problem, our JTAG port is different from the standard one.
After some modification, it can work well now
Hi H. Wei,
I am getting first issue like you have, i.e.:
....
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: imx6.dap: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0 in JTAG-DP transaction
May I know which adapter pin did you connect to correct those errors?
I have connected J4 (pin 3 of the 20-pin port to pin 9 of the 10-pin port) but I am still having an issue.
Hi Yuldi,
Here is the BoundaryDevice 10-20 pins schematic:
http://boundarydevices.com/wp-content/uploads/2012/09/jtag_adaptor_imx6.pdf
Here is the Olimex 10-20 pins schematic:
https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/resources/ARM-JTAG-20-10-schematic.pdf
So I just check the BoundaryDevice schematic and modify the Olimex connector.
I'm not sure if we use the same board, but I wish it could help you.
Hi Wei,
I am already using JTAG Adapter from boundary device, to connect to the olimex (http://boundarydevices.com/products/imx6x_jtag/).
Based on the olimex schematic on https://www.olimex.com/Products/ARM/JTAG/_resources/ARM-USB-OCD.pdf and the boundary device schematic,
I put jumpers on J3, J4, and J6 on that adapter to connect VREF, TRST, and TRTCK (MOD) pins respectively but I am still getting the same issue.
If it isn't so much trouble could you tell me which pin did you correct on your Olimex connector?
Hi Yuldi,
There is some difference in our situation, I use an olimex 10-20 adapter instead of the boundary device one.
And when I use another one, it works normally.Maybe it's just a cable or adapter problem.
Hi Wei,
Which other connector works, can you please clarify? Are you saying that another olimex 10-20 adapter works without any modification?
Hi Yuldi,
I think a generic 10-20 adapter should work, but I'm not sure.
What I use now is another product- "MDL-ADA2 - 10-pin to 20-pin JTAG Adapter Module".
My colleague told me maybe there was some problem with my olimex 10-20 adapter cable.
Hi Wei,
Ok, let me try with MDL-ADA2 with my Olimex ARM-USB-OCD-H.
Also, do I need to change my kernel to enable JTAG debugging?
Hi Yuldi,
No, you needn't. JTAG communicates directly with cpu, so you don't need a system, neither u-boot nor kernel.
All you need is just openocd, unless you want to debug some program, then you'll need debug tools.
Hi H Wei,
suggest to check that jtag_mod=0 and
check signals by oscilloscope.
Also please check next link below
SparkFun Electronics • View topic - OpenOCD on Freescale i.MX6
JTAG-BusBlaster - Wandboard Wiki
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks ichipexpert,
This problem is solved, it turned out to be some pin compatible problem, our JTAG port is different from the standard one.
After some modification, it can work well now