Stm32f4 discovery and MacOSX

So you got yourself a shiny new stm32f4-discovery board and you have to use Windows machine to compile the code for the board?

But you have shiny (yes, again) new Apple device and why not use that to program the board?

You don’t know how?

Let’s do it together, than:

1. Download the toolchain for ARM Cortex -M and Cortex-R created by people from ARM. You can use already compiled version to save some time and put that somewhere handy (as in /usr/local). Add path to $PATH just for convenience.

2. Get stlink from the github.

To compile it use:


./configure –with-prefix=/usr/local


sudo make install


You have now all the tools to compile the code for the board and send the .bin file to it with:

st-flash write <file_name>.bin <address> (e.g. st-flash write main.binĀ 0x8000000)