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 little bit of soldering and gluing.Continue reading
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.
The above xkcd comic, which is titled Debugger, alludes to the problem 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 for this, i.e., you cannot algorithmically decide whether an algorithm terminates on an input. So, does that problem 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
When things go wrong although your program logic appears to be correct, it is time to look at the signals going into the MCU and coming out of the MCU. The best tool for that is a logic analyzer.Continue reading