Skip to content

Working with Windows Subsystem for Linux

Overview

Some of the LoRaWAN® stacks are developed under Linux. You can easily develop your application under Linux or Mac OS X. On Windows you can use WSL (Windows Subsystem for Linux) to compile. In this setup you can use for favorite IDE (e.g. Eclipse, VS-Code) for editing and use WSL console to compile your code.

Installing WSL

Windows Subsystem for Linux is officially supported by Microsoft to run linux binaries under windows. Check out the WSL Docs, as well as the installation guide.

Throughout this documentation, we are using Ubuntu 22.04.1 LTS distribution which is available from the Windows Store. So go ahead and install WSL and the Ubuntu 22.04.1 LTS distro following the documentation. Reading Best practices for setting up a WSL development environment is also recommended.

Note

This guide has been tested with Ubuntu 22.04.1 LTS. It is possible to use a different distribution, but some steps below might differ.

Once your WSL is up and running, run the following command to update Ubuntu to the latest packages

sudo apt update && sudo apt upgrade

Installing Development Requirements

GCC and tools

To be able to compile Basic MAC and LoRa Basic Modem, you need to install some packages within WSL. These are:

  • GCC for ARM (gcc-arm-none-eabi)
  • Python 3 & pip (python3 python3-pip)
  • make (make)

We also recommend installing git and probably gitk. To install all the above packages, run the following command

sudo apt-get install gcc-arm-none-eabi python3 python3-pip make git

Python libraries

For Basic MAC development, the following python packages are required. Install them by running this command

pip3 install lz4 pycryptodome click intelhex PyYAML

Your WSL development environment is now ready!