openocd/src/jtag
Bohdan Tymkiv 090209275b jlink: fix device discovery when network is off
If user specifies a serial number for the jlink device, openocd
extends the search to network jlink devices too, without checking
if the host has a valid and functional network connection. If the
network is not functional, libjaylink returns error. This error
invalidates the discovery on USB, even if it was successful.

Factor-out parts of the jlink_init into separate jlink_open_device
function, use that function to firstly discover and match USB
devices and, if matching device was not found on the USB bus and
serial number was specified, repeat discovery and matching via TCP.

Fixes: https://sourceforge.net/p/openocd/tickets/294/

Change-Id: Iea0de1640d4e5b21ecc7e9c1dd6d36f214d647c2
Signed-off-by: Bohdan Tymkiv <bohdan200@gmail.com>
Reviewed-on: http://openocd.zylin.com/6025
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
2021-01-24 19:32:09 +00:00
..
aice jtag: declare local symbols as static 2020-11-04 17:39:22 +00:00
drivers jlink: fix device discovery when network is off 2021-01-24 19:32:09 +00:00
hla hla: API: specify that read_reg/write_reg use regsel as parameter 2020-11-15 21:07:14 +00:00
minidriver Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
minidummy coding style: prototype of functions with no parameters 2020-05-09 14:39:59 +01:00
zy1000 coding style: add arguments to function prototypes 2020-07-08 22:08:19 +01:00
Makefile.am swim: abstract the transport in stm8 target 2020-05-24 21:29:42 +01:00
adapter.c jtag: adapter: rework adapter related commands 2020-01-29 05:33:39 +00:00
commands.c Fix debug prints when loading to flash 2020-09-05 16:48:08 +01:00
commands.h jtag: make cmd_queue_scan_field_clone public 2018-10-16 11:58:17 +01:00
core.c build: fix build with --enable-minidriver-dummy 2020-11-07 20:53:39 +00:00
driver.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
interface.c coding style: prototype of functions with no parameters 2020-05-09 14:39:59 +01:00
interface.h jtag: fix minor typos 2020-07-26 20:14:37 +01:00
interfaces.c Add CMSIS-DAP v2 support 2020-11-15 21:36:56 +00:00
interfaces.h jtag: remove unused function adapter_driver_modules_load() 2020-05-02 15:41:21 +01:00
jtag.h jtag: fix minor typos 2020-07-26 20:14:37 +01:00
minidriver.h jtag: fix minor typos 2020-07-26 20:14:37 +01:00
startup.tcl hla_transport: split command registration per transport 2020-09-05 17:10:38 +01:00
swd.h swd: get rid of jtag queue to assert/deassert srst 2020-01-14 11:15:12 +00:00
swim.c swim: add new transport 2020-05-24 21:32:05 +01:00
swim.h swim: fix adapter speed handling 2020-05-24 21:31:21 +01:00
tcl.c jtag/tcl: fix memory leak in error return 2020-11-04 17:35:25 +00:00
tcl.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00