Skip to content

Toolchain Setup

Jamie Smith edited this page May 19, 2020 · 18 revisions

This page explains how to set up ARM GCC on your computer so that you can compile mbed-cmake projects. Note: If you are setting up an mbed-cmake project for the first time, then you will need to follow the Configuration Instructions after this guide to set up mbed-cmake for your processor target.

On Windows:

  1. Get CMake by downloading it from here. If you already have CMake installed, make sure it's at least version 3.9.
  2. Download the GNU ARM toolchain from ARM's website, and install it.
  3. Add CMake and the ARM toolchain to your PATH.
    • On windows, you should do this by going to System and Security >> System >> Advanced System Settings >> Advanced (Tab) >> Environment Variables (Button). Alternatively, you can click the windows key and search for PATH which should bring up an option labeled Edit the system environment variables
    • Then find Path under User variables for
    • Highlight it and click Edit
    • You will now need to add two paths. They should look similar to the ones listed below, but may not be exactly the same. You should go into your Program Files to find the exact path on your machine.
      • C:\Program Files (x86)\GNU Tools Arm Embedded\7 2018-q2-update\bin
      • C:\Program Files\CMake\bin
  4. Install Python 3 so that you can run python from the command line. Don't forget to click the "add to path" checkbox when installing Python!
  5. Install the Python packages "intelhex" and "prettytable": python -m pip install intelhex prettytable.

You will of course need a make tool to use with CMake, and unlike other OSs Windows doesn't come with one out of the box. I tend to use mingw32-make, with the CMake argument "-GMinGW Makefiles". mingw32-make is included with MinGW and MSYS2, or if you don't have those installed you can download a standalone version here.

Clone this wiki locally