ARM Cortex-M Toolchain – The Easy Way

A couple of months back, I wrote about setting up a full toolchain for targeting the STM32F4 on Mac OS. While those instructions will still work, I’ve since found a much easier way of getting the same toolchain set up. As an added bonus, these instructions will work for Mac, Windows, or Linux.

ARM packages an entire GNU/GCC toolchain for their Cortex-M and Cortex-R processors, and makes it available on launchpad. These releases are also used as the basis for the compiler of at least one major IDE. The toolchain includes newlib, gdb, binutils, and gcc.

Grab the correct archive for your platform from the launchpad site, and extract it somewhere you’ll want to keep it. I reserve a directory in my home folder for embedded tools, so I extracted the archive there. Optionally, add the gcc-arm-none-eabi-4_7-2013q2/bin folder of the tool chain to your PATH.

The ARM tool chain includes pretty much everything you’ll need to get up and running on a STM32F4 Discovery, with the exception of OpenOCD. OpenOCD can be found in homebrew or MacPorts for Mac, most common Linux distributions, and in prebuilt binaries for Windows.

This tool chain should be far easier to install and has a much broader user base. Unlike my already-neglected script, it will even be updated with backported fixes from upstream GCC.