-
Notifications
You must be signed in to change notification settings - Fork 34
How to use SDK on Ubuntu
This guide will help you to set up your environment on a Linux system.
We use Ubuntu 19.10 in this guide.
Some steps may differ depending on the version of Ubuntu or a different Linux distribution.
Ubuntu 19.10 has Python3 installed by default.
You can check it as followed:
$ python3 --version
Python 3.7.5rc1pip must be installed:
$ sudo apt install python3-pipIt is recommended to use a virtual environment as followed (optional):
$ pip3 install virtualenv
$ virtualenv venv-sdk
$ source venv-sdk/bin/activateInstall pycryptodome package (add sudo if not using virtualenv):
pip install pycryptodomeWe recommend the version 7.2.1 (7-2017-q4-major) for GCC Arm toolchain
Install it with following commands:
$ wget -O gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2?revision=375265d4-e9b5-41c8-bf23-56cbe927e156?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,7-2017-q4-major
$ tar xjf gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2Please note down the full path of the bin folder of your installation:
$ cd gcc-arm-none-eabi-7-2017-q4-major/bin
$ pwd
/home/gwendal/gcc-arm-none-eabi-7-2017-q4-major/binGit is needed to clone the GitHub repository
sudo apt install gitAll sources are available from github repo.
If you have a github account (and an ssh key set), you can clone the repo with ssh.
Otherwise use the https option:
$ git clone https://github.com/wirepas/wm-sdk.gitSelect the tag you want to use:
$ cd wm-sdk
$ git tag
v1.0.0
$ git checkout v1.0.0📝 You will be on a detached HEAD at this point. You can create a local branch if you want at this stage
In order too use the right compiler, you can either add the previously Arm toolchain to your PATH or edit config.mk as followed:
$ nano config.mkEdit the arm_toolchain variable to point to the Arm toolchain installed in previous step
In our example:
# Specify the arm toolchain to use (leave it blank if already set in your PATH)
arm_toolchain=/home/gwendal/gcc-arm-none-eabi-7-2017-q4-major/bin/Copy the binaries you received from Wirepas into image folder
$ make app_name=<app_name> target_board=<target_board>All the built images will be available in folder build/<target_board>/<app_name>/
Those steps must be adapted to your own system and choices. It is also possible to setup it on Windows (with WSL, Cygwin, ...) but not covered in this guide.