2025-11-15 3:05 AM - last edited on 2025-11-17 7:28 AM by Andrew Neil
Dear ST
| Board | STM32N6570-DK |
| OS | Ubuntu 24.04 LTS |
| Python | Conda, Python 3.10 |
| STM32AI Model Zoo | stm32ai-modelzoo-services/object_detection |
| Operation mode | deployment |
| Model | yolov8n_256_quant_pc_uf_od_coco-person-st.tflite |
| STM32CubeIDE | 1.19.0 |
| ST Edge AI Core / STM32CubeAI | 10.2.0 |
| Local tool | /opt/ST/STEdgeAI/2.2/Utilities/linux/stedgeai |
I am using the STM32AI Model Zoo deployment workflow on Linux to deploy a YOLOv8 object detection model to the STM32N6570-DK.
The deployment pipeline reaches the final flashing stage and aborts because no ST-LINK device is connected, even though all previous steps (Neural-Art, code generation, project patching) completed successfully.
Even when the board is not connected, deployment should still:
Finish building the STM32CubeIDE project
Export the final firmware (network_data.hex / *.bin)
This is necessary for CI pipelines and automated batch deployments.
Because board programming fails due to no ST-LINK detected, the deployment pipeline terminates with an error, and no network_data.hex is produced, even though the Neural-Art and code-gen outputs are valid.
C-project patching is confirmed to be correct:
→ Deployment stops right before final firmware generation.
I manually generate a hex file from network_atonbuf.xSPI2.raw:
Flashing the resulting hex succeeds, but the display stays completely black (no UI, no bounding boxes, no inference output).
This suggests the manual hex only contains the model blob, not the complete firmware built by the deployment process.
Deployment performs more than just packing network_atonbuf.xSPI2.raw:
| AToN compiled blob | ✔ |
| application C patching | ✔ |
| app_config.h update | ✔ |
| complete CubeIDE project rebuild | ✔ |
| UI overlay + inference loop | ✔ |
| ST-LINK programming | should be optional |
Since the deployment aborts before the final firmware build, only the raw model blob is flashed, resulting in a black screen.
How can we complete the deployment and generate the final firmware (.hex/.bin) without connecting the STM32N6570-DK?
Is there a configuration flag available, e.g.:
skip_flasher: true
build_only: true
generate_hex_without_flashing: true
If the current toolchain does not support this yet, what is the recommended CI-friendly workflow for offline firmware generation?
If the intended solution is “build manually in CubeIDE”, could ST provide documentation on how to:
update the project after Neural-Art output
trigger a full firmware rebuild
avoid black-screen output after flashing
2025-11-17 5:25 AM
Hello @Vic_Ch,
Thank you for your detailed post.
It is probably badly explained and not really thought to be used like this, but I think that everything you need in what you describe is present.
First, the firmware modified by model zoo services scripts is this package usable as standalone. If you look at the documentation coming with it, it should solve most of your interrogations:
If we go back to your situation, even if the deployement is not complete, based on what is being done, you should be able to deploy everything by doing the following:
Have a good day,
Julian
2025-11-17 2:42 PM
Hi Julia,
I followed the link below and successfully completed the update using the Prebuilt Binaries approach:
https://github.com/STMicroelectronics/STM32N6-GettingStarted-ObjectDetection?tab=readme-ov-file
Question 1
From the following path:
/stm32ai-modelzoo-services/object_detection/src/experiments_outputs/2025_11_17_21_55_57/generated
Can I directly create STM32N6570-DK/network_data.hex to replace the current model and proceed with flashing?
Question 2
Is it possible to package the model solely using the following shell script?
https://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/application_code/object_detection/STM32N6/Model/generate-n6-model_STM32N6570-DK.sh
Question 3
If I want a single project to include multiple models, is that feasible?
Question 4
Ultimately, I would like to separate model generation and firmware development into two independent workflows (traditional development flow).
Is this achievable?
2025-11-19 4:53 AM - edited 2025-11-19 4:53 AM
Hi @Vic_Ch,
1) I don't remember exactly what is replaced, but yes, it takes files from the experiment_outputs and replace them in the application being flashed. Look at the files date in /application_code to know what is from the default getting started and what was replaced.
2) The getting started application were designed to be use as standalone (manually or with the .sh scripts) or via the model zoo. In the end it is the same thing, so yes, you can just use the shell scripts.
3) yes, you can, I believe that the hand landmark package uses one model for the detection of the hand on the image, then a second one for the landmarks: STM32N6-AI | Software - STMicroelectronics
This document should also be helpful: ST Neural-ART NPU concepts
4) These documents present what to take into considaration, but as long as you have that in mind and keep in mind the memory needed for the activations and weights of the model (result of the generate command, using the st edge ai core), then, yes I think it answers your needs.
STM32N6 Example projects & tips for creating new projects
Session - ST Edge AI Developer Cloud
Have a good day,
Julian
2025-11-19 6:22 AM
Hi Juliae,
I have a question regarding the model flashing result.
I manually converted and flashed the network_data.hex, but the application on the STM32N6570-DK booted to a black screen.
To clarify the situation, I prepared two comparison cases.
Case 1: Customized network_data.hex
I followed the manual flow (model generation, raw to hex conversion, flashing).
The model files were generated using the deployment configuration, and the raw file was converted to hex to replace the default network_data.hex.
The full flashing sequence (FSBL, network_data, application) completed successfully without any error messages.
However, after reboot, the display remained black.
Case 2: Pre-built network_data.hex
The original default network_data.hex was flashed without modification.
Under exactly the same flashing procedure and environment, the application executed normally and the display worked as expected.
Summary of the observation:
Both flashing logs reported successful completion.
The pre-built network_data.hex (about 1.28 MB) works correctly.
The customized network_data.hex (about 2.48 MB) results in a black screen.
This suggests that although the flashing procedure is correct, the format or memory layout of the manually generated network_data.hex may not match what the application expects.
If needed, I can provide additional information such as the generated directory structure, YAML configuration used for model generation, or the xSPI memory address layout.
Let me know what information would be most helpful for further debugging.
2025-11-19 7:34 AM - edited 2025-11-19 7:43 AM
Hello @Vic_Ch,
I think your issue is that you did not edit the app_config.h and postprocessing.
When using model zoo, it is done automatically, but not if you do the manual flow.
If you look at the doc:
You will see that the generation of the hex file is not the only thing to do, then you need to adapt app_config.h for the kind of model you use.
This is probably what explains why the default .hex works and not your .hex. The app_config is aligned with the model used.
When you use the deployment in model zoo, it is done automatically.
I attached the yaml I used to deploy yolov8n_256_quant_pc_uf_od_coco-person-st.tflite and the app_config generated in /application_code
Have a good day,
Julian
2025-11-21 5:29 AM
Hi Juliae,
I have fully grasped the model generation procedure and configuration recommendations you previously shared.
Regarding the deployment_n6_yolov8_config.yaml file from the STMicroelectronics/stm32ai-modelzoo-services project: I have successfully followed this configuration to perform Model Validation, Firmware Flashing, and verify the Demonstration Functionality.
Core Challenge: Manual construction/merging of the final HEX file for flashing. Since my STM32 Application Development Environment is decoupled from the AI Model Training/Conversion Platform, despite deployment_n6_yolov8_config.yaml providing an end-to-end flow, I am encountering difficulties in the phase of Customized Deployment.
My question is: Given the generated Project Compilation Artifacts, is there a feasible method and a set of standard steps to manually link or integrate the independently produced Model Binary (data blob) into the final firmware within the STM32 IDE (e.g., STM32CubeIDE) project?
2025-11-21 6:44 AM
Hello @Vic_Ch,
I am not sure to understand your question.
If you mean that you want to deploy your model without the ST Model Zoo, then you need to follow this:
Basically:
If you want to create your own application and not use the example package we provide, these documents should provide you help:
https://stedgeai-dc.st.com/assets/embedded-docs/stneuralart_stm32n6_projects.html and the hello world application found in local install of the ST Edge AI core
https://stedgeai-dc.st.com/assets/embedded-docs/stneuralart_api_and_stack.html
Have a good day,
Julian