Saving Some Money with the STM32F0

October 28, 2012

When you don't need lots of processing power the F0 is a great option. They're about one-third the price of the F4, while still having plenty of power for most hobby projects. The F0 Discovery board costs around $8 and the bare MCUs are around $2 - $4.

The linux stlink project doesn't fully support the F0 yet, but OpenOCD works well. I have found OpenOCD to be quicker and more stable, so I now use it for the F4 and F0.

Check out my earlier post on the F4 for information on setting up the compiler. Then download and build a version of the STM F0 library with makefiles:

$ mkdir ~/stm32f0 $ cd ~/stm32f0 $ git clone $ cd stm32f0-discovery-basic-template/Libraries/ $ make

Download the latest version of OpenOCD, then:

$ cd ~/stm32f0/openocd-0.6.0/ $ ./configure --enable-stlink $ make $ sudo make install $ sudo cp contrib/openocd.udev /etc/udev/rules.d/openocd.rules $ sudo udevadm control --reload-rules

You can use one of the examples in the library as a starting point, or download my empty project template and use it to get started.