-2
\$\begingroup\$

I have a chip I am trying to use JTAG communications with using openOCD. However, I get the following error.

openocd -f ocd.cfg 
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Info : TAP auto0.tap does not have IDCODE
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000"
Error: auto0.tap: IR capture error; saw 0x0002 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined

I suspect this is due to a poor connection somewhere, but I don't know which lead to suspect. How should I go about debugging this issue?

To be clear I am asking this from the perspective of OpenOCD software, not my hardware: Why does it expect 0x0001? Can I configure it to expect 0x0002?

Why is it giving up after these two errors?

For the record I am using this config:

source [find interface/buspirate.cfg]


buspirate_vreg 0
buspirate_mode open-drain
buspirate_pullup 1

buspirate_port /dev/tty.usbserial-A90809RC

As my chip is not includes in the /boards directory, I could include a board from there using the source directive.

\$\endgroup\$

closed as unclear what you're asking by Chris Stratton, StainlessSteelRat, RoyC, Lior Bilia, Blup1980 Mar 12 at 13:22

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ This question is for all practical purposes unanswerable. As a situation where a whole lot of things would need to be exactly right, at minimum you would need to state the target chip, show the contents of the config file, show a schematic of the board, show the physical wiring of the JTAG connection, and explain your basis for believing that this overall solution would be workable. \$\endgroup\$ – Chris Stratton Mar 11 at 2:28
  • \$\begingroup\$ I narrowed the scope of the question to the openocd software, and understanding the error. For the record, I'm not using a device config file because my device is doesn't have a standard config file for OpenOCD. I also don't have a schematic anyway. I just want to understand what the error is trying to suggest. \$\endgroup\$ – baordog Mar 11 at 2:33
  • \$\begingroup\$ I didn't give it a chip specific config file, i.e the one from boards directory. I'll add the very bare bones one I am using, but I don't see how that will help. It is literally just a guess, as OpenOCD doesn't natively support my board, or anything like it from the manufacturer. That's why I am trying to interpret the error code. \$\endgroup\$ – baordog Mar 11 at 2:45
  • \$\begingroup\$ The error code means that your setup is all wrong Until you are forthcoming on basics like what you are trying to interact with and how exactly you have connected to it, you are unlikely to get anywhere here. \$\endgroup\$ – Chris Stratton Mar 11 at 2:45
  • 1
    \$\begingroup\$ @w5vo the issue is that the asker is concealing the necessary information. Stack exchange is open by design, entirely secret projects need secret resources instead. OpenOCD can't be used until the target is identified, so it's a problem of clues to that identity. They can use a lower level jtag tool to identify the register length, but they won't get anywhere with openocd until they match the mystery target trait by trait to a documented one. For all they are unwilling to say it could be an FPGA not an SoC. Physical aspects and board flash need to be investigated too. \$\endgroup\$ – Chris Stratton Mar 11 at 20:00
1
\$\begingroup\$

Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000"
Error: auto0.tap: IR capture error; saw 0x0002 not 0x0001
Warn : Bypassing JTAG setup events due to errors

The most likely cause of this message sequence is that your debug adapter is failing to communicate with your target. This may be because:

  • Your JTAG connections are incorrect

  • The target is not responding to JTAG commands

  • Your debug adapter does not support the voltage levels used by your target device

  • Your debug adapter is running at a speed the target device does not support

The Bus Pirate is not a very good debug adapter. I'd strongly suggest using something else -- something based on the FT232H or FT2232H is a fair bet.

\$\endgroup\$
0
\$\begingroup\$

The actual information is in this message

"Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!"

Translation: You did not specify what you have connected to the JTAG chain, which OpenOCD requires to know in order to work properly.

Your chip should have an available .cfg file in the target subdirectory, and your script should look like this for an LPC1768 chip as an example:

source [find interface/buspirate.cfg]

# change the following line for your chip
source [find target/lpc17xx.cfg]

buspirate_vreg 0
buspirate_mode open-drain
buspirate_pullup 1

buspirate_port /dev/tty.usbserial-A90809RC

In case there is nothing matching in the target subdir, your chip might not be supported by OpenOCD at this time.

\$\endgroup\$
  • 1
    \$\begingroup\$ The problem right now is that the asker doesn't know what chip they are talking to, so they can't yet use its config file. And they're unwilling to share any details that would let anyone else help them deduce what it is. \$\endgroup\$ – Chris Stratton Mar 11 at 20:09
  • \$\begingroup\$ That said, playing with openocd against some other known target and taking time to understand the applicable config files would be a good education in necessary background. \$\endgroup\$ – Chris Stratton Mar 11 at 20:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.