cancel
Showing results for 
Search instead for 
Did you mean: 

missing stm32f4xx_hal_uart.h in STM32F4xx_HAL_Driver

IMate.1
Associate II

I recently go the 32F413HDISCOVERY board and downloaded the projects and examples to a local folder and imported it all of it into STM32CubeIDE.

In the STM32CubeIDE I was able to open and modify the Test_001 project and blink LED2 and LED3.

Next, I wanted to send and receive some text from HyperTerminal on the PC, but it turns out the STM32F4xx_HAL_Driver does not include anything UART related in the Test_001 project.

The attached screen shot (Test_001 Drivers.jpg) shows everything in Test_001 \Drivers\STM32F4xx_HAL_Driver\Inc...stm32f4xx_hal_uart.h is missing.

How can I enable (bring in) stm32f4xx_hal_uart.h in the Test_001 project?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Edit the IOC file, enable a UART peripheral, and re-generate the code. It will then include the UART library files and enable them within HAL.

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

View solution in original post

3 REPLIES 3
TDK
Guru

Edit the IOC file, enable a UART peripheral, and re-generate the code. It will then include the UART library files and enable them within HAL.

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Guru

If you don't want to edit the IOC, you could also drag/drop the files into those folders from the repository and edit your stm32f4xx_hal_conf.h file to include the define for HAL_UART_MODULE_ENABLED.

By default, on Windows, the repositories are located at:

C:\Users\%USERNAME%\STM32Cube\Repository

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

I am new to ST and the development environment and didn't realize the IOC file opens up into a configuration tab. I was searching for a button on the toolbar.

Thanks for the two separate approaches! It is working now.👌