Skip to main content
Associate
December 15, 2025
Question

stm32fxxx_hal.h library

  • December 15, 2025
  • 6 replies
  • 1177 views

Hi,

So i am using STM32CubeIDE to program my STM32 card, except that when i create my project, it doesnt generate an MX file. So when i try to include the library "stm32fxxx_hal.h", it doesn't work. Why is that? And am I obliged to work with STM32CubeMX in parallel with STM32CubeIDE?

PS : I use the latest version of the software, and my card is an stm32f303RET6.

Thank you.

6 replies

Technical Moderator
December 15, 2025

Hello @Lin_Me ,

 

Let me thank you for posting.

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.
Lin_MeAuthor
Associate
December 15, 2025

Hi, 

I do not have an Ioc.file.

I use only stm32cubeide (the latest version), i just clicked on create a new project, selected my board, and started coding, creating my .c files and headers.

 

Thank you.

mƎALLEm
Technical Moderator
December 15, 2025

Hello @Lin_Me and welcome to the ST community,

Which CubeIDE version are you using? if CubeIDE 2.0, there is no more possibility to generate code inside as ST annonced the CubeIDE & CubeMx divorce :) STM32CubeIDE 2.0.0 released

Otherwise how did you generate you code. Please describe in step by step and what CubeMx and CubeIDE versions are you using.

"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."
Lin_MeAuthor
Associate
December 15, 2025

Hi, 

I am using the latest version of stm32cudeide. I clicked on create a new project, i selected my board and starting creating my .c files and .h files.

Thank you.

mƎALLEm
Technical Moderator
December 15, 2025

As I said previously,

CubeMX is no more integrated in CubeIDE. Please download CubeMx and start your project from it and generate the project there.

"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."
AScha.3
Super User
December 15, 2025

Hi,

> I use the latest version of the software,

-> I think this tutorial should be a good point to start with the STM32CubeIDE 2.0.0.

If IDE 2.0 , then need CubeMx first, to create a project.

So my recommendation: use IDE 1.19. for now , until tutorials matching for 2.0 .

1.19 has integrated CubeMx , should work as you expect. (I also use 1.18 and 1.19 . )

"If you feel a post has answered your question, please click ""Accept as Solution""."
Lin_MeAuthor
Associate
December 15, 2025

Hi,

I will check it. Thank you for the advice.

TDK
Super User
December 15, 2025

stm32fxxx_hal.h isn't a file name that is generated for any chip.

For stm32f303RET6 you should be including stm32f3xx_hal.h.

#include "stm32f3xx_hal.h"

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
Lin_MeAuthor
Associate
December 15, 2025

I already tried it and same result : No such file or directory. :\

TDK
Super User
December 15, 2025

> I use only stm32cubeide (the latest version), i just clicked on create a new project, selected my board, and started coding, creating my .c files and headers.

You can't create an STM32 project in STM32CubeIDE alone. That was removed with the latest update.

You must download and install STM32CubeMX and use that in standalone mode. Create a project for STM32CubeIDE.

"If you feel a post has answered your question, please click ""Accept as Solution""."
TDK
Super User
December 15, 2025

Going back to v1.19.0 would allow you to create STM32 projects from within STM32CubeIDE using the bundled/embedded STM32CubeMX.

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