Firmware Debugging and Development

Here at Adafruit, we spend lots of our time deep down in the lowest levels of the libraries that our examples are built on. At that level we can't assume that any of the software on the device is working correctly. The tools in this guide can help you load and debug the software on a microcontroller. It's easiest with a development board that has a debug connector or at least a spot for one. Once the software is loaded, you can use external tools to verify that everything is working as expected (or figure out why it isn't.) The toughest bugs may take a lot of time to figure out or may require plugging and unplugging a cable. Inline switches can greatly simplify this process by using a switch to effectively unplug the cable without the hassle.

Scott has started streaming these deep topics on his Deep Dive with Scott streams and you can find Ladyada digging into code and fixing things on Desk of Ladyada.

Loading and Debugging

Dev Boards with Debug Connector

External Analysis

Inline Switches

Using GDB to better understand program state and history.