Picoprobe: Using the Raspberry Pi Pico as Debug Probe

In Getting Started: Raspberry Pi Pico RP2040 with Eclipse and J-Link I used a SEGGER J-Link EDU for debugging: unfortunately, probably because of silicon shortage, these EDU probes are out of stock everywhere. Luckily, there is a solution: just use another Raspberry Pi Pico!

SWD Debugging with PicoProbe

This turns a $5 Raspberry Pi Pico board in to a very usable and versatile debug probe.

Continue reading

OpenOCD with MCU-Link

The NXP MCU-Link is a powerful $10 debug probe for ARM Cortex-M devices and works with the NXP LinkServer for debugging. The LinkServer does not an implement a gdb server, so it limits its usage e.g. for scripting or command line debugging. But as MCU-Link is also a CMSIS-DAP compatible debug probe, I can use it with OpenOCD which is open source and implements a GDB server. This article shows how I can use it with the MCU-Link.

Debugging FRDM-KL25Z with MCU-Link

Debugging FRDM-KL25Z with MCU-Link

Continue reading

JTAG Debugging the ESP32 with FT2232 and OpenOCD

In “Eclipse JTAG Debugging the ESP32 with a SEGGER J-Link”  I used a SEGGER J-Link to debug an ESP32 device with JTAG. I looked at using one of the FTDI FT2232HL development boards which are supported by OpenOCD. The FT2232HL is dual high-speed USB to UART/FIFO device, and similar FTDI devices are used on many boards as UART to USB converters. With OpenOCD these devices can be turned into inexpensive JTAG debug probes. This article shows how to use a $10 FTDI board as JTAG interface to program and debug the Espressif ESP32.

FTDI JTAG Connection

Continue reading

Eclipse JTAG Debugging the ESP32 with a SEGGER J-Link

When Espressif released in 2014 their first WiFi ESP8266 transceiver, they took over at least the hobby market with their inexpensive wireless devices. Yet again, the successor ESP32 device is used in many projects. Rightfully there are many other industrial Wi-Fi solutions, but Espressif opened up the door for Wi-Fi in many low cost projects. Many projects use the ESP devices in an Arduino environment which basically means decent debugging except using printf() style which is … hmmm … better than nothing.

What is maybe not known to many ESP32 users: there *is* actually a way to use JTAG with the ESP32 devices :-). It requires some extra tools and setup, but with I have a decent Eclipse based way to debug the code. And this is what this article is about: how to use a SEGGER J-Link with Eclipse and OpenOCD for JTAG debugging the ESP32.

Roboter with ESP32 and JTAG Debug Port

Robot with ESP32 and JTAG Debug Port

Continue reading

Running FreeRTOS on the VEGA RISC-V Board

In “Debugging the RV32M1-VEGA RISC-V with Eclipse and MCUXpresso IDE” I described how to build and debug applications for the VEGA RISC-V board. In this article I describe how to enable FreeRTOS for RISC-V, based on the latest FreeRTOS V10.2.0 release.

Blinky with FreeRTOS on the VEGA RISC-V Board

Blinky with FreeRTOS on the VEGA RISC-V Board

Continue reading

Open Source RISC – Eclipse with RISC-V on the SiFive HiFive1 Board

Open Source software has been around for decades. But open source on hardware especially microcontroller is not much a reality these days. But there is something which might change this: RISC-V is a free and open RISC instruction set architecture and for me it has the potential to replace some of the proprietary architectures currently used. RISC-V is not new, but it gets more and more traction in Academia (no surprise).

I wanted to play with RISC-V for over a year, but finally a week ago I did one of these “hey, let’s buy that board” thing again. Sometimes these boards get on a pile to wait a few weeks or longer to get used, but that one I had to try out immediately :-).

SiFive HiFive1 Board

SiFive HiFive1 Board

Continue reading

Troubleshooting Tips for FreeRTOS Thread Aware Debugging in Eclipse

FreeRTOS seems to get more and more popular, and I think as well because more and more debugger and Eclipse IDE vendors add dedicated debugging support for it.

FreeRTOS Threads in Eclipse

FreeRTOS Threads in Eclipse

Continue reading

Semihosting with Eclipse and the NXP Kinetis SDK V2.0

The world is changing, and the say is “change is good” :-). In the software and API world, change very often means that a change results into something broken. So I had battled with semihosting working on the NXP Kinetis parts, only to find out that it does not work any more with using the latest version 2.0. The semihosting output e.g. with P&E debug connection remains empty:

No Semihosting output

No Semihosting output

So how to fix this?

Continue reading

Solution for OpenOCD “Cannot communicate… target not haltet”

Related to my earlier article about using OpenOCD, I want to share something I have learned (again) with OpenOCD v0.10.0:

I was running often into the following error:

Warn : Cannot communicate... target not halted.
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected

OpenOCD cannot communicate

OpenOCD cannot communicate

Continue reading

FreeRTOS Thread Debugging with Eclipse and OpenOCD

FreeRTOS is probably the number one RTOS used, and Eclipse is likely the most popular IDE I can think of. But debugging FreeRTOS applications with Eclipse and GDB is somewhat limited? What I would like to get at the minimum is this: ability to see all the different threads in the Eclipse debug view like this:

FreeRTOS Threads in Eclipse with OpenOCD

FreeRTOS Threads in Eclipse with OpenOCD

As you might guess from that screenshot: this post is about how to make FreeRTOS tread debugging possible with Eclipse and GDB :-).

Continue reading