I set myself a bit of a challenge recently: pull together a working toolchain for a microcontroller. I’ve always used environments automagically generated by tools or prepared by others and so it’s been a bit of a mystery to me – I wanted to dig into the details to understand what’s going on.

The result of this challenge is a project template for the STM32F4 Discovery board, which you can find on GitHub.

I picked the STM32F4 series as it’s a relatively popular MCU choice and has a low-cost development board in the form of the Discovery board. It’s also an ARM processor, so there are plenty of good tools and resources available. The project template should work for any part in the STM32F4 series, although a bit of tweaking of some configuration files may be needed.

It still has some rough edges, but it should be ready for use by people who aren’t me. It has everything you need to get started:

You can grab the template from GitHub. If you run into any issues or have any suggestions, creating issues on the repository is the best way to get in touch.

I’m planning on writing up a few posts explaining some of the more interesting parts soon… stay tuned.