Hi @Tommy Murphy, Thank you for referencing me to Section 10.7 in the OpenOCD manual. I've observed the given example:
openocd.cfg file: source [ find interface/olimex-arm-usb-tiny-h.cfg ] reset_config trst_and_srst jtag_rclk 8 Because my chip connects through the STLink probe and uses SWD transport protocol (instead of JTAG), I made a few modifications to the example: openocd.cfg file: source [ find interface/stlink.cfg ] transport select hla_swd reset_config srst_only adapter_khz 480 I connect a NUCLEO_F303K8 board to my PC for this test. Then I issue the following command in my console: > openocd -s "C:\...\scripts" -f "C:\...\openocd.cfg" OpenOCD outputs the following and then terminates: Open On-Chip Debugger 0.10.0+dev-00921-gef8c69ff9 (2019-07-06-01:00) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html adapter speed: 480 kHz Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 480 kHz Error: BUG: current_target out of bounds So I end up with two questions concerning autoprobing. Q1: Unfortunately, In my example given above OpenOCD doesn't do any autoprobing as described in Section 10.7. Is this because OpenOCD doesn't support autoprobing with the SWD protocol? Or am I simply making a mistake in my .cfg file? Q2: I also noticed that the autoprobing example from Section 10.7 configures the reset behaviour of OpenOCD. Does this mean that autoprobing will always be "intrusive" in the sense that it resets the chip? Thank you very much for your help ^_^ Kind greetings, Kristof Mulier Van: "Tommy Murphy" <tommy_mur...@hotmail.com> Aan: "kristof mulier" <kristof.mul...@telenet.be>, "openocd-devel" <openocd-devel@lists.sourceforge.net> Verzonden: Maandag 8 juli 2019 20:38:54 Onderwerp: Re: How do I simply "ping" a chip with OpenOCD? Maybe look at section 10.7 Autoprobing of the openocd user's guide? ORIGINAL MESSAGE FROM KRISTOF: Dear OpenOCD developer, I would like to do something uncommon with OpenOCD. Instead of connecting to the chip, I'd like to merely detect the chip. The procedure I have in mind would look like this: 1. Start OpenOCD with the probe config file (eg. stlink.cfg ) given as -f parameter. So OpenOCD knows what probe to use, but doesn't know what chip it will find. 2. OpenOCD detects a chip and reports this somehow (eg. write something to stdout). If possible, this action should not be intrusive to the chip (like resetting it). 3. OpenOCD shuts down. Here are some more notes about the procedure: Note 1: It would be nice if OpenOCD doesn't reach the "server" state where I need to setup a Telnet or GDB client to interact with it. I'd be happy to get the chip detection reported in a more convenient way, like getting the chip info on the stdout channel. Note 2: The detection should be non-intrusive to the chip. However, if OpenOCD doesn't find anything, I'd like to have a backup method where OpenOCD tries to find a chip more aggressively (like holding down the nRST pin). I can invoke this other approach myself if needed (so there's no need for OpenOCD to do that automatically). Note 3: At first, I'll just apply this "chip detection" only on STM32 chips with an STLinkV2 or STLinkV3 probe, later on other probes and chips as well. Note 4: Some boards only have an SWD connection (no JTAG). Thank you very much :-) Kind greetings, Kristof Mulier PS: I only have basic user-knowledge about OpenOCD.
_______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel