2025-01-30 5:50 AM - edited 2025-01-30 6:04 AM
Hello,
I need guidance to create a very simple AI project using CubeIDE (CubeMX) and Neural-ART runtime. I can use all the example projects successfully but failed to create one from scratch till now. I faced no challenge earlier when using H7 for my AI projects.
I am using STM32N6570-DK. I tried using different ways, but I either got strange compilation/linking errors or got stuck in the neverending "Generating code" screen.
Anyway, my latest attempt is as follows:
Errors and warnings:
RIF-related error/warning in app_x-cube-ai.c.
./X-CUBE-AI/App/app_x-cube-ai.c: In function 'MX_X_CUBE_AI_Init':
../X-CUBE-AI/App/app_x-cube-ai.c:100:5: warning: implicit declaration of function 'HAL_RIF_RISC_SetSlaveSecureAttributes' [-Wimplicit-function-declaration]
100 | HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_NPU, RIF_ATTRIBUTE_PRIV | RIF_ATTRIBUTE_SEC);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../X-CUBE-AI/App/app_x-cube-ai.c:100:43: error: 'RIF_RISC_PERIPH_INDEX_NPU' undeclared (first use in this function)
100 | HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_NPU, RIF_ATTRIBUTE_PRIV | RIF_ATTRIBUTE_SEC);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../X-CUBE-AI/App/app_x-cube-ai.c:100:43: note: each undeclared identifier is reported only once for each function it appears in
../X-CUBE-AI/App/app_x-cube-ai.c:100:70: error: 'RIF_ATTRIBUTE_PRIV' undeclared (first use in this function)
100 | HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_NPU, RIF_ATTRIBUTE_PRIV | RIF_ATTRIBUTE_SEC);
| ^~~~~~~~~~~~~~~~~~
../X-CUBE-AI/App/app_x-cube-ai.c:100:91: error: 'RIF_ATTRIBUTE_SEC' undeclared (first use in this function)
100 | HAL_RIF_RISC_SetSlaveSecureAttributes(RIF_RISC_PERIPH_INDEX_NPU, RIF_ATTRIBUTE_PRIV | RIF_ATTRIBUTE_SEC);
| ^~~~~~~~~~~~~~~~~
NOTE:
This is just one of my many attempts to create a simple FSBL code to use the NPU. If I do not use "X-CUBE-AI template application", then I am getting XSPI-related errors and warnings.
I'd highly appreciate a very basic guide to creating a simple application using CubeIDE, X-XUBE-AI, and NPU.
I am also sharing my last attempt project code in zipped format.
Solved! Go to Solution.
2025-03-14 6:06 AM
First let me thank you for posting.
The same topic was discussed through this ST Post.
The issue has been confirmed and reported to STM32CubeMX development team.
Internal ticket number: 205390 (This is an internal tracking number and is not accessible or usable by customer).
Thanks.
Mahmoud
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.
2025-02-05 12:06 AM
Hi,
Seems to be solved about the same or similar issue, how about using my project files ?
I created the code with CubeMx and built in CubeIDE.
hope to be done well for you.
https://drive.google.com/file/d/1etH_FyRxUyEPAl92u3qWFnIFeYOpCEMq/view?usp=drive_link
have a good day.
thanks.
2025-02-05 12:12 AM
Hello @edmond yun ,
Thank you very much for your contribution. Is that possible to compress your project and attach it to the conversation.
Thanks
2025-03-10 6:20 AM
Hello
I have the same problem. I am working with a NUCLEO-N657X0-Q board. I am trying to run a simple CNN saved as TFLite. I tryed to adjust the .ioc file under security/RIF but after that even more errors occured.
Does someone already know the problem?
2025-03-14 6:06 AM
First let me thank you for posting.
The same topic was discussed through this ST Post.
The issue has been confirmed and reported to STM32CubeMX development team.
Internal ticket number: 205390 (This is an internal tracking number and is not accessible or usable by customer).
Thanks.
Mahmoud
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.