This is just a quick post with information on how to get up and running with a development environment for the STM32F4DISCOVERY evaluation board which is a cheap and fun way to get started with developing software for ARM microcontrollers.
First, you need to install the development toolchain. I use devkitARM. See the installation instructions for more information.
Then, you will want to install openocd, a program that lets you upload software to the development board via USB. I assume that you have homebrew installed, so I will use that to install the build requirements for openocd:
brew install libtool automake libusb libftdi
Now get the latest sources for openocd (and no, the open-ocd package that is in homebrew will not cut it because it’s an older version that lacks support for the Discovery board):
git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
… and build openocd
cd openocd ./bootstrap ./configure --enable-maintainer-mode --prefix=/opt/local --enable-stlink make
Install in a reasonable place at your own discretion.