cancel
Showing results for 
Search instead for 
Did you mean: 

stm32h5xx_hal_usart.h is missing

MikeMcCormack
Associate II

I create a project by selecting the NUCLEO-H563ZI and answer yes to the question about initializing peripherals and the project will not build.  The error is:

 

file included from ../Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_hal.h:29,

from ../Drivers/STM32H5xx_HAL_Driver/Src/stm32h5xx_hal.c:35:

../Core/Inc/stm32h5xx_hal_conf.h:409:11: fatal error: stm32h5xx_hal_usart.h: No such file or directory

409 | #include "stm32h5xx_hal_usart.h"

| ^~~~~~~~~~~~~~~~~~~~~~~

 

The IDE reports itself to be

 

STM32CubeIDE

Version: 1.14.0
Build: 19471_20231121_1200 (UTC)

If I try to read the ioc file and generate code from the STM32CubeMX standalone the problem persists. CubeMX reports itself to be "Version 6.10.0"

I see others have reported similar problems, please provide some suggestions on the fix.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @MikeMcCormack and welcome to the ST Community :smiling_face_with_smiling_eyes:.

This is a confirmed issue on CubeMX and it is internally escalated under ticket number 171330.

(PS: ID 171330 is an internal tracking number and is not accessible or usable by customers).

So, as a workaround until correction on the next releases, i suggest you to comment the "#define HAL_USART_MODULE_ENABLED" if you are not configuring any USART and to comment "#define HAL_UART_MODULE_ENABLED" if you are not using any uart (or USART in asynchrone mode).

Ps: Those defines are on the stm32h5_xx_hal_conf.h file.

Then, the problem should be solved.

Best Regards.

STTwo-32 

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

2 REPLIES 2

>> please provide some suggestions on the fix.

Copy the file from the repo into your project directories manually.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
STTwo-32
ST Employee

Hello @MikeMcCormack and welcome to the ST Community :smiling_face_with_smiling_eyes:.

This is a confirmed issue on CubeMX and it is internally escalated under ticket number 171330.

(PS: ID 171330 is an internal tracking number and is not accessible or usable by customers).

So, as a workaround until correction on the next releases, i suggest you to comment the "#define HAL_USART_MODULE_ENABLED" if you are not configuring any USART and to comment "#define HAL_UART_MODULE_ENABLED" if you are not using any uart (or USART in asynchrone mode).

Ps: Those defines are on the stm32h5_xx_hal_conf.h file.

Then, the problem should be solved.

Best Regards.

STTwo-32 

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.