cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE: main.h includes "stm32h5xx_hal.h" which doesn't exist

Spectre
Associate II

Hello,


I am currently trying to develop for the STM32H573RIT6 microcontroller, however after generating a new project I run into an issue where I am unable to compile any code due to main.h attempting to include "stm32h5xx_hal.h", but it fails to compile as it fails to locate that file. The only file that I was able to locate was "stm32h5xx_hal_conf.h", but replacing that in the "main.h" file still fails to compile as it cannot find "stm32h5xx_hal_spi.h" and "stm32h5xx_hal_gpio.h". system_stm32h5xx.c also attempts to include the "stm325xx_hal.h" file as well and as a result errors.

Spectre_0-1753144248504.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Spectre ,

 

I tried to reproduce your behavior, and I was not able to generate the code. Knowing that I am using STM32CubeMX 6.14.1.

MahmoudBenRomdhane_0-1753178114206.png

After investigation, I found a mismatch and contradiction between the MCU reference (Mcu.Name=STM32H573RITx) and the Firmware Package (STM32Cube FW_H7 V1.12.1) by opening the Ioc.File with Note Pad.

I imported the same configurations through a new Ioc and the project build was finished with 0 errors.

I will be waiting for your feedback.

 

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.

View solution in original post

6 REPLIES 6
TDK
Super User

Works fine here. Include the IOC file that generates the faulty code.

TDK_0-1753155379187.png

 

If you feel a post has answered your question, please click "Accept as Solution".
Spectre
Associate II

@TDK Attached should be the .ioc file that generated this code. Thanks for your help so far.

Mahmoud Ben Romdhane
ST Employee

Hello @Spectre ,

 

First let me thank you for posting and welcome to the ST Community.

For more investigation, I suggest that you provide your Ioc.File.

 

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.

In my reply to @TDK, I provided my .ioc file. If you cannot access it please let me know and I will upload it again.

Hello @Spectre ,

 

I tried to reproduce your behavior, and I was not able to generate the code. Knowing that I am using STM32CubeMX 6.14.1.

MahmoudBenRomdhane_0-1753178114206.png

After investigation, I found a mismatch and contradiction between the MCU reference (Mcu.Name=STM32H573RITx) and the Firmware Package (STM32Cube FW_H7 V1.12.1) by opening the Ioc.File with Note Pad.

I imported the same configurations through a new Ioc and the project build was finished with 0 errors.

I will be waiting for your feedback.

 

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.

It seemed like there were some firmware packages that were not finished being installed which caused the errors. Signing back into myST and then redownloading the packages and creating a new project ioc file fixed the issue like you said, Mahmoud. Thanks both @TDK and @Mahmoud Ben Romdhane for your guy's help.