Toolchain Setup

In this document we will describe the installation of tools for working with firmware - the firmware toolchain. The toolchain is designed to allow the firmware operations on all the supported operating systems using a command line in a uniform manner.

Orientation on a command line interface has the advantage to build your firmware automatically on server, e.g. on commit to GitHub via Travis CI continuous integration service.

The firmware toolchain consists of several fundamental components:

  • Compiler GCC ARM Embedded

  • Version control system Git

  • Interpret for scripting language Python 3

  • DFU upload utility dfu-util

  • Program BigClown Firmware Tool

At the end of the article, we'll show how to develop and compile firmware with popular editors like Atom or Visual Studio Code.

To install, go to one of the supported platforms:

To upgrade an existing installation, go to one of the supported platforms:

Setup on Windows

You will need administrator rights to install.

Step 1: Download the current version of the BigClown Toolchain Windows installer

Download from GitHub

Step 2: Launch the downloaded installer and choose the destination directory

Step 3: Now you can adjust the desired Path environment variable (we recommend to leave the default settings if in doubt) and proceed with the installation

Step 4: The FTDI driver setup will launch automatically during the installation - install it

Step 5: After finishing the installation, lauch the BigClown Toolchain using one these 3 ways

  • From the Desktop

  • From the Start menu

  • From the context menu on the selected directory (using a right click)

The advantage of the context menu is to open the BigClown Toolchain directly in the directory location you need to work with.

Step 6: Continue on the document Toolchain Guide. You may also try

Update on Windows

Uninstall on Windows

Uninstall Apps & features:

Setup on macOS

The following procedure has been tested on macOS 10.12.

Step 1: Open the Terminal application

Step 2: Install Homebrew (unless you already have it)

Homebrew is the package management system and the ecosystem of packages for macOS.

Step 3: Install GCC ARM Embedded

brew tap armmbed/formulae
brew install armmbed/formulae/arm-none-eabi-gcc

Step 4: Install Git

brew install git

Step 5: Install dfu-util

brew install dfu-util

Step 6: Install Python 3

brew install python3

Step 7: Update pip (Python Package Manager) to the latest version

sudo pip3 install --upgrade --no-cache-dir pip

Step 8: Install BigClown Firmware Tool

sudo pip3 install --upgrade --no-cache-dir bcf

Step 9: Continue on the document Toolchain Guide. You may also try

Update on macOS

  • Update of packages:

brew update && brew upgrade
  • BigClown Firmware tool update:

sudo pip3 install --upgrade --no-cache-dir bcf

Setup on Ubuntu

The following procedure has been tested on Ubuntu 18.04.1 LTS.

Step 1: Open the Terminal application

Step 2: Add the following PPA to the list of available repositories

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa

Step 3: Update the index of the available packages

sudo apt update

Step 4: Install GCC ARM Embedded

sudo apt install gcc-arm-embedded

Step 5: Install Git

sudo apt install git

Step 6: Install dfu-util

sudo apt install dfu-util

Step 7: Install Python 3 (required by the BigClown Firmware Tool)

sudo apt install python3.5 python3-pip python3-setuptools

Step 8: Update pip (Python Package Manager) to the latest version

sudo pip3 install --upgrade --no-cache-dir pip

Step 9: Install BigClown Firmware Tool

sudo pip3 install --upgrade --no-cache-dir bcf

Step 10: Add user to dialout group

sudo adduser [user] dialout

Instead of [user] use your user name. For example my user name is peter:

sudo adduser peter dialout

If you don't know your user name. Use following command:

whoami

Step 11: Continue on the document Toolchain Guide. You may also try:

Update on Ubuntu

  • Update of packages:

sudo apt update && sudo apt upgrade
  • BigClown Firmware tool update:

sudo pip3 install --upgrade --no-cache-dir bcf

Setup on Generic Linux

If you have other Linux distribution or unsupported Ubuntu version, we recommend to use official GNU Embedded Toolchain for ARM from developer.arm.com pages. This package is validated by ARM and tested by us.

Step 1: Go to https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads and download Linux 64-bit package

Step 2: Extract package to filesystem, e.g. into /opt folder (available for all users, you will need root privileges) or into ~/.local/opt folder (available only for you)

Step 1: /opt version

cd <folder with package> # go to folder with downloaded file
sudo cp gcc-arm-none-eabi-6-*-update-linux.tar.bz2 /opt # copy to destination folder
cd /opt # go there
sudo tar xjf gcc-arm-none-eabi-6-*-update-linux.tar.bz2 # unpack file

Step 3: ~/.local/opt version

mkdir -p ~/.local/opt # create folder
cd <folder with package> # go to folder with downloaded file
cp gcc-arm-none-eabi-6-*-update-linux.tar.bz2 ~/.local/opt # copy to destination folder
cd ~/.local/opt # go there
tar xjf gcc-arm-none-eabi-6-*-update-linux.tar.bz2 # unpack file
sudo ln -s gcc-arm-none-eabi-6-<version>-update gcc-arm-none-eabi-6 # where <version> could be: 2017-q2

Step 4: Update PATH variable so you can use arm-none-eabi-* binaries directly

cd # go to user home folder
# use your favorite editor and edit ".profile" file
# find line with PATH variable. e.g.:
export PATH="$PATH:/…"

Please note that three dots (…) represents some text there.

# and add to your path to the end (/opt version):
export PATH="$PATH:/…:/opt/gcc-arm-none-eabi-6/bin"
# or (~/.local/opt version)
export PATH="$PATH:/…:~/.local/opt/gcc-arm-none-eabi-6/bin"
# if there is no PATH line, add it
export PATH="$PATH:/opt/gcc-arm-none-eabi-6/bin"
# or
export PATH="$PATH:~/.local/opt/gcc-arm-none-eabi-6/bin"

Step 5: Use your distribution package manager and install

  • Git

  • Python 3

  • dfu-util

Step 6: Install BigClown Firmware Tool

sudo pip3 install --upgrade --no-cache-dir bcf

Step 7: Continue on the document Toolchain Guide. You may also try

Update on Generic Linux

sudo ln -sf gcc-arm-none-eabi-6-<version>-update gcc-arm-none-eabi-6 # where <version> could be: 2017-q2

or

ln -sf gcc-arm-none-eabi-6-<version>-update gcc-arm-none-eabi-6 # where <version> could be: 2017-q2
  • Update packages

    • Use your distribution package manager

  • BigClown Firmware tool update:

sudo pip3 install --upgrade bcf

Integration with Visual Studio Code

Every BigClown project contains .vscode configuration folder so you just open the project folder in Visual Studio Code and you're ready to go.

We also suggest to install C/C++ Intellisense and debug extentsion from Microsoft.

In file .vscode/tasks.json there are some tasks which you can run by pressing Ctrl+Pand typing task.

ask

Description

build

Build active project

clean

Clean active project

dfu

Flash compiled firmware with dfu-util to the Core Module

ozone

Run Ozone debugger which can be used with J-Link debugger

update

Update SDK folder/submodule to the latest version

Project make file allows quicker parallel compilation. This can be set in .vscode/tasks.json where you set "args": ["-j4"], parameter, where the number 4 is the number of your CPU cores.

Integration with J-Link debugger

To debug the running code on Core Module you can use Ozone debugger with J-Link debug probe. It is also possible to use GDB/OpenOCD with other debug probes but this is not documented yet.

Download the Ozone debugger.

For Windows users: Ozone folder also needs to be set in PATH environment variable or you can simply edit Makefile and set absolute path to the Ozone.exe file. It is also possible to open project directly in Ozone, please see the options below.

How to start debugging the project:

  • In the command line by typing make ozone

  • In Visual Studio Code by pressing F5 or Ctrl+P and typing task ozone

  • In Ozone by loading project configuration file sdk/tools/ozone/ozone.jdebug.

Related Documents

Contents
Setup on Windows
Step 1: Download the current version of the BigClown Toolchain Windows installer
Step 2: Launch the downloaded installer and choose the destination directory
Step 3: Now you can adjust the desired Path environment variable (we recommend to leave the default settings if in doubt) and proceed with the installation
Step 4: The FTDI driver setup will launch automatically during the installation - install it
Step 5: After finishing the installation, lauch the BigClown Toolchain using one these 3 ways
Step 6: Continue on the document Toolchain Guide. You may also try
Update on Windows
Uninstall on Windows
Setup on macOS
Step 1: Open the Terminal application
Step 2: Install Homebrew (unless you already have it)
Step 3: Install GCC ARM Embedded
Step 4: Install Git
Step 5: Install dfu-util
Step 6: Install Python 3
Step 7: Update pip (Python Package Manager) to the latest version
Step 8: Install BigClown Firmware Tool
Step 9: Continue on the document Toolchain Guide. You may also try
Update on macOS
Setup on Ubuntu
Step 1: Open the Terminal application
Step 2: Add the following PPA to the list of available repositories
Step 3: Update the index of the available packages
Step 4: Install GCC ARM Embedded
Step 5: Install Git
Step 6: Install dfu-util
Step 7: Install Python 3 (required by the BigClown Firmware Tool)
Step 8: Update pip (Python Package Manager) to the latest version
Step 9: Install BigClown Firmware Tool
Step 10: Add user to dialout group
Step 11: Continue on the document Toolchain Guide. You may also try:
Update on Ubuntu
Setup on Generic Linux
Step 1: Go to https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads and download Linux 64-bit package
Step 2: Extract package to filesystem, e.g. into /opt folder (available for all users, you will need root privileges) or into ~/.local/opt folder (available only for you)
Step 3: Create a symbolic link gcc-arm-none-eabi-6
Step 4: Update PATH variable so you can use arm-none-eabi-* binaries directly
Step 5: Use your distribution package manager and install
Step 6: Install BigClown Firmware Tool
Step 7: Continue on the document Toolchain Guide. You may also try
Update on Generic Linux
Integration with Visual Studio Code
Integration with J-Link debugger
Related Documents