Skip to main content

Setup Tools

Requirements​

Git​

Git is a free and open source distributed version control system.

Mbed CLI manages project dependencies with Git repositories.

Install Git from Ubuntu repositories:

sudo apt install git

Mercurial​

Mercurial, as Git, is a free and open source distributed version control system.

Mercurial is needed to import and manage some older libraries provided by the Mbed ecosystem.

Install Mercurial from Ubuntu repositories:

sudo apt install mercurial

Pipx​

Pipx is a tool to install Python applications in isolated environments.

Install Pipx from Ubuntu repositories:

sudo apt install pipx

And modify path to use applications installed with pipx:

python3.7 -m pipx ensurepath
tip

Ensure that displayed directories are correctly added to your user path.

Then log out to apply modifications.

GNU Arm Embedded Toolchain​

The GNU Arm Embedded Toolchain is an open-source toolchain supported by Mbed CLI.

Download and install GNU Arm Embedded version 10 (10.3-2021.07) from the official website.

Extract the archive:

mkdir -p ~/.local/opt/gcc-arm-none-eabi/
tar -xf gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2 --directory ~/.local/opt/gcc-arm-none-eabi/

Add to your .bashrc the path to the toolchain:

export MBED_GCC_ARM_PATH="$HOME/.local/opt/gcc-arm-none-eabi/gcc-arm-none-eabi-10.3-2021.07/bin/"
export PATH=$MBED_GCC_ARM_PATH:$PATH

Arm Mbed OS​

Arm Mbed OS is an RTOS and a set of APIs to write applications on embedded devices.

The offline development tool is Arm Mbed CLI.

Mbed CLI​

Mbed CLI is the Python tool used to build a Mbed OS project.

Install a compiler and the headers to build required Python modules:

sudo apt install build-essential python3-dev

Install mbed-cli in a Python environment:

pipx install mbed-cli

You're now ready to download and compile an Mbed OS application:

mbed import mbed-os-example-blinky
cd mbed-os-example-blinky
mbed compile -t GCC_ARM -m NUCLEO_F401RE
note

The first build takes more time because Mbed CLI installs the required dependencies.

6TRON Flash Tool​

Install the 6TRON Flash Tool to flash Zest_Core boards:

pipx install git+https://github.com/catie-aq/6tron_flash.git#egg=sixtron_flash

Debug probe​

To debug with a SEGGER J-Link probe, install the drivers for your OS from the official website.

Install the downloaded .deb file:

sudo dpkg -i JLink_Linux_Vxxx_x86_64.deb