IAR Project Connection
IAR developed a tool for external applications to contribute into an IAR Embedded Workbench project. This mechanism is called IAR Project Connection and allows to define a project config in a XML style config file (.ipcf
). IAR Embedded Workbench updates the project dynamically if this file is changed.
Deploy to an IAR Embedded Workbench Library
In the deployment section of Edge Impulse Studio select the IAR deployment option. Depending on your model optimization preferences you can enable the EON compiler and choose between Quantized and Unoptimized data format. Clicking Build will initiate the library build process and, when finished, downloads a zip file containing the library to you computer.IAR Embedded VersionThe library export function for IAR is developed and tested using IAR Embedded Workbench version 9.40. Please contact us if you see issues with older versions of the IAR product.
Import the library into IAR Embedded Workbench
To import the ML model and inference SDK follow these steps:- Place and unzip the downloaded library in the root folder of your project.
- Open your project in IAR Embedded Workbench.
- Open the IAR Project Connection by selecting
Project->Add Project Connection->IAR Project Connection
. - Select the import file from the library folder.
Project configuration for Edge Impulse Inference library
Our pre-processing and neural network code relies on CMSIS DSP and NN algorithms for ARM based processors. CMSIS is therefor included in theedge-impuse-sdk
folder. Multiple instances of the CMSIS library can exist in a single project, but be sure the edge-impulse-sdk
references and links to the included CMSIS library. Safest way would be either to disable CMSIS in your project, or to build the model and inference code as a library and link to that library in your main project.

IAR Disable CMSIS
edge-impulse-sdk
requires the C++ compiler. Check your project settings matches the following image:

IAR Compiler config
ST example project
To get started with Edge Impulse in IAR quickly, we’ve created an example project. This project is based on a STM32F4 Nucleo board and allows running inference over a static buffer. Follow the instructions from the Readme to get started.Standalone example
This standalone example project contains minimal code required to run the imported impulse on a STMicroelectronics MCU. This code is located inei_standalone.cpp
. In this minimal code example, inference is run from a static buffer of input feature data. To verify that our embedded model achieves the exact same results as the model trained in Studio, we want to copy the same input features from Studio into the static buffer in ei_standalone.cpp
.
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'.

Copying the raw features.
ei_standalone.cpp
paste the raw features inside the static const float features[]
definition, for example:
ei_standalone.cpp
to run classification on live data.