Installing Toolchains

What will this section cover?

  • Installing the ARM toolchain
  • Compiling code

In order to compile code which is usable for our specific microprocessor architecture, we need the toolchain for that specific architecture. As said in the introduction chapter, this walkthrough is using the ChipWhisperer Lite ARM board. Therefore, this section will show how to install the ARM toolchain. For other toolchains, have a look at the ChipWhisperer documentation.

Installing the ARM toolchain

Information on the ARM toolchain can be found here.

Windows and macOS

For Windows and macOS, the installer on the ARM developer website should be enough to install the ARM embedded toolchain.

GNU/Linux

For Debian based systems, including Ubuntu, we can use the following command to install the ARM embedded toolchain.

sudo apt install gcc-arm-none-eabi

For ArchLinux based systems, including Manjaro, we can use the following command to install the ARM embedded toolchain.

sudo pacman -S arm-none-eabi-gcc

Compiling binaries

With the proper toolchain installed, we can compile binaries which are going to be used on ChipWhisperer targets. All SimpleSerial resources mentioned in the Existing resources section contain a Makefile in their root directory. This file provides the computer instructions on how to compile source code. In order to create .hex files — which is the format used to program ChipWhisperer targets — from our source, we can simply run the following command from the root directory of our project, replacing <PLATFORM> with the proper platform.

PLATFORM=<PLATFORM> make

This should create the .hex file in the root directory.

We have now installed the proper toolchain and learned how to compile our own source code. Next up, we want to know how to properly write our source code, so we can best do our measurements.