Zephyr

boards Arduino Zero BBC micro bit Decawave DWM1001 Nordic nRF52840DK Nordic nRF52DK ST B-L072Z-LRWAN1 ST B-L475E-IOT01A

Description

The Zephyr Project, a Linux Foundation hosted Collaboration Project, is an open source collaborative effort uniting leaders from across the industry to build a best-in-breed small, scalable, real-time operating system (RTOS) optimized for resource-constrained devices, across multiple architectures.

See Zephyr Getting Started on the Zephyr project website.

Use Zephyr on IoT-LAB

Get Zephyr

The Zephyr west meta-tool is already installed on the SSH frontend, use it to initialize the zephyrproject workspace:

ssh <login>@saclay.iot-lab.info
<login>@saclay~$ west init ~/zephyrproject
<login>@saclay~$ cd ~/zephyrproject
<login>@saclay:~/zephyrproject$ west update cmsis hal_nordic hal_stm32 hal_atmel
<login>@saclay:~/zephyrproject$ west zephyr-export

This step is the same as the Get Zephyr step of the Zephyr Getting started documentation page.

Build a Zephyr firmware

Now that everything is in place, let’s build a hello_world firmware. This firmware is based on the sample provided in zephyrproject/zephyr/samples/hello_world. The sample will be built for the nRF52DK node, which corresponds to the board nrf52dk_nrf52832 in Zephyr. The west meta-tool can also be used to build this application:

<login>@saclay:~/zephyrproject$ cd zephyr
<login>@saclay:~/zephyrproject/zephyr$ west build -p auto -b nrf52dk_nrf52832 samples/hello_world

The generated firmware is located in the ~/zephyrproject/zephyr/build/zephyr directory:

<login>@saclay:~/zephyrproject/zephyr$ ls build/zephyr/zephyr.{hex,bin,elf}
build/zephyr/zephyr.bin  build/zephyr/zephyr.elf  build/zephyr/zephyr.hex

Use the *.elf or *.bin file to flash the nodes using the IoT-LAB tools (webportal or cli-tools).

IoT-LAB/Zephyr board name mapping

Board name IoT-LAB ID Zephyr name
nRF52DK nrf52dk nrf52dk_nrf52832
nRF52840DK nrf52840dk nrf52840dk_nrf52840
nRF52832-MDK nrf52832-mdk nrf52832_mdk
nRF52840-MDK nrf52840-mdk nrf52840_mdk
nRF51DK nrf51dk nrf51dk_nrf51422
BBC micro:bit microbit bbc_microbit
NXP FRDM-KW41Z frdm-kw41z frdm_kw41z
Arduino Zero arduino-zero arduino_zero
ST B-L072Z-LRWAN1 st-lrwan1 b_l072z_lrwan1
ST B-L475E-IOT01A st-iotnode disco_l475_iot1
Decawave DWM1001 dwm1001 decawave_dwm1001_dev