Status | Date | Doc Version | Applicable | Confidentiality |
RELEASE | 20 Apr 2025 | v1.9 | Wirepas Mesh v5.x | PUBLIC |
Introduction
In this How To you’ll install Wirepas SDK and build an application using the Docker based build environment.
What you'll learn
- Installing the Wirepas Mesh SDK from Github
- Selecting the right version using Git
- Installing Docker and building an application using the Docker Build environment
What you’ll need
- You need to have a valid Wirepas Mesh license to download the Wirepas Mesh Stack.
- A PC compliant with Docker installation as per requirements available here.
- Access to Wirepas Mesh stack binary. To request access just create a ticket in the Developer Portal following this link and select “Stack Sharefile account request” in Request Type.
- Microsoft Visual Studio Code available here.
This document describes Windows based installation, requirement shall be adjusted to your OS if you use Linux or MacOS
Getting Started
Wirepas SDK is based on GNU ARM toolchain and has a few dependencies to be solved, for stacks versions 5.1, .5.2 and 5.3. Please refer to these dependencies for stack version 5.4 and above.
The Docker build environment allows to have a containerized build environment where all dependencies are solved. It simplifies a lot the environment setup as only Docker dependency needs to be solved. In addition it makes the build environment agnostic of the host OS.
In this How To, we describe the installation on a Windows machine together with Microsoft Visual Studio Code IDE as an example. The same approach can be easily deployed on Linux or MacOS, please refer to Docker website for more details.
Note: Docker is not a mandatory requirement to use Wirepas SDK. Native installation can be also performed. The Docker environment offers a lot of advantages such as OS independence, and tool dependencies already solved.
In the next chapters you will setup and build an application in 5 steps
- Docker & Git installation
- Wirepas SDK installation
- Wirepas Mesh Stack installation
- Build a Wirepas application
- Working with Wirepas SDK using Visual Studio Code
The docker build environment is supported from Wirepas SDK v1.0.2 onward.
Docker Installation
Docker based build environment offers quick and easy way of building the application with Wirepas SDK. Docker can be installed on different operating system.
Please follow the Docker installation for your OS from: https://docs.docker.com/get-docker/.
Make sure you comply with requirements described in the installation procedure. As an example for Windows: https://docs.docker.com/docker-for-windows/install/#what-to-know-before-you-install
git Installation
Download and install the git client from link: https://git-scm.com/downloads. Follow the default installation options.
With the docker build approach, source code will be accessed by Windows native OS but also by Linux from the Docker container. To avoid issues with line endings, it is important to avoid Git changing LF to CRLF for Windows. Otherwise, Docker image will have issues when accessing the code. To avoid such conflicts, core.autocrlf shall be set to input .
Launch git-bash from start menu and run the following command to set the core.autocrlf = Input:
git config --global core.autocrlf input |
In case of any errors while setting core.autocrlf you can:
- Try again but by running git-bash as administrator
- if still not successful manually edit gitconfig file to set: autocrlf = input
Wirepas SDK installation
Wirepas SDK is available from:
- github.com/wirepas/wm-sdk-2_4 for Stack version 5.4 and above for 2.4GHz profile
- github.com/wirepas/wm-sdk for Stack versions 5.1, 5.2 and 5.3 for 2.4GHz profile
Clone the Repository
Launch git-CMD from start menu to clone or pull the latest version of the Wirepas SDK repository using command from the directory where you want to install the SDK:
- For stack version 5.4 and above:
git clone https://github.com/wirepas/wm-sdk-2_4.git |
Change to the directory of the repo you just cloned
cd wm-sdk-2_4 |
Checkout the wanted tagged release in case you don't want to stay on the master branch (currently you are on the master branch). Make sure you checkout the version corresponding to the Wirepas stack release you are using as indicated in the respective Release Note [3] by looking at the SDK release history: https://github.com/wirepas/wm-sdk/releases
git checkout <Tag Version ie: v1.5.4 corresponding to Wirepas Mesh 2.4GHz v5.4.2> |
- For stack version 5.1, 5.2 and 5.3:
git clone https://github.com/wirepas/wm-sdk.git cd wm-sdk it checkout <Tag Version ie: v1.2 corresponding to Wirepas Mesh 2.4GHz v5.2> |
Optionally, create your own branch so you can customize and use version control on it
git branch my-new-branch-name |
Wirepas Mesh Stack Download
You need to have a valid Wirepas Mesh license to download the Wirepas Mesh Stack.
The stack is available from Wirepas Sharefile.
- Go to Wirepas developer portal https://developer.wirepas.com/ and click on the Sharefile link at the top.
- Then navigate to Wirepas Mesh 2.4GHz > V5.x Releases
- Navigate to the folder corresponding to your release version.
- Download the compressed file for your target MCU, you can place multiple images in the folder if you are doing projects using more than one MCU type.
- Extract your binary stack image.
- Copy the Wirepas Mesh stack binaries into the image folder of the SDK.
SDK User Manual is available at:
https://wirepas.github.io/wm-sdk/index.html for stack versions 5.1, 5.2 and 5.3
https://wirepas.github.io/wm-sdk-2_4/index.html for stack versions 5.4 and above
Build an application
Once Docker and SDK folders are ready, follow the below steps to build an application. We describe here how to build the custom_app for a pca10040 board.
- Open terminal (cmd or powershell)
- Use below command to build the application in the terminal (parameter in bold should be configured on your machine). Please note that relative path are not supported.
docker run --rm -v /c/wirepas/wm-sdk:/home/wirepas/wm-sdk -w /home/wirepas/wm-sdk -ti wirepas/sdk-builder:v1.2 make app_name=custom_app target_board=pca10040 |
NOTE: the “--rm“ command line option is used to automatically clean-up the container’s file system after each build.
- The above command uses the application code in the SDK on the local machine to generate the application binary using the docker's build environment. Here are the details of the command format:
- "/c/wirepas/wm-sdk " shall be adapted to point to the location of the Wirepas SDK folder on your local machine.
- "app_name=custom_app" is the pointing to the application code. In the example, custom_app is being compiled."target_board=pca10040" is the selecting the relevant board to compile & build the application code. In example, Pca10040 refers to the nRF52832 board. Modify the config.mk in the application source folder to define the types of boards the application can be built for. The list of the boards and their associated target_name is presented at the end of this chapter.
- “wirepas/sdk-builder:v1.2”: This tag is used to select the proper Docker image and depends on the SDK version in used. Tag is v1.2 for existing versions.
- "/home/wirepas/wm-sdk" is the mounting point of the location folder in Docker and should not be changed
- "make" is the command to compile the application in Docker and should not be changed
- More details on the build command can be found in SDK documentation here.
- At first execution:
- docker will automatically download the proper container from dockerhub.
- You will be prompted to review the license
- You will be prompted to input or generate Bootloader keys.
As example, you can verify that everything works as expected by building a Custom app for pca10040 board based on nRF52832 and checking that .hex files are present in build folder (make sure you have installed the nRF52832 stack binary, otherwise adjust the command to your board):
Note: This How To only focuses on having a functional build environment. You will find in References section links to the next documents.
Compatible boards depends on the SDK version you are using. You can refer to the board directory in the SDK folder to have a list of all boards Wirepas is supporting by default.
Important notice: SDK-Builder is container that provides all compatible tools for building the firmware. Hence, the selected version depends on the SDK and Stack versions used. Please see below a compatibility matrix between SDK version and SDK-Builder version.
| SDK v1.2.X | SDK v1.3.x | SDK v1.4.X | SDK v1.5.1+ |
SDK-Builder Version: | 1.2 | 1.3 | 1.3 | 1.5 |
Clean the build
Use the following command to clean the build:
docker run --rm -v /c/user/admin/wirepas/wm-sdk:/home/wirepas/wm-sdk -w /home/wirepas/wm-sdk -ti wirepas/sdk-builder:v1.2 make app_name=custom_app target_board=pca10040 clean |
Other parameters are the same as for the build command.
The command is executed as previously done, but with additional tag "clean", to clean the earlier build.
NOTE: You need to clean the build if you modify config.mk file, in example to change network parameters.
Create you own application
You can now start to develop your custom application code and follow the above steps to compile and build the application. You can find more details on how to create you own custom application from the following chapter in SDK documentation.
Microsoft Visual Studio Code Example
Wirepas SDK can be used with various IDEs for application development. However the Microsoft Visual Studio Code (VS-Code) is commonly used by Wirepas partners globally.
Here is an example to configure and execute the build task using the VS-code:
- Open Wirepas SDK In VS Code IDE : File -> Open Folder --> Browse to C:\user\admin\wirepas\wm-sdk
- Select (from top bar): Terminal --> New Terminal
- You can then run the same command(s) as in "Build an Application" above to build your project.
Frequently Asked Questions
Q: I would like to use another IDE, how do I do that?
A: The Wirepas SDK relies on Makefiles and uses GCC make. It is completely independent from the IDE. It can be used with IDEs based on developers comfort level. The requirements and dependencies for SDK installation are described in Wirepas Github SDK page. You will need to tell your IDE to use GCC make to compile your project.
Q: Do I need to use Docker?
A: Wirepas provides the build environment as a Docker container for convenience. The Docker environment offers a lot of advantages such as OS independence, and dependencies already solved (available here). You can directly compile your project using Make as long as you have solved the dependencies.
Q: Do I need to use git?
A: No, you can use the zip or tar.gz file from Github releases to download wm-sdk, however using git will make it significantly easier to update your code to the latest Wirepas releases in the future.
The latest release of Wirepas SDK is available from Github. Here the links to access:
github link: https://github.com/wirepas/wm-sdk
You can download the SDK via Git command or via direct download as a zip.
Here is an example to download as a ZIP:
- Go to: https://github.com/wirepas/wm-sdk
- Select the right version by selecting the right Tag (here 1.02)
- Then click on "Code" and "Download ZIP"
References
[1] Wirepas SDK Documentation: https://wirepas.github.io/wm-sdk/
[2] How To Flash Wirepas Application
[3] Wirepas Mesh Stack Release notes
Revision History
Date | Version | Notes |
25 Aug 2020 | v1.0 | Initial Version |
07 Sep 2020 | v1.1 | Updated version with more details |
04 Jan 2021 | v1.2 | Updated version to add docker container’s file system automatic clean-up option |
20 Apr 2021 | v1.3 | Illustrations update |
16 Jun 2021 | v1.4 | Update to support v5.1 release |
13 Jan 2022 | v1.5 | Update SDK builder tag version |
25 Jan 2022 | v1.6 | Minor fixes:
|
22 Jun 2022 | V1.7 | Update stack access request. |
09 Aug 2022 | v1.8 | Updated Naming and What you’ll need section |
20 Apr 2025 | v1.9 | Added Compatibilities for SDK Builder used with Docker. |
Legal Notice
Use of this document is strictly subject to Wirepas’ Terms of Use and Legal Notice.
Copyright © 2025 Wirepas Oy