Debugging the STM32F4 using openocd, gdb and Eclipse

About

This article will describe how to debug the STM32F4 microcontroller using the zylin eclipse plugin. The following setup will be used:

  • STM32F4 discovery board
  • The built-in SWD programmer/debugger on the discovery board
  • Toolchain and example program from this tutorial (I have updated the build script for debugging to work, so if you have followed the tutorial before you may have to download and run the summon-arm script again)

The result will look something like this:

Debug_View

You can:

  • Set hardware breakpoints
  • See variable values when hitting the breakpoints
  • Change variables, then continue
  • Many other things…

Continue reading

Get started with the STM32F4 on Ubuntu Linux

Updated 2014-04-03

Introduction

This tutorial describes how to set up a complete and free toolchain for STM32F4xx microcontrollers, including how to use hardware floating point support. It is mostly aimed towards beginners with ARM microcontrollers, however, experienced developers could probably find something useful here as well. It is assumed that the reader is a bit familiar with the C programming language and the Bash terminal.

At the end of this tutorial, the reader should be able to build and upload programs to the STM32F4** using the STLinkV2 interface (such as the one found on the STM32F4 Discovery board). This is done using Ubuntu Linux in this tutorial, however, the instructions should be general enough to make this work on any Debian-based GNU/Linux distribution.

The following hardware/software will be used:

Continue reading