If you’re getting started with the new STM32N6 series and want to explore its edge AI capabilities, ST EdgeAI-Core is the tool you’ll need to compile and optimize neural network models for the STM32N6570-DK. In this guide, you’ll learn how to install ST EdgeAI-Core on Ubuntu 24.04, download the official AI demo models, compile and deploy the Image Classification demo to the STM32N6570-DK Discovery Kit.
What You Will Learn
- How to install ST EdgeAI-Core on Ubuntu 24.04
- How to download the official STM32 AI demo models
- How to compile and deploy the Image Classification demo to the STM32N6570-DK
Requirements
- Computer with Ubuntu 24.04 LTS
- STM32N6570-DK Discovery Kit
- USB-C cable
- Internet connection
- STM32CubeIDE installed – See installation guide
- STM32CubeProgrammer installed – See installation guide
- Basic familiarity with the Linux terminal
You can find the video version of this tutorial below:
How to install ST EdgeAI-Core on Ubuntu 24.04
ST EdgeAI-Core provides the complete toolchain required to compile, optimize, and profile AI models for the STM32N6 platform. To get started, visit the official ST page and download the Linux installer for ST EdgeAI-Core:
https://www.st.com/en/development-tools/stedgeai-core.html

After downloading, you should see a file named stedgeai-lin.zip. Next, open a terminal, navigate to your download directory, and run the following commands to extract the installer and launch it:
unzip stedgeai-lin.zip
./stedgeai-linux-onlineinstaller
The installer will guide you through the installation options. When prompted to select components, choose the latest version of the software — in this case, ST EdgeAI-Core 2.2.0:

The installation requires up to 4.91 GB of storage and typically takes a few minutes to complete. By default, the installer sets up the files with root ownership, which can cause permission issues when using ST EdgeAI-Core. You can prevent these issues by changing the ownership to your user with the following command:
sudo chown -R $USER:$USER /opt/ST/STEdgeAI
By default, the ST EdgeAI-Core binaries are installed in a location that is not included in your PATH environment variable, so you’ll need to add it in order to use the tools:
export PATH=$PATH:/opt/ST/STEdgeAI/2.2/Utilities/linux
To add the ST EdgeAI-Core binaries to your PATH permanently — so you don’t have to run the export command in every new terminal — use the following command (assuming Bash is your default shell):
echo 'export PATH=$PATH:/opt/ST/STEdgeAI/2.2/Utilities/linux' >> ~/.bashrc
Now you can verify that ST EdgeAI-Core was installed successfully by running the following command:
stedgeai --version
The expected output should look like this:
ST Edge AI Core v2.2.0-20266 2adc00962
ISPU 1.2.1-RC1
MLC 1.2.1-RC1
STM32CubeAI 10.2.0-RC1
STM32MP2 2.2.0-RC1
Now that ST EdgeAI-Core is installed and verified, the next step is to download the official STM32 demo models so you can start experimenting with AI applications on your STM32N6570-DK.
How to get the STM32 Demo Models
Clone the official STM32 AI demo models by running the following command in your terminal:
git clone https://github.com/STMicroelectronics/stm32ai-modelzoo-services.git
Define an environment variable pointing to the directory containing the cloned models. We will use this path later:
export STM32_ZOO=`realpath stm32ai-modelzoo-services`
Navigate to the Image Classification Model directory:
cd $STM32_ZOO/application_code/image_classification/STM32N6/Model
In that directory, you should see the efficientnet_v2B1_240_fft_qdq_int8.onnx model, which we will use for conversion in the next section.
How to Convert the Image Classification Model to Run on the STM32N6570-DK
Now that you have the demo model, the next step is to convert it into a format that can run efficiently on the STM32N6570-DK’s NPU using the ST EdgeAI-Core toolchain.
Run the following command to convert the model. Make sure you are in the directory where the efficientnet_v2B1_240_fft_qdq_int8.onnx file is located:
stedgeai generate --model efficientnet_v2B1_240_fft_qdq_int8.onnx --target stm32n6 --st-neural-art default@user_neuralart_STM32N6570-DK.json --input-data-type uint8 --output-data-type float32 --inputs-ch-position chlast
If the command runs successfully, you will see a new directory named st_ai_output containing the following files:
efficientnet_v2B1_240_fft_qdq_int8_OE_3_3_0.onnx
efficientnet_v2B1_240_fft_qdq_int8_OE_3_3_0_Q.json
LICENSE.txt
network_atonbuf.xSPI2.raw
network.c
network_c_info.json
network_ecblobs.h
network_generate_report.txt
network.h
The model conversion is now complete. In the next section, you’ll learn how to deploy it to the STM32N6570-DK.
How to Deploy the Image Classification Model to the STM32N6570-DK
Before running the model, two steps remain: deploying the Image Classification model to the STM32N6570-DK’s NPU and installing the application that will use it into the external flash.
To deploy the model to the NPU, we first need to convert the compiled firmware into a .hex file. To do this, install the binutils package using the following command:
sudo apt install binutils-arm-none-eabi
With your terminal opened in the st_ai_output directory (where the network_atonbuf.xSPI2.raw file was generated), run the conversion using the following command:
arm-none-eabi-objcopy -I binary network_atonbuf.xSPI2.raw --change-addresses 0x70380000 -O ihex network_data.hex
If the conversion completes successfully, a file named network_data.hex will be generated.
Now we are ready to deploy the model to the NPU. Put the board into developer mode by setting the BOOT1 switch to HIGH:

