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: debugging
Spontaneous MCU Restarts: Why Do They Happen?
The featured picture of this blog post is by rawpixel.com on Freepik.
AVR MCUs sometimes appear to restart without you having pressed the RESET button or any other obvious reason. Is that a sign of resilience or of looming danger? How can you find the root cause?
Continue readingDebugging 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 readingA 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 readingdw-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 readingdw-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.
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
This quote is very much to the point, in particular, when one starts to create overly complex implementations. Keep it simple, stupid!
Debugging(2): It’s the Hardware, Stupid!
When something goes south, it is not always the programmer who is to blame. It could also be the hardware (resp. the electrical engineer) that might be responsible. Note, however, when you are developing your system as a hobbyist, you are both: the electrical engineer and the programmer (so you always can blame yourself). In this blog post, we will take a look at some of the things that can go wrong on the hardware side.
Debugging(1): What Kind of Bug is This?
Featured image: Courtesy of the Naval Surface Warfare Center, Dahlgren, VA., 1988. – U.S. Naval Historical Center Online Library Photograph NH 96566-KN
Be honest: When did you last time designed a system that worked right from the start and did not need any corrections? Right, that was probably a long time ago – or never. People usually spend a lot of time in identifying and correcting errors, colloquially called bugs. In this blog post, I will give you an overview of different forms of bugs and what you can do about them.