The toolchain

The relationship between the toolchain components
The tool-chain consists of a compiler, assembler, linker, debugger, libraries and a number of helper programs. Its job is to compile your code into a program that can be executed on the target system. This involves the translation of your code into the target machine language and optionally linking with various helper libraries.
In addition to the tool-chain you will need a program that can be used to download your finished program to the target. You may also require a program that relay signals from the tool-chain’s debugger to and from the target system.

Choosing a toolchain

Your choice of tool-chain depends on a number of factors:
The target system hardware (cpu core). In our case this is ‘arm
The target system’s software – will it have a operating system?. In this case ‘none‘.
The calling convention you will use. Usually this is Embedded Application Binary Interface or ‘eabi‘.
Putting all of these elements together we arrive at the name of the compiler:

The host system (the computer and operating system you use to write your code) may not be an arm system so you will have to download a particular version of arm-none-eabi-gcc (and associated tools).

Choosing a programmer/debugger.

Some microprocessor’s incorporate a JTAG interface to facilitate program download and debug. You will need a piece of hardware that can relay these JTAG signals back to an interface port on your host computer. In the past, you may have connected your host computer’s parallel printer port to a JTAG programming tool. These days however, JTAG to USB converters are the norm.
JTAG programmers and debuggers can be quite expensive. They also require the sacrifice of quite a few microprocessor pins. More recently microprocessors have been making use of the SWD (Serial Wire Debug) standard. This interface requires only three microprocessor pins. Furthermore, SWD to USB interfaces are quite cheap and you will often find them included in microprocessor development systems eliminating the need for additional programming/debugging hardware.
Your choice of programmer/debugger will depend upon the type of interface your target hardware uses. It may also, to a lesser extent, depend upon the tool-chain you use. Some manufacturers (e.g. NXP’s LPC Expresso boards) bundle the programmer/debugger interface with the tool-chain making it difficult to use these kits with other tool-chains.
On a personal note, I prefer to make use of tool-chains that are based on the gcc compiler suite and programmers/debuggers that work with open source utilities such as openocd and st-util.

Getting the toolchain software

You can download ready built compilers and linkers for ARM from These are available for Linux, Windows and Mac. For debug interface software you could use openocd. This is available in the Ubuntu, Debian and Fedora repositories. You can get the source here which has been tested to compile for Windows and Mac also.
If you prefer an Integrated Development Environment (IDE) you could try IAR and Keil. They provide free (code-size limited) versions that run on Windows.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s