TruePERSPECTIVES_logo.png

Is SEGGER J-Link the best debugger probe for ARM Cortex debugging?

Posted by Magnus Unemyr on Apr 10, 2015 1:37:00 PM

SEGGER J-Link’s are probably the most widely used line of debugger probes available today, at least within the world of ARM, and in particular for ARM Cortex-M devices like STM32 or Kinetis. SEGGER claims to have shipped over 250.000 JTAG probes over the years. I cannot verify if this is true or not, but most professional engineering teams I have met doing STM32 development are using the SEGGER J-Link for example, and so I see no reason to question that figure.

I have even heard the J-Link name been used synonymous to a debugger probe in general (from any vendor) multiple times. As such, SEGGER has almost succeeded in getting the J-Link name being the industry standard reference, much like Google have managed to get its company name being equal to do an internet search in general (“to google something”). So what about these SEGGER debugger probes anyway?

segger_atollic

On the top level, a SEGGER J-Link debugger probe connect to the PC-based C/C++ compiler and debugger IDE using USB or Ethernet on one end, and to the ARM Cortex processor device using a JTAG cable on the other end. This is no different compared to any other JTAG or debugger probe on the market. The difference perhaps is more on the quality and capability side of things.

SEGGER has a rock-solid quality reputation, and their debugger probes offer very fast download speeds (model dependent). They also have very nice capabilities:

  • Very high download speeds
  • Connect to the PC using a USB cable locally, or using an Ethernet cable or even Wi Fi bridge for remote access
  • Download into RAM or Flash
  • Unlimited number of flash breakpoints (not all models)
  • Support for Serial Wire Viewer (SWV) real-time event and data tracing using the SWO pin in SWD debugger mode
  • The J-Trace model also supports instruction tracing using ETM/ETB to record execution history for later analysis.
  • Support for JTAG daisy-chain and multi-core debugging
  • Real-time terminal (RTT) bidirectional I/O interface for printf/scanf redirection

SEGGER currently ship a number of different J-Link debugger probe models, with various price points and capabilities:

  • J-Link PLUS is a USB powered JTAG emulator that can communicate at high speed with the supported target CPUs. It connects via USB to the PC.
  • J-Link PRO is a refined higher-performance version of the J-Link PLUS. It has an Ethernet interface in addition to the USB interface, and offers much higher download speeds.  It connects via Ethernet or USB to the PC.
  • J-Link ULTRA+ is based on the regular J-Link, but it offers much higher download speed as well as target power measurement capabilities.  It connects via USB to the PC.
  • J-Link BASE is a USB powered JTAG emulator that can communicate at high speed with the supported target CPUs. It does not offer unlimited flash breakpoints. It connects via USB to the PC.
  • J-Link EDU is a low-cost J-Link for educational purpose. J-Link EDU is identical to J-Link BASE and offers the same functionality. It has been designed to allow students and educational facilities as well as hobbyists access to top of the line debug probe technology. It has legal and support limitations. It connects via USB to the PC.
  • J-Trace Cortex-M is a JTAG emulator with ETM instruction trace support for Cortex-M cores. It connects via USB to the PC.
  • J-Trace ARM is a JTAG emulator with ETM instruction trace support for classic ARM7 and ARM9 devices. It connects via USB to the PC.

In addition to offering downloading of the application into the target RAM or Flash, basic debugging using run-stop-singlestep is supported too of course.

In SWD mode on Cortex-M devices like STM32 or Kinetis, the SEGGER J-Link probes also support real-time event- and data tracing using the Serial Wire Viewer (SWV, SWO, ITM and SWD) technologies. The built-in support for SWV event- and data tracing enables compiler and debugger IDE’s like Atollic TrueSTUDIO to offer the following advanced debugger capabilities:

  • Single-channel and multi-channel printf() redirection to a debugger console
  • Software instrumented tracing
  • Real-time variable watch
  • Graphical oscilloscope-styled variable value chart plots
  • Memory and variable access history log
  • Performance analysis using statistical profiling
  • Execution time measurement
  • Interrupt and exception event logging
  • Interrupt and exception statistics
  • Interrupt and exception nesting analysis
  • General event logging

And so, Cortex-M developers really ought to look into using SWV tracing as it provides a rich and powerful debug experience, where advanced compiler and debugger IDE’s like Atollic TrueSTUDIO can provide real-time graphs and charts:

swv

Read our SWV event and data tracing whitepaper!

 

The Atollic TrueSTUDIO IDE adds a Cortex-M hard fault crash analyzer as well, telling you why the software brought the CPU to a hard fault condition, what C/assembler line made it happen, and under what circumstances. Hard faults can easily occur for example by division by zero, illegal memory access due to pointer errors, etc. The Atollic TrueSTUDIO hard fault crash analyzer works with all SEGGER J-Link models.

crash_analyzer

Read our hard fault crash analysis whitepaper

 

Furthermore, advanced debuggers lite Atollic TrueSTUDIO can use the ETM/ETB instruction trace recording capabilities of the SEGGER J-Trace debugger probes; thus recording execution history for later analysis.

etm

Read our ETM/ETB instruction tracing whitepaper!

 

And finally, SEGGER have integrated its RealTimeTerminal (RTT) solution, enabling printf/scanf styled bidirectional I/O redirection from the target application to a debugger terminal console view, using the SEGGER J-Link as its communication interface. This is fully supported by Atollic TrueSTUDIO too, with its integrated terminal view for RTT I/O:

rtt

While there are many good debugger probes available on the market, I think it is safe to say that the SEGGER J-Link models are a very good choice, in particular if you look for a high-quality product with fast download speeds and state of the art capabilities.

Read this white paper if you want to learn more on ARM Cortex development and debugging:

Read our ARM development whitepaper!

 

Topics: ARM Cortex, Debugging, Atollic TrueSTUDIO, SEGGER J-Link