cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 toggle pin issue.

ARai
Associate II

I am using STM32 for the first time. I have Atollic and STM32CubeMX installed. The controller I am using is STM32L475VG. I am trying to toggle the LED pin and am using HAL_GPIO_TogglePin to do it. But the compiler is throwing up an error 'undefined reference to `HAL_GPIO_TogglePin' '.

I have HAL_Init() and HAL_Delay() functions working fine.

Is there any file that needs to be included?

4 REPLIES 4
S.Ma
Principal

I would suggest to start from a working example, say a Nucleo board GPIO example.

Need source for GPIO library code in project, and enable GPIO module in stm32l4xx_hal_conf.h

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

Thank you for the reply. The GPIO module has been enabled in the stm32l4xx_hal_conf.h file. Which file should i include for GPIO library code ?

stm32l4xx_hal_gpio.c ?

Why not "grep" the library files for the function you're missing?

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