66% or better

Building an ARM cross compiler on OSX

arm-cross-compiler-for-osx

We’ve tried building our own ARM cross compiler on a Linux box and it’s no picnic. Luckily there is a free cross compiling toolchain available through Mentor Graphics (formerly called Code Sourcery G++). But those looking to develop on a Mac aren’t so lucky. There is help via a script, and [Michael] wrote a guide detailing¬†how to use crosstool-ng to build an ARM toolchain on Mountain Lion.

Crosstool-ng is a script which automates much of what is needed when compiling all the different components. But there is a some groundwork that needs to be in place before you can run it. For instance, some of the tools that ship with OSX aren’t entirely compatible with the GNU tools the script is looking for. One example is ‘grep’. Mountain Lion has the BSD version of grep but it is missing a few of the GNU version’s commands used by crosstool-ng. [Michael] will guide you through this and a handful of other issues until you have a functioning toolchain up and running.

ARM prototyping on-the-cheap with STM32 Discovery

STMicroelectronics has another inexpensive development board out; the STM32 Discovery is an ARM Cortex-M3 prototyping platform. Coming in under $10 puts it right along the lines of their 8-bit offering, but this one is 32-bits with 5 KB of RAM and 128 KB of programming memory. It runs a bootloader and has on-board USB for easy programming. They’ve even got a trio of crippled IDE’s to get you started.

Unfortunately this is following a growing trend with the exclusion of Linux support. [Gordon] wrote in to let us know that there is hope in a couple of forms (but not using the USB functionality). The first is a serial programmer using the RS232 that [Paul] came up with (there’s a lot more on his blog so spend some time there). But you can also use the serial debug protocol to program the board.

Either way you’ll still need a method of compiling the code. We’ve had great success rolling our own GNU ARM cross compiler using this guide. Or you can grab a pre-built package by downloading Sourcery G++ lite.