Setup Eclipse debug environment for STM32F4 Discovery board

Suggest use CoIDE, which is a ready to go IDE for stm32F4. Save a lot of troubles.

Moved from old host.

Notes: Indigo works with GNU ARM Eclipse plugin (, The LED_Blink project in this post can be compiled and debugged in Indigo.

  1. Requirement:
    1. Download Eclipse Helios and install (Not Indigo which is not compatible with GNU ARM Eclipse Plug-in )
    2. Note for Indigo (Updated on 1/25/2012):
    1. Today test Eclipse Indigo, it works, with new GNU ARM Eclipse Plug-in(
    2. Don’t forget to download C/C++ GDB Hardware debugging, go to indigo “Help”->”Install New software” -> select “–All Available Sites–” -> search GDB hardware debugging.
  2. Download and install ST-Link
  3. Download and install Sourcery G++ Lite. (If windows select EABI version)
  4. Download and install Atollic studio to get gdb debug server.

Install GNU ARM Eclipse Plug-in Setup Eclipse

  1. Create a empty C Project
  2. Set Tool chain
  3. Set Evironment. (See Path, set to where your CodeSourvery Folder)
  4. Settings in Build
  5. Paths and Symbols
  6. Symbols in Settings
  7. Linker setting. (You can find .ld file in the project I made(LED_Blink) or from Atollic studio project. See the following step.)
    Caution: If you have .ld file in your project, See the blue circle, it should be your project name.
    I didn’t test with the .ld file is not in my project folder, but should work, as long as tell compiler where to find it.

Add project files. Two ways to do it.

  1. If you are newbie to STM32, like me, Use Atollic Studio to create a simple project with Discovery board,
    then copy all project files from Atollic Studio to Eclipse project (Change .s to .S of startup_stm32f4xx.s in src folder).
  2. Download the project I made.

Then the rest are same as this link

Attached my Indigo plugin screenshot. Reference:

download library from STM:

Print Friendly

16 thoughts on “Setup Eclipse debug environment for STM32F4 Discovery board

  1. hey i think i’m messing up the 5th picture about paths and symbols. if you could help me out by telling me exactly what to download because i have downloaded the STM32F4-Discovery_FW_V1.1.0 from the ST website and it only has the CMSIS and the STM32f4_STDPERIPH_DRIVER includes. I have found the STM32F4 include from a set of code that comone posted but i havent been able to find the src includes. Any light you could shine on my mistakes would be greatly appreciated. I cannot get your code to build or this other guys code from if you could check back and try to help me out that would be awesome.

    • I forget why there is a Device folder in library. Could be come from “Atollic studio”,
      And it could work with only include folder.

      Suggest to use CoIDE for stm32F4 in window.
      I have struggled a lot with myself to setup eclipse, now just use CoIDE.

      One way you could do is , use Atollic studio or CoIDE to setup one working project, and analysis how they work.
      This is how I figured out this tutorial.

      Sorry, do not have much time to help you.

  2. You just need to provide a symbol USE_STDPERIPH_DRIVER for the linker to work properly (you may also add symbol HSE_VALUE=8000000). And of course you need to de-comment include lines in stm32f4xx_conf.h. I’ve been sitting on this for the last three hours (sucks), but finally got it to work, download code and debug properly (just after calling SystemInit(); SystemCoreClockUpdate(); directly in main)

  3. Hello ,
    Am programming STM32F4 Discovery on eclipse and am having this error,
    make: *** [startup_src/startup_stm32f4xx.o] Erreur 1
    what does it mean?
    Thank you

  4. Hey, I’m a newbie to programming in embedded systems. Is your tutorial only for the discovery board, or will it allow me to develop applications for ALL STM32 microcontrollers? (i’m planning on building my own custom dev board focused around radio connectivity and multiple sensor integration with the STMf4… MCU). PLEASE HELP

Leave a Reply