How can I configure Eclipse, GCC, and OpenOCD to work with the STM32F4Discovery board?
Asked Answered
B

3

7

I am in possession of an STM32F4Discovery board, which contains both an STM32F4 microcontroller, and an ST-LINKv2 debugger interface. I would like to do some simple C programming on this setup, and would like to use freely available tools to do it.

Here's what I do know:

  • Eclipse can be configured to cross-compile for various ARM targets using a variety of toolchains, such as YAGARTO, or others.
  • Eclipse can use GDB to do remote debugging.
  • OpenOCD provides a GDB server.
  • OpenOCD (in the latest version) supports both the ST-LINKv2, and the STM32F4Discovery board specifically (there is a script for this board included).

Here's what I don't know: how to put these pieces together into a coherent whole. I believe that all the necessary moving parts exist, but I'm at a loss on how to assemble them. I have found bits and pieces, often beginning with things like, "Install Eclipse Indigo". Is there a simple tutorial, or a list of steps, or things to check?

Beatup answered 11/9, 2012 at 19:33 Comment(0)
I
3

I have found a tutorial using the following toolchains:

  • Gnu make
  • Gnu tools ARM embedded
  • OpenOCD
  • OpenOCD -> stlink connection

The tutorial explains clearly how to get from a plastic packed stm to a working eclipse enviroment capable of programming and debugging your stm. I got my stm32f0-discovery working with this tutorial. So for you i guess your stm32f4 would work aswel. If you can' t figure it out. I also got a stm32f4discovery but i just did not had the time to look at it but i still wanted to, so mabey its a good reason to start with it for myself. so i can help you getting it going.

tutorial link

Ideo answered 18/1, 2013 at 10:24 Comment(1)
Tutorial link is dead.Fic
R
0

I found myself in the same position, I wrote this guide on setting up the environment using eclipse, GCC and the ST-Link tool - although it doesn't cover setting up the debugger im still working on that!

http://tecsploit.com/?page_id=190

Russianize answered 16/3, 2014 at 0:10 Comment(0)
S
0

Try to start with ChibiOS. It has tons of cute tutorials and sample projects. Download ChibiOS from here: http://sourceforge.net/projects/chibios/

Unpack it and use an appropriate demo project from demos directory of ChibiOS distribution. For example ChibiOS_2.6.5/demos/ARMCM4-STM32F401C-DISCOVERY/.

Then read a great article on how to import this project into Eclipse and start debugging: http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:eclipse2

Also take a look at the template project for STM32F0: https://github.com/dobromyslov/stm32f0-chibios-template

Sirreverence answered 12/8, 2014 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.