2025-01-13 12:01 AM - last edited on 2025-01-13 12:15 AM by Peter BENSCH
Hello everyone,
I'm currently working on a project using STM32Cube.AI with the STM32F746NGHx board. I've encountered an issue where the bsp_ai.h file is not generated after code generation. I'm using an ONNX model for this project.
I've tried reinstalling STM32CubeMX several times, but the problem persists. Has anyone experienced a similar issue, or does anyone have suggestions on how to resolve this?
Any help would be greatly appreciated!
error: '../X-CUBE-AI/App/ai_device_adaptor.h:384:10: fatal error: bsp_ai.h: No such file or directory'
Thank you!
2025-01-13 01:08 AM
Hello @mkothuri ,
To generate the bsp_ai.h you need to configure the platform setting in cubeAI:
In the example below I enable UART4 and then selected it in cubeAI:
Have a good day,
Julian
2025-01-13 02:25 AM
Hey Julian, Thanks for your reply.
I'm receiving an error indicating that 'stm32f7xx.h' is missing. Here are the steps I've followed so far:
Have I missed any steps that might be causing this issue? How can I resolve the missing header file error?
I have an ONNX file that I need to validate on my target STM32 device. I'm using a fully connected model and need some guidance on the following:
Any advice or examples would be greatly appreciated!
2025-01-13 05:16 AM
Hello,
You can validate your model directly in cubeMX by importing files with "Validation inputs" and "validation outputs".
I don't remember the format of files, but it is either .csv or npy/npz (or both).
Then you can obtain metrics by validating the model on desktop (x86 C code of your model converted) or on target (Arm C code of your converted model).
You will see most likely see differences in the metrics. The way the code is working is linked to the architecture (x86 or Arm). So, it is normal, and you will need to adapt your work to have a model that work fine on your target. It is part of the process.
This documentation is useful: https://www.st.com/resource/en/user_manual/dm00570145-getting-started-with-x-cube-ai-expansion-package-for-artificial-intelligence-ai-stmicroelectronics.pdf
You will find information about validation around page 30 but feel free to look at the part before as they could help you.
About the stm32h7xx.h, I don't know. Do you have an error when compiling? I am not very knowledgeable about general embedded development. Maybe you can ask here: https://community.st.com/t5/stm32-mcus-software-development/ct-p/mcu-software-development-tools
Have a good day,
Julian