Setup Tools
Requirements
Git
Git is a free and open source distributed version control system.
Mbed CLI manages project dependencies with Git repositories.
- Ubuntu
- Windows
Install Git from Ubuntu repositories:
sudo apt install git
Install Git from the Git official website.
For recent Windows versions, the following options may be selected:
- Use external OpenSSH (windows 10+), see official Microsoft documentation for installation procedure
- Use the native Windows Secure Channel library
- Use Windows' default console window
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.
- Ubuntu
- Windows
Install Mercurial from Ubuntu repositories:
sudo apt install mercurial
Install Mercurial from the official website and choose to add Mercurial to the path.
Do not forget to add Mercurial to the path.
Pipx
Pipx is a tool to install Python applications in isolated environments.
- Ubuntu
- Windows
Install Pipx from Ubuntu repositories:
sudo apt install pipx
Install Python 3.7 from Microsoft Store.
Python 3.7 is the last supported release on Windows.
Find the Python local script directory by executing the following command:
python3.7 -m site --user-site
Replace site-packages
by Scripts
and add obtained Python local scripts to the user path.
How to modify user path:
- From the Settings, search for "environment"
- Choose "Edit environment variables for your account"
- Edit the Path variable in the "User variables" section
Do not edit global environment variables, but only variables for your account.
Restart user session.
Install Pipx with pip
:
python3.7 -m pip install --user pipx
And modify path to use applications installed with pipx
:
python3.7 -m pipx ensurepath
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.
- Ubuntu
- Windows
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
Add GNU Tools for Arm Embedded Processors to the path when asked.
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.
- Ubuntu
- Windows
Install a compiler and the headers to build required Python modules:
sudo apt install build-essential python3-dev
Install Microsoft CPP toolchain by downloading and running the official installer.
And select:
- Desktop Development with C++
Restart the computer at the end of the installation.
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
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
SEGGER J-Link Debug Probe
To debug with a SEGGER J-Link probe, install the drivers for your OS from the official website.
- Ubuntu
- Windows
Install the downloaded .deb file:
sudo dpkg -i JLink_Linux_Vxxx_x86_64.deb
Add J-Link executables to the system path (the install location should be "C:\Program Files\SEGGER\JLink").
How to modify system path:
- From the Settings, click on "System"
- Click "About" and select "System info"
- In the new Control Panel window that opens, click "Advanced system settings"
- In the new window, select "Environment Variables..."
- Edit the Path variable in the "System variables" sectio.
Restart user session.