Missing bsp_ai.h File in STM32Cube.AI Project for STM32F746NGHx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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!
Solved! Go to Solution.
- Labels:
-
STM32CubeAI
-
STM32F7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-13 1: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
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-13 1: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
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-13 2: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:
- Enabled the X-CUBE-AI extension.
- Enabled UART4.
- Selected CRC in computing.
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:
- Input Feeding: How can I provide different inputs to the model for validation?
- Performance Measurement: How can I measure the number of cycles taken for each input during validation?
Any advice or examples would be greatly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-13 5: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
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.
