cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 STEdge AI Core CM55 validation missing files

berab
Associate II

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 :))

1 ACCEPTED SOLUTION

Accepted Solutions
hamitiya
ST Employee

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 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
berab
Associate II

I ran the script without --binary and --address options, then network_data* files were generated. There are still missing files.

hamitiya
ST Employee

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 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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_NAME

Best, Beran

hamitiya
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.