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

4 REPLIES 4

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

Hi @STTwo-32  & Community,

This issue was reported a long time ago but I'm seeing something similar again now.

In my case it's the definition HAL_UART_MODE_ENABLED for my STM32H755 project, this define being put into stm32h7xx_conf.h after each code re-generation.

My project began as one targeting the H755 Nucleo and at that point there was not problem. The problem arose after migrating to my custom H755 PCB, at which point I removed the Nucleo BSP stuff in MX (CubeIDE MX perspective); I also removed some other unwanted things such as Ethernet support (& LWIP)

I have no UART/USART in my project and can't think of any reason why the UART definition should be getting into my HAL config. Viewing HAL modules in the MX Project settings does not show any peripherals other than those I'm expecting.

My .ioc is attached in case it's helpful.

Thanks

Ah I found the solution to my problem. Posting here in case it's helpful to anyone else..

I had not noticed a small checkbox in the BSP config "Human Machine Interface", and this also needed to be unchecked.

I wonder who at ST - or anywhere in the Universe - thinks that light-grey on white, in 6-pt font, is a good colour scheme for text in a GUI?!

bramble_0-1749241666664.png