Zephyr Project: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
Line 45: Line 45:


or this for the dongle version,
or this for the dongle version,
west build -p always -b nrf52840dongle_nrf52840 samples/basic/blinky
<pre>
nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
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 build/zephyr/zephyr.hex \
       --application-version 1 blinky.zip
       --application-version 1 blinky.zip
nrfutil dfu usb-serial -pkg blinky.zip -p COM4
nrfutil dfu usb-serial -pkg blinky.zip -p COM4
</pre>


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

Revision as of 06:35, 3 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 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,

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 COM4

Resources

https://zephyrproject.org