Skip to content

Zephyr#

Setup#

  1. Install Zephyr dependencies: Install Dependencies

  2. Install the Zephyr SDK: Install the Zephyr SDK

  3. Create and activate a Python virtual environment:

python3 -m venv ./venv
source ./venv/bin/activate
  1. Install west and fetch Zephyr sources:
pip install west
west update
pip install -r deps/zephyr/scripts/requirements.txt
west zephyr-export

Building#

Build and run using the native_posix target (emulation):

west build -t run

Build for a specific board:

west build -b qemu_cortex_m3 -p always -t run
west build -b adafruit_feather -p always

The -p always flag cleans the build directory when changing target boards.

Changing the Application#

Set the LF_MAIN CMake variable in CMakeLists.txt or via command line:

west build -b adafruit_feather -p always -- -DLF_MAIN=Blinky

Log Level#

west build -t run -p always -- -DLOG_LEVEL=LF_LOG_LEVEL_DEBUG

Flashing#

west flash

Cleaning#

west clean

Network Channels#

Channel Description
TCP/IP TCP sockets over Ethernet/WiFi