Skip to main content
The Edge Impulse Zephyr Module Deployment introduces a new way to integrate your Edge Impulse project and SDK directly into Zephyr Applications, removing manual setup steps and enabling deployment across more than 850 supported hardware targets.
Select Zephyr library in Edge Impulse Deployment tab

Choose Zephyr Library Deployment in Edge Impulse

For more on the Zephyr module system and how it differs from west projects, see the official Zephyr modules documentation By the end of this guide, you will be able to:
  • Set up a Zephyr project with the Edge Impulse SDK as a Zephyr module.
  • Deploy your trained Edge Impulse model as a Zephyr library.
To get started quickly, you can clone and initialize the example standalone inferencing project with the Edge Impulse SDK Zephyr module included, and it will pull in all required dependencies with west (the Zephyr meta-tool):
west init -m https://github.com/edgeimpulse/example-standalone-inferencing-zephyr-module
Your development environment should look similar to this by the end of the guide:
Zephyr Workspace

Edge Impulse Zephyr Module, Workspace and sample project

Deploying to a device will look like this:
west flash
Inference results

Flash with programmer

View inference results:
Inference results

Inference results

Let’s get started.

Prerequisites

Make sure you’ve followed one of the tutorials and have a trained impulse. For the purpose of this tutorial, we’ll assume you trained a Continuous motion recognition model. Also install the following software:
  • Edge Impulse CLI.
  • Choose and set up your Zephyr-compatible hardware. You can find a list of supported boards in the Zephyr documentation.
  • Install Zephyr or Nordic (for nRF based devices) NCS and its dependencies:
    • Zephyr SDK: Follow the Zephyr getting started guide to install the Zephyr SDK and set up your environment. We also recommend following their Blinky tutorial to verify your setup.
    • Nordic NCS : Depending on your target hardware, you may need to install additional toolchains. For Nordic Semiconductor boards, follow the Nordic NCS installation guide.
  • West : West is the meta-tool used to manage Zephyr projects and their dependencies. Install it using pip: pip install -U west
Used versions for the development of the example project are as follows:
  • ZEPHYR_SDK_VERSION =0.17.4
  • west version = “1.5.0”
  • zephyr main repo: v3.7.1

Zephyr Modules

Using the Zephyr module has several benefits over manually copying the C++ library:
  • Automatic updates: Easily update to the latest SDK version with west update.
  • Cleaner integration: No need to manage third-party source code directly.
  • Native Zephyr build support: The SDK is recognized as a standard module within the Zephyr ecosystem.

Edge Impulse Zephyr Module

Whether starting from scratch or adding Edge Impulse to an existing Zephyr app, you can get up and running in minutes.

Deploy your impulse as a Zephyr library

Select Zephyr library in Edge Impulse Deployment tab

Choose Zephyr Library Deployment in Edge Impulse

Head over to your Edge Impulse project,
  1. Go to the Deployment tab.
  2. Select Zephyr Module as the target.
  3. Click Build to generate the library.
This creates a .zip archive containing your impulse and all required libraries.
Zephyr library build options and EON compiler selection

Review Model Settings and Export

This project differs from our example-standalone-inferencing-zephyr because it uses the Edge Impulse SDK Zephyr module and Zephyr library deployment for the model, instead of copying the C++ library export.
However, if you’d like to see complete reference Zephyr examples with full sensor integrations, check out our official Nordic Semiconductor firmware repositories:

Using the Edge Impulse Zephyr module

As we have already Deployed our model as a Zephyr library, we can now use it in our example project or integrate it into our own Zephyr project. To use the Edge Impulse SDK in your own Zephyr project, you need to add it as a module dependency. There are two ways to do this see Integrate into Existing Project below:
  • Standalone Example Project
  • Integrate into existing Zephyr Project
We are going to explain how you can integrate your model with the Edge Impulse SDK Zephyr module in a standalone example project.Navigate to your Zephyr workspace and clone the example project:
# Create a new directory for your Zephyr project Workspace
 mkdir zephyrproject 
 cd zephyrproject 
To set up the project and fetch all required modules, run:
# Initialize west with the example project manifest
west init -m https://github.com/edgeimpulse/example-standalone-inferencing-zephyr-module
cd example-standalone-inferencing-zephyr-module
west update

Add the model to your project

Then you have to add the model to your project.
# Go to the Deployment page of your Edge Impulse project.
# Choose the Zephyr library option.
# Extract the .zip in the parent folder of this project.
mkdir -p ../example-standalone-inferencing-zephyr-module/model
unzip -o ../your_model.zip -d ../example-standalone-inferencing-zephyr-module/model
Your project structure should now look like this:
Model placed in the Zephyr project directory

Place model in the project directory

Test with sample features from the Live classification page

To do this, first head back to the studio and click on the Live classification tab. Then load a validation sample, and click on a row under ‘Detailed result’.

Selecting the row with timestamp '320' under 'Detailed result'.

To verify that the local application classifies the same result, we need the raw features for this timestamp. To do so click on the ‘Copy to clipboard’ button next to ‘Raw features’. This will copy the raw input values from this validation file, before any signal processing or inferencing happened.

Copying the raw features.

Next, update the sample you want to test in main.cpp:
nano src/main.cpp
Paste the copied features into the features array:
static const float features[] = {
    // copy raw features here (for example from the 'Live classification' page)
    // see https://docs.edgeimpulse.com/docs/running-your-impulse-locally-zephyr
};
Adding features and run_classifier() call in main.cpp

Add Test Features in main.cpp

Add the model to your project

This will pull Zephyr and the latest available Edge Impulse SDK.

Compile and flash

Run the following commands to compile and flash your application:
west build output showing Edge Impulse SDK compilation

Build the Zephyr Firmware

Build the project:

Here you can specify the board you want to test by modifying .west/config or by building with west:

Specify the board

cd your_zephyr_project
 nano .west/config
Specify the board you want to test by modifying .west/config Add your board name under the [build] section:
[build]
board = <your_board>

### example boards: 
### Arduino
#board = arduino_nano_33_ble
###STM32 Nucleo U585ZI Q
#board = nucleo_u585zi_q
# Renesas RA6M5 Evaluation Kit
##board 3 ek_ra6m5
## Nordic Thingy:91
## board = thingy91_nrf9160ns
## Nordic nRF9160-DK
## board = nrf9160dk_nrf9160ns
## Nordic Thingy:53
## board = thingy53_nrf5340_cpuapp
## Nordic nRF7002-DK
## board = nrf7002dk_nrf5340_cpuapp
## Arduino Opta
## board = arduino_opta
## Arduino Portenta H7
## board = arduino_portenta_h7_m7
## Arduino Nicla Vision
## board = arduino_nicla_vision
## M5Stack Core2
## board = m5stack_core2
Then build the project with:
west build --pristine
Inference results

Build a clean version

Then flash with:
west flash
Optionally, you can also flash using a programmer specific to your board. For example, with Nordic nRF-based boards, you can use nrfjprog:
west flash --runner nrfjprog
Inference results

Flash with programmer

View inference results:

Inference results

Inference results

You now have standalone inferencing with Edge Impulse on Zephyr!

Next steps

Troubleshooting

If you encounter issues with west or Zephyr, ensure you have the required dependencies installed. You can install them using pip:
pip install -U west
pip install -U -r https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/main/scripts/requirements.txt

Summary

By packaging the Edge Impulse SDK and your model as a Zephyr module, you gain native integration within Zephyr’s build system.
This modular approach makes your firmware easier to maintain, update, and scale across supported boards.
I