Zephyr Project: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
m Brian Wilson moved page Zephyr to Zephyr Project
Brian Wilson (talk | contribs)
mNo edit summary
Line 1: Line 1:
Zephyr is a realtime operating system that runs on small devices such as ESP32, ESP32-C3, RP2040, nRF52840 and so on.
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.
Some of them work with PlatformIO. What does it take to add an unsupported platform to PlatformIO? What does it take to work with Zephyr without PlatformIO? So far that's what I have done anyway. Command line. Not a big deal to me.
 
What does it take to add one, I mean, what is PlatformIO really? :-)


== Windows ==
== Windows ==
Line 53: Line 51:
nrfutil dfu usb-serial -pkg blinky.zip -p COM5
nrfutil dfu usb-serial -pkg blinky.zip -p COM5
</pre>
</pre>
==LVGL==
I have a couple options to me right now, a SeeedStudio Sensecap D1 Indicator and an M5StickC.
A few months ago some change in ESPHome caused the display driver for the M5StickC to quit. It stopped compiling. By now it's probably fixed but I'm thinking it might be fun to start here.
[https://github.com/kartben/artificial-nose Artificial Nose] this is a project that uses a Seed WIO Terminal and LVGL which is my interest here. The Terminal is like a smaller older version of the D1.


==Resources==
==Resources==
https://zephyrproject.org
https://zephyrproject.org

Revision as of 18:44, 7 January 2024

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 an unsupported platform to PlatformIO? What does it take to work with Zephyr without PlatformIO? So far that's what I have done anyway. Command line. Not a big deal to me.

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, if this works, the LED will blink in GREEN instead of RED! Imagine the excitement. The pkg command (step 3 here) issues a big warning about the package being unsigned. I think I can live with that.

nrfutil install nrf5sdk-tools # first time only, to install additional tools
west build -p always -b nrf52840dongle_nrf52840 samples/basic/blinky
nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
       --application build/zephyr/zephyr.hex \
       --application-version 1 blinky.zip
nrfutil dfu usb-serial -pkg blinky.zip -p COM5

LVGL

I have a couple options to me right now, a SeeedStudio Sensecap D1 Indicator and an M5StickC.

A few months ago some change in ESPHome caused the display driver for the M5StickC to quit. It stopped compiling. By now it's probably fixed but I'm thinking it might be fun to start here.

Artificial Nose this is a project that uses a Seed WIO Terminal and LVGL which is my interest here. The Terminal is like a smaller older version of the D1.

Resources

https://zephyrproject.org