Connect the STM32N6570-DK to your computer via the USB-C port near the mainboard buttons (STLINK_V3EC). In this guide, we use a USB-C to USB-C cable connected to the laptop’s USB-C port.
Important: The STM32N6570-DK can draw more than 500 mA when the camera module is connected, so ensure your USB port and cable support USB 3.0 or higher.
Then, open STM32CubeProgrammer from the Ubuntu menu. Click the “Connect” button in the right-hand side menu:

Next, click the “External Loaders” (EL) button.

Type STM32N6570-DK in the search field and select the loader named MX66UW1G45G_STM32N6570-DK. Then click the “Erasing & Programming” option:

Once in the “Erasing & Programming” window, click the “Browse” button and navigate to the directory where the network_data.hex file was generated, select it and click “Open”, then click “Start Programming”. After the successful download, you should see a “File download complete” message.

Next, we need to flash the application that uses the model to run the Image Classification demo. For this step, we will use the STM32CubeIDE and STM32CubeProgrammer from command line. Export their binary paths with the following command:
Note: The following command assumes a default installation path (/opt/st) and STM32CubeIDE version 1.19.0. If you installed the tools in a different location or are using another version, adjust the paths accordingly.
export PATH=$PATH:/opt/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin:/opt/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_2.2.200.202505060755/tools/bin/:/opt/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_2.2.200.202503041107/tools/bin/
To add the previous paths to your environment permanently — so you don’t have to run the export command in every new terminal — use the following command (assuming Bash is your default shell):
echo 'export PATH=$PATH:/opt/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin:/opt/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_2.2.200.202505060755/tools/bin/:/opt/st/stm32cubeide_1.19.0/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_2.2.200.202503041107/tools/bin/' >> ~/.bashrc
Now navigate to the application directory and build the project with the following commands:
cd $STM32_ZOO/application_code/image_classification/STM32N6/Application/STM32N6570-DK
make -j8
The next step is to sign the binary so it can be installed in the external flash. Run the signing command as shown below:
STM32_SigningTool_CLI -bin build/Application/STM32N6570-DK/Project.bin -nk -t ssbl -hv 2.3 -o build/Application/STM32N6570-DK/Project_sign.bin
We are now ready to flash the project. Export the path to the STM32CubeProgrammer external loader
export DKEL=$HOME/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr
Close the STM32CubeProgrammer GUI to prevent ST-Link connection issues, then run the following command to flash the board:
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w build/Application/STM32N6570-DK/Project_sign.bin 0x70100000
Once the file has been successfully flashed, you should see the following confirmation message:
File download complete
Time elapsed during download operation: 00:00:04.979
Disconnect the board from the computer and return the BOOT1 switch to its original position (flash mode).

Reconnect the board to power it up and remove the camera lens cap. You should now see the camera feed and the model running in real time. Enjoy experimenting with it, and check back soon for more guides and examples.

Troubleshooting
How to fix the Permission Denied for atonn error?
While running the model conversion with the ST EdgeAI-Core, the following error might occur:
[Errno 13] Permission denied: '/opt/ST/STEdgeAI/2.2/Utilities/linux/atonn'
E103(CliRuntimeError): Error calling the Neural Art compiler - []
This occurs because the ST EdgeAI-Core installer installs the files with root ownership. Run the following command to set the ownership to your user:
sudo chown -R $USER:$USER /opt/ST/STEdgeAI
Then you can re-attempt the model conversion.
How to fix the ST-LINK error (DEV_CONNECT_ERR) error?
- Check that the computer is connected to the board’s USB-C port near the mainboard buttons (STLINK_V3EC).
- Check that the board is in developer mode by setting the BOOT1 switch to HIGH (see Figure 3).
- Make sure no other applications are connected to the board. If the STM32CubeProgrammer GUI is open, close it before attempting to flash again.
