J-Link EDU vs. OpenOCD
My experience with OpenOCD
J-Link EDU

(2) Intel Quartus Prime Lite
(3) Embedded Studio


The following components are used for smooth RISC-V development on a FPGA:

1. JTAG interface (J-Link EDU)
2. FPGA Design Software (Intel Quartus Prime Lite)
3. Software development environment (SEGGER Embedded Studio for RISC-V)

This is my development environment which I use for RISC-V development. There are certainly other products here that can be used for this.

The JTAG interface is used here in RISC-V development for later debugging of the software that runs on the RISC-V CPU. Here I describe why I use a J-Link EDU.

My experience with OpenOCD

J-Link and OpenOCD are both tools that are used for debugging the CPU of an embedded system. For this purpose the CPU has an integrated debug unit with which the connection is established by the debugger. A GDB Server and a Debug Probe are required for this connection. The tools required are linked here as follows:

Debugger <=> GDB Server <=> Debug Probe <=> CPU

The J-Link is here the debug probe for the connection to the CPU and the GDB Server is the connection between the debugger and the debug probe, here the J-Link.

Debugger <=> GDB Server <=> J-Link <=> CPU

OpenOCD is here the GDB Server which requires a debug probe to connect to the CPU:

Debugger <=> OpenOCD <=> Debug Probe <=> CPU

OpenOCD, the Open On-Chip Debugger has been created by Dominic Rath as part of a diploma thesis at the University of Applied Sciences, FH-Augsburg in 2005.

In 2005 there were no cheap solutions for the hobby sector available. That changed dramatically with OpenOCD. Here the GNU Project Debugger (GDB) was used with OpenOCD. And for the Debug Probe some cheap solutions was available. Mostly the chips from FTDI, FT2232, were used here:

GDB <=> OpenOCD <=> Debug Probe with FT2232 <=> CPU

Another big advantage of OpenOCD at that time was that OpenOCD was available under Linux, MacOS and Windows.

At that time, however, a simple solution for software development and debugging was still missing for Windows. The toolchain should have the following features:

  • Not based on Cygwin
  • Working with Eclipse
  • Cheap for beginners

There are some native Windows toolchains based on MinGW, but the GDB of these toolchains doesn't work properly under Eclipse. So it was required to create a new toolchain suited for this requirements. That was when I created YAGARTO (Yet Another GNU ARM toolchain) in 2006. And at the same time I started to create the OpenOCD Windows version here. The first OpenOCD version of mine was version r83.

At that time there was a solution with OpenOCD which was sometimes a bit tricky.

I think the last version of OpenOCD I made was in 2009. After that, because of a disagreement in the OpenOCD community.

I stopped providing OpenOCD and started using the J-Link. At some point there was also a low-cost J-Link available, the J-Link EDU. The J-Link EDU may only be used for non-commercial purpose. Which shouldn't be a problem for the hobbyists if they use it for non-commercial purpose.

There is also a short description for using the J-Link in my archive.

J-Link EDU

Compared to OpenOCD, working with the J-Link and the J-Link GDB server was a lot easier.

So I am surprised that OpenOCD is still used in many current non-commercial projects by hobbyists. If you look at the prices here, you have to pay around 40 euros for a Debug Probe like the ARM-USB-TINY-H and a J-Link EDU cost between 50 to 60 Euro.

The J-Link EDU is a bit more expensive in direct comparison, but in my experience it has the advantage that it works out of the box. SEGGER also offers a free version of Embedded Studio for non-commercial use.

And I believe that the combination of J-Link EDU with the Embedded Studio here for non-commercial use is a better solution than a comparable OpenOCD solution.

Of course there are also special cases where there is no other solution than OpenOCD, e.g. when using ESP32 chips from Espressif.

The J-Link EDU not only supports ARM but also RISC-V devices. And using the J-Link EDU with Embedded Studio for a RISC-V device will be my next tutorial.