Associate II
April 9, 2026
Solved
HAL drivers with STM32C5 and STMCubeIDE
- April 9, 2026
- 3 replies
- 687 views
It could be the GPIO driver is not enabled. I've ran into the same problem.
I would check to see if the stm32c5xx_hal_gpio.c file is grayed out (not enabled).
I'm not sure if CubeMX2 is supposed to add defines/symbols automatically or if it's a bug, but I have to enable each peripheral even though i enabled them in CubeMX2.
For instance, stm32c5xx_hal_gpio.c HAL driver, it's all grayed out. The right column shows all the functions have a slash.

When I add "GPIOC" which is a one of the symbols, it enables the whole file. I have to add symbols for other peripherals as well.

You can see it's not grayed out and in the right column, the slashes are gone.

Now I am able to type a few characters and hit CTRL + Space to bring up a list of available functions.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.