cancel
Showing results for 
Search instead for 
Did you mean: 

Missing bsp_ai.h File in STM32Cube.AI Project for STM32F746NGHx

mkothuri
Visitor

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!

3 REPLIES 3
Julian E.
ST Employee

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:

JulianE_0-1736759245693.png

 

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.
mkothuri
Visitor

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:

  1. Enabled the X-CUBE-AI extension.
  2. Enabled UART4.
  3. 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:

  1. Input Feeding: How can I provide different inputs to the model for validation?
  2. Performance Measurement: How can I measure the number of cycles taken for each input during validation?

Any advice or examples would be greatly appreciated!



Hello,

 

JulianE_0-1736773729349.png

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.