cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment of a Neural Network from MATLAB and ST Edge AI Developer Cloud to LSM6DSV16IS

mariagragna
Associate

I am trying to implement a neural network on the LSM6DSV16IS IMU using an X-NUCLEO-IKS01A1 board.

The neural network was trained and exported from MATLAB in ONNX format. Subsequently, the model was quantized using ST Edge AI Developer Cloud, and I downloaded the generated library for the IMU.

I referred to the following tutorials as guidelines:

  1. How to implement a neural network on LSM6DSO16IS and ISM330IS
  2. ST MEMS ISPU GitHub repository

However, I encountered some differences in my case and decided to download the template (I tried both template and template_stedgeai).

I modified the main.c file in inspu/src/main.c, but it fails to compile. On the other hand, when I try to compile the file in inspu_stedgeai/src/main.c, the console outputs: "Nothing to build for project ispu_stedgeai".

At this point, I am unsure how to proceed.

My main questions are:

  1. Is it possible to use ST Edge AI Developer Cloud to directly obtain the three folders (lib, inc and src) that can be integrated into the project in STM32CubeIDE?
  2. How can I generate the UCF file required for the implementation?

Thank you in advance for your support.


2 REPLIES 2
mariagragna
Associate

Quick update:
I managed to compile the project successfully using the ISPU toolchain from the command line. However, I am still encountering the same issue in STM32CubeIDE, where the console outputs: "Nothing to build for project ispu_stedgeai" (or the other projects).

Federica Bossi
ST Employee

Hi @mariagragna ,

You can use the developer cloud. At the last step of “Generate,” you need to click on “Download,” after selecting ISPU as the “CPU” and LSM6DSO16IS as the “board,” as per the screenshot below:

FedericaBossi_0-1737035627364.png

Then you get a zipper with three folders (inc, src, lib), which must then copy into the template's “ispu” folder.

As a template, we suggest you use the specific template for ST Edge AI.

The UCF is achieved by doing the project build via Makefile or via IDE (the two ways he is trying), after adding the network files generated by ST Edge AI and after completing the main.c properly for handling the network inputs and outputs (as explained in the template readme and tutorial).

For the specific problem you see on STM32CubeIDE, it could be that you are importing the project with the option to copy it to the workspace, which unfortunately does not work, because Eclipse is not able to handle the path change for source files.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.