cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 Model Zoo deployment fails on NUCLEO-N657X0-Q - signed binary not booting

Balo_1
Visitor

Hello,

I am trying to deploy a custom image classification model (bacteria classification) on the NUCLEO-N657X0-Q board using the STM32 AI Model Zoo v4.0.0 deployment pipeline.

What works:

  • The pre-built flower classification hex from Binary/NUCLEO-N657X0-Q/USB-UVC-Display/NUCLEO-N657X0-Q_GettingStarted_ImageClassification-uvc.hex works perfectly — camera streams via USB UVC and classification is displayed
  • Training a custom EfficientNetV2-B0 model (128×128 input, 5 classes) completes successfully with 100% validation accuracy
  • Quantization (ONNX PTQ uint8) completes successfully
  • The Model Zoo deployment script (operation_mode: deployment) successfully:
    • Compiles the model via ST Edge AI Developer Cloud
    • Generates C code and libraries
    • Builds the STM32CubeIDE project (UVCL_ModelZoo configuration)
    • Signs the binary using STM32_SigningTool_CLI

What does NOT work:

After flashing the generated files to the board, the firmware does not boot — no serial output (tested at 115200 and 921600 baud), no USB UVC camera device appears in Windows Device Manager.

Files flashed (via STM32CubeProgrammer GUI):

  1. FSBL/ai_fsbl.hex (hex file, address embedded)
  2. UVCL_ModelZoo/NUCLEO-N657X0-Q_GettingStarted_ImageClassification_signed.bin at 0x70100000
  3. UVCL_ModelZoo/ecblob.bin at 0x71380000
  4. Model/NUCLEO-N657X0-Q/network_atonbuf.xSPI2.bin at 0x70380000

Diagnostic test:

  • Flashing the original flower hex → works
  • Flashing the original flower hex + only replacing network_atonbuf.xSPI2.bin at 0x70380000 with my custom model → camera starts but shows "rose 0%" (expected - topology mismatch)
  • Flashing the original flower hex + replacing signed app at 0x70100000 with my custom signed binary → board does not boot

This confirms the issue is specifically with the signed application binary, not with the model weights or FSBL.

Signing command used:

"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_SigningTool_CLI.exe" -s -bin UVCL_ModelZoo\NUCLEO-N657X0-Q_GettingStarted_ImageClassification_noecblob.bin -nk -t ssbl -hv 2.3 -o UVCL_ModelZoo\NUCLEO-N657X0-Q_GettingStarted_ImageClassification_signed.bin

Output:

[Header v2.3] Do not align the payload to the 0x400 offset, No padding bytes at the beginning of the payload.
Header version 2.3 preparation...
Extracting Entry point value from the input file...
Entry point value : 0x3401e679
The header image file generated successfully

Automated deployment also fails:

When running the deployment with STM32_Programmer_CLI in PATH and board connected, the CLI fails with:

Error: failed to erase memory
Erasing external memory sectors [16 20]

Environment:

  • STM32CubeIDE v1.18.1
  • STM32CubeProgrammer v2.19.0 (with STM32_SigningTool_CLI v2.22.0)
  • STM32 AI Model Zoo v4.0.0
  • Python 3.12.9
  • Board: NUCLEO-N657X0-Q (Rev B)
  • Camera: MB1854B (IMX335)
  • ST-LINK FW: V3J16M7
  • External Loader: MX25UM51245G_STM32N6570-NUCLEO

Questions:

  1. Is the signing command and parameters correct for NUCLEO-N657X0-Q?
  2. Is there a specific FSBL version required that matches the GettingStarted application?
  3. Are the flash addresses correct (0x70100000 for app, 0x71380000 for ecblob, 0x70380000 for network data)?
  4. Is there a known issue with Model Zoo v4.0.0 deployment on NUCLEO-N657X0-Q?

Should I use a different header version (-hv) for the signing?

Configuration files:

bacteria_deploy_n6.yaml:

model:
  model_path: <path_to>/converted_model_quant_qdq_pc.onnx
operation_mode: deployment
dataset:
  dataset_name: custom_dataset
  class_names: [Candida_albicans, Clostridium_perfringens, Escherichia_coli, Lactobacillus_plantarum,      Staphylococcus_aureus]
preprocessing:
  resizing:
    interpolation: bilinear
    aspect_ratio: fit
  color_mode: rgb
tools:
  stedgeai:
    optimization: balanced
    on_cloud: True
    path_to_stedgeai:
    path_to_cubeIDE: C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/stm32cubeide.exe
deployment:
  c_project_path: ../application_code/image_classification/STM32N6/
  IDE: GCC
  verbosity: 1
  hardware_setup:
    serie: STM32N6
    board: NUCLEO-N657X0-Q
    output: UVCL
hydra:
  run:
    dir: ./tf/src/experiments_outputs/${now:%Y_%m_%d_%H_%M_%S}
mlflow:
  uri: ./tf/src/experiments_outputs/mlruns


Thank you for any help!

0 REPLIES 0