2025-06-20 12:37 AM
Hi everyone,
I encountered problems when deploying the neural network using STM32N6570-DK.
I was deploying my model to the STM32N6570-DK development board according to the routine, but found that the code file obtained by optimizing the model using the Stedg-AI web version did not contain the hex file, that is, network_data.hex under the Binary file of any routine folder. Without this file, I cannot complete the deployment of the neural network according to the steps of the routine.
I attempted to solve this problem by downloading the ST EdgeAI software version, but for the downloaded ST EdgeAI Core 2.1.0, I couldn't find its shortcut to open it. I thought it was a version issue and tried to download ST EdgeAI Core 2.0.0, but got stuck at the step of ST Neural-ART package. I clicked on the download link of ST Neural-ART package on the installation interface. However, it returned to the download interface of ST EdgeAI Core. The download resources of the ST Neural-ART package could not be found, so ST EdgeAI Core 2.0.0 could not be installed.
May I ask how I can generate the hex file for the neural network? If it is generated using ST EdgeAI, how should I operate? If there are any other methods, could you introduce them to me? Thank you very much to all those who are willing to help
Solved! Go to Solution.
2025-06-25 1:23 AM - edited 2025-06-25 1:24 AM
Hello @Lipi,
The network_data.hex comes from the network_atonbuf.xSPI2.raw
The .raw file is an intermediate format containing model data, and you need to use the ST Edge AI tools to compile it into a .hex file that's ready to flash onto your STM32 device.
To do so:
you should also add arm-none-eabi-objcopy path to your enviromment variables path. You can find it in your STM32CubeIDE installation folder, which is likely C:/ST/STM32CubeIDE_/STM32CubeIDE/plugins/ com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0 .0.202411081344/tools/bin.
(the 0x71000000 address is the external flash, where model weights should be put most of the time)
In the N6 Ai getting started, you can find documentation about the complete process of replacing a model:
STM32N6-AI - AI software ecosystem for STM32N6 with Neural-ART accelerator - STMicroelectronics
Concerning the stedgeai core 2.0, the npu addon is indeed not available anymore. It is not advised not to use the latest version. If you still wish to install it, you can find it attached
Have a good day,
Julian
2025-06-25 1:23 AM - edited 2025-06-25 1:24 AM
Hello @Lipi,
The network_data.hex comes from the network_atonbuf.xSPI2.raw
The .raw file is an intermediate format containing model data, and you need to use the ST Edge AI tools to compile it into a .hex file that's ready to flash onto your STM32 device.
To do so:
you should also add arm-none-eabi-objcopy path to your enviromment variables path. You can find it in your STM32CubeIDE installation folder, which is likely C:/ST/STM32CubeIDE_/STM32CubeIDE/plugins/ com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0 .0.202411081344/tools/bin.
(the 0x71000000 address is the external flash, where model weights should be put most of the time)
In the N6 Ai getting started, you can find documentation about the complete process of replacing a model:
STM32N6-AI - AI software ecosystem for STM32N6 with Neural-ART accelerator - STMicroelectronics
Concerning the stedgeai core 2.0, the npu addon is indeed not available anymore. It is not advised not to use the latest version. If you still wish to install it, you can find it attached
Have a good day,
Julian
2025-06-26 12:29 AM
Hello Julian
Thank you very much for your help. I have successfully solved this problem.
Have a good day
Lipi
2025-07-05 1:26 AM
Hello @Julian E.
I have encountered problems when generating the application program now.
Previously, when I used the ST Edge AI program (invoked via the command line on the terminal) to generate model weight files (hex files) and files such as network.c and network_ecblobs.h for my model, it simultaneously generated the following files for me (see the pictures in the attachment).
Currently, I only copy network.c and network_ecblobs.h into my project, and then add some files to the Middlewares\ST\AI\Npu\ll_aton folder. Similar to ll_aton_reloc_network.c and ll_aton_reloc_network.h. This Project can be compiled normally. After adding the header to the bin file in the Appli\Debug folder and generating the project-trusted.bin file, network_data.hex and ai_fsbl.hex, and burning them into the stm32n6 development board, it can work normally. However, the effect was very poor. The recognition model I deployed could only identify a few items, and the probability of the neural network output was only around 10%.
I suspect that it might be because I didn't put all the files generated by the STedgeAI tool into the project that the model deployment effect was not good
I tried to put all these files into my project, but it couldn't complete the compilation.The possible errors it might encounter are as follows:
I also tried to use the web version of stedgeai and the X-CUBE-AI tool on stm32cubemxto generate c files, header files, and weight files for my model. I copied all the files generated, including the NPU folder, into the project. However, after the project was deployed to the development board, it did not work. The item labels displayed on the lcd would not change, and the probability was 0.
I feel like I've hit a dead end, but I only have a few days left to complete this project. So I'm in urgent need of your help. If you have time, I sincerely hope you can offer me some advice as soon as possible.Anyway, I'm very grateful for your assistance.
Wish you all the best,
Lipi
2025-07-08 2:15 AM
Hello @Lipi,
I don't know how you created your project, but based on the input/output shape of your model, you seem to do image classification.
I would suggest to either use image classification use case in ST model zoo or use the image classification getting started to use your model.
If you use the model zoo, you should be able to easily generate a project with camera pipeline and LCD display just by configuring a .yaml file and running a python script.
Model zoo install: GitHub - STMicroelectronics/stm32ai-modelzoo-services: AI Model Zoo services for STM32 devices
Model zoo image classification deployment: stm32ai-modelzoo-services/image_classification/deployment/README_STM32N6.md at main · STMicroelectronics/stm32ai-modelzoo-services · GitHub
Getting started image classification (look at the /doc): GitHub - STMicroelectronics/STM32N6-GettingStarted-ImageClassification: An AI software application package demonstrating simple implementation of image classification use case on STM32N6 product.
Have a good day,
Julian