Zephyr Project

From Wildsong
Jump to navigationJump to search

Zephyr is a realtime operating system that runs on small devices such as ESP32, ESP32-C3, RP2040, nRF52840 and so on.

Some of them work with PlatformIO.

What does it take to add one, I mean, what is PlatformIO really? :-)

Windows

I installed Zephyr on Pearl so that I could work while on vacation later this month. I used a conda environment and so far it seems okay.

Initial set up for Windows

I did set up some tools with chocolatey, I have not documented that here.

conda create --name=zephyrproject python=3.11.5
conda activate zephyrproject
cd zephyrproject
pip install west
mkdir zephyrproject
cd zephyrproject
west init
west update
west zephyr-export
pip install -r ~/zephyrproject/zephyr/scripts/requirements.txt

Install tool chains

cd ~
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.4/zephyr-sdk-0.16.4_windows-x86_64.7z
7z x zephyr-sdk-0.16.4_windows-x86_64.7z
cd zephyr-sdk-0.16.4
./setup.cmd

Getting started

https://docs.zephyrproject.org/latest/develop/getting_started/index.html

Build a binary to blink the dev board's LED.

west build -p always -b <your-board-name> samples/basic/blinky
west flash

For example for the m5stickc (they only have the "plus" model listed, see "west boards| grep m5".

west build -p always -b m5stickc_plus samples/basic/blinky

or the nRF52840, use this for the full development kit,

west build -p always -b nrf21540dk_nrf52840 samples/basic/blinky

or this for the dongle version,

west build -p always -b nrf52840dongle_nrf52840 samples/basic/blinky

Resources

https://zephyrproject.org