Debugging classic AVRs in the Arduino IDE 2 is finally possible! It took a while to implement this feature, but now it is just a piece of cake to enable debugging and start using the debugger.
Continue readingTag: debugWIRE

Debugging 2.0
The featured image of this blog post is based on vector graphics by captainvector at 123RF.
What keeps people from using a debugger? Well, it is mostly that one has initial costs in terms of setting up the debugging environment and of learning how to use the debugging tool. Hopefully, the next iteration of my hardware debugging tool dw-link, which is able to debug classic ATtinys and ATmegaX8s, will somewhat ease that burden, in particular, because you can buy the accompanying hardware now at Tindie.


Fixing Problems … Using Super-Global Variables
Another xkcd comic that hits the spot. Except, with my new hardware debugger, this is the past 😎. Recently, I debugged one of my electronic geocaching gadgets and was positively surprised how easy it was to figure out ones own mistakes and to come up with the right fix.
Continue reading
A debugWIRE Hardware Debugger for Less Than €10
The featured image of this post is based on a picture by Florian-if published on Wikipedia under CC-BY-SA-3.0
Is it possible to build a hardware debugger for debugWIRE for less than €10? As it turns out, it is. You just have to make a few compromises and also do a bit of soldering and gluing.
Continue reading
dw-probe: The Hardware for the Hardware Debugger
dw-link can turn your Arduino board into a hardware debugger, and dw-probe connects it to any target board.
Continue reading
That’s One Small Step for a Man, One Giant Leap for a Debugger: On Single-Stepping and Interrupts
The featured image of this post is by WikiImages on Pixabay
You want to make a single step in your program, but the debugger takes you to some unknown area of the program. This was, in fact, my first experience when I tried out Microchip’s MPLAB X IDE debugger on the innocent blinking sketch. Is this a bug or a feature?
Continue reading
dw-link: A New Hardware Debugger for ATtinys and Small ATmegas
As mentioned in an earlier blog post this year, hardware debuggers are the premier class of embedded debugging tools. However, until today, there were only very few relatively expensive tools around supporting the debugWIRE interface that is used by the classic ATtinys and a few ATmega MCUs.
The good news is that now you can turn an Arduino UNO, Nano, or Pro Mini into a debugWIRE hardware debugger that communicates with avr-gdb
, the AVR version of the GNU project debugger.

Surprise, Surprise!
The featured image of this post is by Albert Guillaume – Gils Blas, 24 décembre 1895, Public Domain, Link
When you develop a tool for a protocol that is undocumented, it is not surprising that you will encounter situations you will not have be anticipated. This was exactly what I experienced developing the hardware debugger dw-link, which connects debugWIRE MCUs to the GDB debugger. Although a substantial part of the debugWIRE protocol has been reverse-engineered, I encountered plenty of surprising situations: Split personality MCUs, stuck-at-one bits in program counters, secret I/O addresses, half-legal opcodes, and more.
Continue reading
Debugging a Debugger With Itself
The featured image of this post is is a comic from xkcd.com.
The above xkcd comic, which is titled Debugger, alludes to the concern that when you try to apply a particular method to itself, you might not get what you asked for. Turing’s Halting problem is a very famous example of this, i.e., you cannot algorithmically decide whether an algorithm terminates on an input. So, does that issue apply to debuggers as well? In particular, I asked myself whether it makes sense to debug the hardware debugger I am developing with itself.
Continue reading
One Line Only
The featured image of this post is by Vladimir163rus on Pixabay.
A new Arduino library has seen the light of day: SingleWireSerial
. It supports single-wire, asynchronous serial, half-duplex communication. By using the input capture feature of the AVR MCUs, it is extremely accurate and supports bit rates up to 250 kbps robustly. And contrary to its title, one can even use it in a two-wire setting.