OpenOCD

From SEGGER Wiki
Jump to: navigation, search

OpenOCD is a open and free project to support different debug probes under one "API".

Using J-Link with OpenOCD

In general, it is possible to use J-Link with OpenOCD. OpenOCD handles J-Link as a dumb JTAG/SWD/... probe and only uses the very low level logic to output JTAG/SWD/... sequences. It does not make use of any high level logic etc. and therefore is much slower than the proprietary SEGGER J-Link DLL / GDBServer / ... implementation.

Switching the USB driver to OpenOCD

In order to use J-Link with OpenOCD the standard J-Link USB driver must be replaced with the WinUSB driver, using 3rd party utilities. There are lots of walkthroughs available on the internet.

Note:
Current (since end 2022) models are already shipped by factory configured for WinUSB, so the reconfiguration should no longer be necessary. Some models slightly before that change are not configured for WinUSB by default but can be configured to it via J-Link Configurator

Restoring the USB driver

Once the J-Link USB driver has been replaced, no SEGGER software from the J-Link software package will be able to communicate with J-Link anymore.
To use SEGGER J-Link software again, the USB driver needs to be switched back to its default.
This can be achieved by

  • navigating to the J-Link software installation (by default C:\Program Files\SEGGER\JLink\)
  • navigating to the sub folder USBDriver\
  • Double clicking InstDrivers.exe

Limitations

There are several limitations that apply when using J-Link with OpenOCD instead of the SEGGER J-Link software:

  • Much slower than using J-Link with the SEGGER J-Link DLL
  • No RTT support
  • No HSS support
  • No unlimited flash breakpoints support
  • No support for any utilities from the SEGGER J-Link software package
  • No support from SEGGER

Support

Please understand that SEGGER does not provide any support for J-Links used with OpenOCD. The OpenOCD software is released and maintained by a 3rd party. In order to get support, we recommend to get in touch with the OpenOCD community.