Getting Started with the ARM GCC Compiler on Windows, Part 5: Debugging with OpenOCD

In part 1 of this tutorial series, we installed the GNU ARM GCC toolchain and the Eclipse IDE in order to develop for our ARM microcontrollers. In part 2, we configured the correct compiler and linker settings to get the STM32F0DISCOVERY demo code to build. In part 3, we pared down the demo project into a template to use for all of our future projects for the STM32F0 chip. And in part 4, we build a 'BlinkyLED' program from the template that uses the two LEDs and the user button on the STM32F0DISCOVERY board.

The previous tutorials are all you need to get things up and running on your STM32F0DISCOVERY board... as long as your code works the first time. If your code doesn't work the first time (like, say, my code), you'll want to add some debugging features to your build environment. If you're accustomed to writing code on a desktop computer using a modern IDE such as Visual Studio, you're used to being able to single-step through your code in the debugger from the source code, you're used to examining and modifying the contents of variables when you've broken into your code execution, and you're used to setting breakpoints in your source code. This functionality is (relatively) easy to accomplish on a desktop computer, but things get pretty tricky when trying to do the same things on an embedded platform. The STM32F0 chip has 64K of program space. Shoehorning a complex debugger into that code space along with your application code can be problematic. Continue reading Getting Started with the ARM GCC Compiler on Windows, Part 5: Debugging with OpenOCD