I can't really confirm if these are the only things that need fixing. I only 
have a certain number of cases I can check. (I didn't even know there was a 
second instance of "jtag configure.")

So far that one command was the only one that went wrong for me. The failures I 
ran into were:

1) A Xilinx ZCU102 board, using its on-board Digilent (FTDI) debugger.
2) The aformentioned Freescale/NXP Sabre SD board with Olimex ARM debugger 
(also FTDI)

All I can say is it seems reasonable that those two cases should be changed 
based, on their usage in existing scripts.  (I'm not exactly an expert with the 
scripting language; sometimes I customize existing ones but that's it.)

Note that you may be able to sanity check many opf the other scripts without 
needing actual hardware because the error is thrown before OpenOCD actually 
tries to connect to the debugger/target.

I specifically avoided submitting a patch because, as I said, what I did was 
just a workaround to get myself going again. I just wanted to call attention to 
the problem so that the appropriate maintainers could fix it right the first 
time.

-Bill


---

** [tickets:#225] Error: The 'jtag configure' command must be used after 
'init'.**

**Status:** new
**Milestone:** 0.9.0
**Created:** Wed Feb 06, 2019 08:19 PM UTC by Bill Paul
**Last Updated:** Wed Feb 06, 2019 11:02 PM UTC
**Owner:** nobody


Checking out the most recent sources from git, many configuration scripts which 
used to work now yield the following error instead:

openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/imx6.cfg
Open On-Chip Debugger 0.10.0+dev-00677-gdeaf3d26-dirty (2019-02-06-11:35)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 
'transport select <transport>'.
Warn : imx6.sdma: nonstandard IR value
Error: The 'jtag configure' command must be used after 'init'.

openocd -f board/avnet_ultrazed-eg.cfg
Open On-Chip Debugger 0.10.0+dev-00677-gdeaf3d26-dirty (2019-02-06-11:35)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
none separate
none separate
adapter speed: 1000 kHz
Error: The 'jtag configure' command must be used after 'init'.

This appears to have been caused by the commit:

https://repo.or.cz/openocd.git/commit/877cec20dca6e78f9f029f0f173879cda101a6c2

I'm not sure what the correct fix would be. This does not happen with every 
script. (It seemed to work ok with board/nordic_nrf52_dk.cfg). I don't know if 
the scripts need to be updated or if the code does.

I worked around it my modifying src/jtag/tcl.c to change the mode for the jtag 
configure command to COMMAND_ANY (currently it's COMMAND_EXEC):

openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/imx6.cfg
Open On-Chip Debugger 0.10.0+dev-00677-gdeaf3d26-dirty (2019-02-06-12:14)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 
'transport select <transport>'.
Warn : imx6.sdma: nonstandard IR value
adapter speed: 1000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : JTAG tap: imx6.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), 
part: 0xba00, ver: 0x4)
Info : TAP imx6.sdma does not have IDCODE
Info : JTAG tap: imx6.sjc tap/device found: 0x2191c01d (mfg: 0x00e (Freescale 
(Motorola)), part: 0x191c, ver: 0x2)
Info : imx6.cpu.0: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections

My host environment is FreeBSD/amd64 11.1-RELEASE, however I observed the same 
problem building on an Ubuntu Linux host (16.04). The above test case is with a 
Freescale/NXP Sabre SD i.MX6Q target.

(Apologies if this has already been noticed and is being discussed elsewhere.)



---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to