Installation on Ubuntu
The following article will guide you through the CHESTER SDK installation on Ubuntu. It has been tested on versions Ubuntu 22.04 LTS.
Before you begin, make sure you comply with the article Requirements.
Installation Steps
The installation steps are split into multiple sections. In the end, you will be able to build the blinky
sample from the CHESTER SDK.
Update Your System
Open the Terminal application.
Update the package lists:
sudo apt update
Upgrade the packages:
sudo apt upgrade
Reboot the system:
sudo reboot
Set Up Device Rules
Open the Terminal application.
Get the package with the udev rules:
wget https://github.com/NordicSemiconductor/nrf-udev/releases/download/v1.0.1/nrf-udev_1.0.1-all.deb
Install the package with the udev rules:
sudo dpkg -i nrf-udev_1.0.1-all.deb
Remove the package with the udev rules:
rm nrf-udev_1.0.1-all.deb
Install Packages
Install the following APT packages:
sudo apt install --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
Install the python3-venv package:
sudo apt install python3-venv
Install Toolchain
Create a target directory for the toolchain:
mkdir -p $HOME/.local/opt
Download and unpack the toolchain:
wget -c https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.1/zephyr-sdk-0.16.1_linux-x86_64.tar.xz -O - | xz -d -c - | tar xv -C $HOME/.local/opt
Run the Zephyr SDK bundle setup script:
$HOME/.local/opt/zephyr-sdk-0.16.1/setup.sh
Create Application
Create the directory for your application and switch to it:
mkdir chester-app && cd chester-app
tipChange the parameter
chester-app
to any desired name for your project directory.Initialize the Python virtual environment:
python3 -m venv .venv
Activate the Python virtual environment:
source .venv/bin/activate
cautionWhen you close the shell (or your text editor with the integrated terminal), you must reactivate the virtual Python environment. Call this command (used in the procedure above):
source .venv/bin/activate
. In the future, you may have various West workspaces with different versions of the Python packages, and thanks to the virtual environment concept, these will not suffer from version conflicts.Upgrade the pip package:
pip install --upgrade pip
Install the West tool:
pip install west
Initialize the West workspace where you want to start your project:
west init -m https://github.com/hardwario/chester-skeleton.git --manifest-rev main
Set the default board to CHESTER (nRF52840):
west config build.board chester_nrf52840
Synchronize the West workspace:
west update
Export Zephyr environment:
west zephyr-export
Install the Python dependencies:
pip install -r zephyr/scripts/requirements.txt
pip install -r nrf/scripts/requirements.txt
pip install -r bootloader/mcuboot/scripts/requirements.txt
pip install -r chester/scripts/requirements.txt
cautionAt the end of the installation process, you will see this "error" message:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. pyocd 0.35.1 requires pylink-square<2.0,>=1.0, but you have pylink-square 0.12.0 which is incompatible.
It can be considered as a warning only, and it is safe to ignore it.
Test Build and Flash
Go to the
blinky
sample directory:cd chester/samples/blinky
Check that you can build the sample:
west build
The final build result should look like this:
Memory region Used Size Region Size %age Used
FLASH: 112320 B 1 MB 10.71%
SRAM: 60576 B 256 KB 23.11%
IDT_LIST: 0 GB 2 KB 0.00%If your CHESTER APP/BLE is connected with J-Link. Drivers are installed and power is on, you can flash compiled blinky code by typing
west flash