2025-05-19 8:21 PM
Hello,I met these logs when I try to deploy a model on stm32n6d570-dk:
1 physical GPUs, 1 logical GPUs
[INFO] : Setting upper memory limit to 6GBytes on gpu[0]
[INFO] : Running `deployment` operation mode
[INFO] : ClearML config check
[INFO] : The random seed for this simulation is 127
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[INFO] : Generating C header file for Getting Started...
loading model.. model_path="yolov8n_256_quant_pc_uf_od_coco-person-st.tflite"
loading conf file.. "D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
[INFO] : Selected board : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
[INFO] : Compiling the model and generating optimized C code + Lib/Inc files: yolov8n_256_quant_pc_uf_od_coco-person-st.tflite
setting STM.AI tools.. root_dir="", req_version=""
Cube AI Path: "E:\ST\STEdgeAI\2.0\Utilities\windows\stedgeai.exe".
[INFO] : Offline CubeAI used; Selected tools: 10.0.0 (x-cube-ai pack)
loading conf file.. "D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
compiling... "yolov8n_256_quant_pc_uf_od_coco-person-st_tflite" session
model_path : ['yolov8n_256_quant_pc_uf_od_coco-person-st.tflite']
tools : 10.0.0 (x-cube-ai pack)
target : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
options : --st-neural-art default@D:/code/stm32ai-modelzoo-services/application_code/object_detection/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast
"series" value is not coherent.. stm32n6 != stm32n6npu
results -> RAM=1,665,024 IO=196,608:26,880 WEIGHTS=3,051,345 MACC=0 RT_RAM=1,893 RT_FLASH=459,010 LATENCY=0.000
[INFO] : Optimized C code + Lib/Inc files generation done.
[INFO] : Building the STM32 c-project..
deploying the c-project.. "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
updating.. n6 release
-> s:copying file.. "network.c" to D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Model\network.c
-> s:copying file.. "network_ecblobs.h" to D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Model\network_ecblobs.h
-> s:copying file.. "network_atonbuf.xSPI2.raw" to D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Model\network_atonbuf.xSPI2.raw
-> s:removing dir.. D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Middlewares\AI_Runtime\Lib\GCC\ARMCortexM55
-> s:copying dir.. "ARMCortexM55" to D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Middlewares\AI_Runtime\Lib\GCC\ARMCortexM55
-> s:removing dir.. D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Middlewares\AI_Runtime\Inc
-> s:copying dir.. "Inc" to D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Middlewares\AI_Runtime\Inc
-> s:removing dir.. D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Middlewares\AI_Runtime\Npu\ll_aton
-> s:copying dir.. "ll_aton" to D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Middlewares\AI_Runtime\Npu\ll_aton
-> u:copying file.. "app_config.h" to D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\Inc\app_config.h
-> updating cproject file "D:\code\stm32ai-modelzoo-services\application_code\object_detection\STM32N6\STM32CubeIDE" with "NetworkRuntime1000_CM55_GCC.a"
building.. n6 release
flashing.. n6 release STM32N6570-DK
[returned code = 1 - FAILED]
$ cwd: D:/code/stm32ai-modelzoo-services/application_code/object_detection/STM32N6/STM32CubeIDE
$ args: STM32_Programmer_CLI -c port=swd mode=HOTPLUG --extload E:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.0.202409170845\tools\bin\ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr -w ../Model/network_atonbuf.xSPI2.bin 0x70380000
-------------------------------------------------------------------
STM32CubeProgrammer v2.18.0
-------------------------------------------------------------------
ST-LINK error (DEV_CONNECT_ERR)
Board programming failed: "ST-LINK error (DEV_CONNECT_ERR)"
Board programming failed: "ST-LINK error (DEV_CONNECT_ERR)"
[INFO] deployment complete
[INFO] : Please on STM32N6570-DK toggle the boot switches to the left and power cycle the board.
It shows the deployment complete,the development board can run the YOLO model and display the inference speed, but it cannot draw the bounding boxes.I found the same issue here: https://community.st.com/t5/edge-ai/stm32n6570-dk-model-zoo-delpoyment-error/td-p/783126 but I cannot solve this problem like this.
Thanks for help!
Solved! Go to Solution.
2025-05-20 7:44 AM
Hello @wyb217,
The model zoo was updated a few days ago. Are you using its last version? Could you try.
What OS are you using Windows,Linux or Mac?
When you open STM32CubeProgrammer and plug the ST through its ST Link, when you click connect, does it work?
Could you also share your .yaml (in a zip to upload it here) please?
Have a good day.
Julian
2025-05-20 7:44 AM
Hello @wyb217,
The model zoo was updated a few days ago. Are you using its last version? Could you try.
What OS are you using Windows,Linux or Mac?
When you open STM32CubeProgrammer and plug the ST through its ST Link, when you click connect, does it work?
Could you also share your .yaml (in a zip to upload it here) please?
Have a good day.
Julian
2025-05-21 7:28 AM
你好!
2025-05-22 5:00 AM
Thanks very much!I have tried the model zoo -3.1.0 ,but there is the same error. My os is Win11.When I open STM32CubeProgrammer and plug the ST through its ST Link, when I click connect, it works(I’m actually using a USB Type-C cable, but it’s being recognized as an ST-LINK).
And here is my .yaml file :
general:
project_name: COCO_2017_person_Demo
model_type: yolo_v8
#choices=[st_ssd_mobilenet_v1, ssd_mobilenet_v2_fpnlite, tiny_yolo_v2, st_yolo_lc_v1,
# st_yolo_x, yolo_v8, yolo_v5u]
model_path: D:/code/stm32ai-modelzoo-services/object_detection/yolov8n_256_quant_pc_uf_od_coco-person-st.tflite
logs_dir: logs
saved_models_dir: saved_models
gpu_memory_limit: 6
num_threads_tflite: 4
global_seed: 127
operation_mode: deployment
#choices=['training' , 'evaluation', 'deployment', 'quantization', 'benchmarking',
# 'chain_tqeb','chain_tqe','chain_eqe','chain_qb','chain_eqeb','chain_qd ']
dataset:
name: COCO_2017_person
class_names: [person] #Or, classes_file_path
preprocessing:
rescaling: { scale: 1/127.5, offset: -1 }
resizing:
aspect_ratio: fit
interpolation: nearest
color_mode: rgb
postprocessing:
confidence_thresh: 0.6
NMS_thresh: 0.5
IoU_eval_thresh: 0.4
plot_metrics: False # Plot precision versus recall curves. Default is False.
max_detection_boxes: 10
tools:
stedgeai:
version: 10.0.0
optimization: balanced
on_cloud: False
path_to_stedgeai: E:/ST/STEdgeAI/2.0/Utilities/windows/stedgeai.exe
path_to_cubeIDE: E:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/stm32cubeide.exe
deployment:
c_project_path: D:/code/stm32ai-modelzoo-services/application_code/object_detection/STM32N6
IDE: GCC
verbosity: 1
hardware_setup:
serie: STM32N6
board: STM32N6570-DK # NUCLEO-N657X0-Q or STM32N6570-DK
mlflow:
uri: ./src/experiments_outputs/mlruns
hydra:
run:
dir: ./src/experiments_outputs/${now:%Y_%m_%d_%H_%M_%S}
2025-05-22 7:19 PM - edited 2025-05-22 7:58 PM
Hello!I tried to use c-c cable,and it's okay now.But the output says:
Erasing memory corresponding to segment 0:
Erasing external memory sector 0
Error: failed to erase memory
Error: failed to erase memory
Board programming failed: "Error: failed to erase memory"
That's why? I found there is a solution,but is there a solution for automatic way?Thanks!
2025-05-23 6:26 AM - edited 2025-05-23 6:27 AM
Hello @wyb217 ,
In your last message, it is the output of STM32CubeProgrammer right? What did you try to do?
Anyways, the goal of checking to see if you could connect via stm32cubeProgrammer was just to check if the board was functioning well or if you had an issue even doing something as simple as connecting.
I tried to run your exact yaml and I had no issues. I could not reproduce your error.
I saw in another thread a user solving your issue, you may want to try his solution:
Solved: Re: ST-LINK error (DEV_CONNECT_ERR) - STMicroelectronics Community
Make sure to put both pins to the right when flashing the code.
Then, once flashed, put both pins to the left and unplug/plug again the board.
Have a good day,
Julian