Installation on Windows
The following article will guide you through the CHESTER SDK installation on Windows. This guide was tested on Windows versions 10 and 11.
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.
Install Python
You can skip this step if you already have Python installed on your system.
Download the latest stable installer from this link.
Ensure the Windows installer can modify the PATH
variable so the Python executable is available from any location.
Install Package Manager
You can skip this step if you already have Chocolatey installed on your system.
Open the Windows PowerShell application with administrator rights.
infoYou can quickly launch Windows PowerShell as an administrator from the Windows Search bar. In the search bar, type
Windows PowerShell
, right-click the Windows PowerShell app in the search results, and click Run as administrator in the menu.Run this command:
Get-ExecutionPolicy
If the previous command returns
Restricted
, run the following command:Set-ExecutionPolicy AllSigned
infoChoose option
A
when asked.Execute the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Wait a few seconds for the previous command to complete.
You are ready to use Chocolatey if you don't see any errors.
Close the Windows Powershell application.
cautionIt is better to close it now even though we re-open it in the next section. Some important changes are reflected only with the new application session.
Install Packages
Open the Windows PowerShell application with administrator rights.
infoYou can quickly launch Windows PowerShell as an administrator from the Windows Search bar. In the search bar, type
Windows PowerShell
, right-click the Windows PowerShell app in the search results, and click Run as administrator in the menu.Disable global confirmation to avoid having to confirm the installation of individual programs:
choco feature enable -n allowGlobalConfirmation
Install the CMake package:
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
Install the remaining packages:
choco install ninja gperf git dtc-msys2 wget 7zip
Close the Windows Powershell application.
Install Toolchain
Open the Windows PowerShell application with user rights.
Go to your home directory:
Set-Location ~
Download the toolchain:
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.1/zephyr-sdk-0.16.1_windows-x86_64.7z -O zephyr-sdk-0.16.1_windows-x86_64.7z
Unzip the toolchain:
7z x zephyr-sdk-0.16.1_windows-x86_64.7z
Go to the toolchain directory:
cd zephyr-sdk-0.16.1
Run the Zephyr SDK bundle setup script:
.\setup.cmd
tipAnswer
Y
to everything.
Create Application
Create the directory for your application:
mkdir chester-app
tipChange the parameter
chester-app
to any desired name for your project directory.dangerOn the Windows platform, you must use the directory path without any spaces. Also, keep only ASCII letters/digits in the path. Otherwise, you may encounter issues with the toolchain.
Switch to your application directory:
cd chester-app
Initialize the Python virtual environment:
python -m venv .venv
Activate the Python virtual environment:
.\.venv\Scripts\Activate.ps1
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):
.\.venv\Scripts\Activate.ps1
. 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:
python -m 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