2026-02-20 5:58 PM - edited 2026-02-22 11:06 AM
Hi all,
I was following this guide for CM55 validation, yet when I run
stedgeai generate -m <model-file> --target stm32n6 --binary --address 0x71000000 --memory-pool ./mypool_N6.json
It does compile, but at the end, I have several files missing, such as network_config.h, network_data*, and network_data_params*.
This is the output I am getting.
I'd be glad if anyone has any idea how to fix it. Thanks :))
Solved! Go to Solution.
2026-02-23 6:24 AM
Hello @berab
The files you are looking for are only available if you work with `legacy` api.
Please, could you retry with this command:
stedgeai generate -m <model-file> --target stm32n6 --c-api legacy --binary --address 0x71000000 --memory-pool ./mypool_N6.json
Best regards,
Yanis
2026-02-22 11:46 AM - edited 2026-02-22 12:16 PM
I ran the script without --binary and --address options, then network_data* files were generated. There are still missing files.
2026-02-23 6:24 AM
Hello @berab
The files you are looking for are only available if you work with `legacy` api.
Please, could you retry with this command:
stedgeai generate -m <model-file> --target stm32n6 --c-api legacy --binary --address 0x71000000 --memory-pool ./mypool_N6.json
Best regards,
Yanis
2026-02-23 7:21 AM - edited 2026-02-23 7:22 AM
Hi @hamitiya,
Thanks for the help. This generates these legacy files. The point is, I wasn't trying to run it in the legacy api. Yet, those files are included in CM55_Validation/armgcc/Makefile. Apparently, I can just remove the inclusion of network_data_params.c, and it compiles fine.
Yet, it seems I have to run stedgeai in legacy api mode anyway, since if I don't, i.e., if I run:
stedgeai generate -m mymodel.onnx --target stm32n6 --memory-pool ./mypool_N6.json
I still get a compilation error due to some undeclared definitions in app_x-cube-ai.h, such as:
../../../Applications/CM55_Validation/X-CUBE-AI/App/app_x-cube-ai.c:75:31: error: 'AI_NETWORK_MODEL_NAME' undeclared here (not in a function); did you mean 'STAI_NETWORK_MODEL_NAME'?
75 | .name = (const char *)AI_NETWORK_MODEL_NAME,
| ^~~~~~~~~~~~~~~~~~~~~
| STAI_NETWORK_MODEL_NAMEBest, Beran
2026-02-23 8:09 AM
Actually, it is a limitation of ST Edge AI Core.
For the option provided by this example, you need to force --c-api legacy.
Prior to 3.0, it was still the default option, since then, the default API is "ST-AI".
app_x-cube-ai is the application starter containing model declaration and it follows now the new API...
Since the tutorial is about CM55 Validation for STM32N6 Series, I would suggest you try STM32Cube AI Studio to generate a complete project
STM32Cube AI Studio- The next-gen stand-alone tool for embedded AI - STMicroelectronics
It will generate app_x-cube-ai.c for you and execute on target if any.
Best regards,
Yanis