Mistake on this page?
Report an issue in GitHub or email us

Linux

1. Download and install prerequisites

  • Python: Mbed CLI is a Python script, so you'll need Python to use it. We test Mbed CLI with Python versions 2.7.11, and with 3.6.5 and greater.

    You can download and install Python, or use your package manager. For example, you can use the following in Ubuntu (note that it includes pip, the following item on our list):

    $ sudo apt-get install python2.7 python-pip
    

    Note: Python 3 usage is not compatible with Mbed OS versions older than 5.9 and Mbed CLI toolchain versions older than 1.7.2.

  • pip.

    To install Pip, run easy_install --user pip from your command-line.

    Note: Mbed CLI toolchain versions older than 1.5.1 are not compatible with pip version 10.0 (or newer). Please use the latest Mbed CLI with newer version of pip.

  • Git and Mercurial: Mbed CLI supports both Git and Mercurial repositories, and you may need libraries from both sources as you work, so please install both:

    • Git - version 1.9.5 or greater.
    • Mercurial - version 2.2.2 or greater.

Optional: Using a virtual environments

If your main environment has an unsupported Python version, you may want to install Mbed CLI on a virtual environment. Mbed CLI is compatible with Virtual Python Environment (virtualenv).

2. Install a compiler

Download and install one of the following compilers: GCC Arm, Arm Compiler 5, Arm Compiler 6 or IAR. To download the latest toolchains, visit the supported compilers page.

Note: When installing the Arm Compiler 5 on a 64-bit Linux machine, you may also need to install the i386 architecture package:

```
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
```

3. Install Mbed CLI

To install Mbed CLI, run pip install mbed-cli from your command-line.

You can verify Mbed CLI installed correctly by running mbed help.

4. Set up the environment

For any installed toolchain, be sure to add the Mbed CLI global configuration:

$ mbed config -G ARM_PATH <path to ARM bin\>
[mbed] <path to ARM bin\> now set as global ARM_PATH

$ mbed config --list
[mbed] Global config:
ARM_PATH=<path to ARM bin\>

Note: You can also apply the same configuration to the IAR and GNU toolchains using IAR_PATH or GCC_ARM_PATH.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.