STM32F4 Discovery Dev Board

From BUILDS

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:36, 26 May 2012
Cwoodall (Talk | contribs)
(OS X)
← Previous diff
Revision as of 00:36, 26 May 2012
Cwoodall (Talk | contribs)
(OS X)
Next diff →
Line 52: Line 52:
</pre> </pre>
-You should see the Green, Orange, Blue and Red lights blink in some sort of order as well as the light in the top left corner. Great success!+You should see the Green, Orange, Blue and Red lights blink on and off. If this worked, then great success!
== Makefile == == Makefile ==
...Coming soon... ...Coming soon...

Revision as of 00:36, 26 May 2012

Contents

Specs

Open Source Toolchain

Linux

Under linux this is rather straightforward. I was able to compile with toolchain without a hitch using these instructions, under OS X I would imagine its a tad more of a pain in the ass. The programs/scripts being used are the following:

  • summon-arm-toolchain : Downloads and compiles the arm-none-eabi toolchain which we will be using. I am not sure if it compiles with the STM32F4's FPU support.
  • Texane's stlink : Allows us to program using the stlink on the STM32F4 Discovery board. We program using gdb to load the program into SRAM for now. If you link correctly you can flash too. In the future this should work to program other STM32 chips via the SWD link (if the jumpers are set correctly).


OS X

Thanks to Alex Whittemore there is some good documentation [here http://www.alexwhittemore.com/open-source-ide-and-toolchain-for-the-stm32f4-discovery-on-mac-osx-lion/] on one method of getting set up with Eclipse. Chris Woodall would prefer to use emacs + a makefile to do his development, so the methodology is a little different.

First, you should make sure you have XCode installed, because that will install gcc and all of the development tools you need for some of the future steps.

Now, lets get macports if you have a Mac and some self respect you should already have macports anyway (or homebrew). Then we will install the arm-none-eabi toolchain, this might take awhile if you have never used macports before, while you are at it you should install git:

$ sudo port install arm-none-eabi-*
$ sudo port install git # optional

Now we will use git to grab texane's great stlink program:

$ mkdir ~/src #optional, but my preferred working directory for installations like this
$ cd ~/src # optional
$ git clone https://github.com/texane/stlink.git
$ cd stlink/gdbserver
$ make

Now we can actually load up an example program! So lets do that:

$ cd ~/src/stlink/examples/blink
$ make CONFIG_STM32F4_DISCOVERY=1

Then connect to the debugger and try it out…

$ arm-none-eabi-gdb
(gdb) target remote localhost:4242
(gdb) load blink_F4.elf
(gdb) continue

You should see the Green, Orange, Blue and Red lights blink on and off. If this worked, then great success!

Makefile

...Coming soon...

Personal tools