CubeMX IDE error issues with correct code

48 views Asked by At

I recently installed cubeMX to use freeRTOS on STM32 controller.

HAL_GPIO_TogglePin(GPIOB, GPIO_Pin_12);

If I type out the above I get an error. If I have Eclipse auto complete the code I get the same error. If I type out the code in visual studio and copy it into Eclipse everything works ok.

Error:

../Core/Src/main.c:296:30: error: 'GPIO_Pin_12' undeclared (first use in this function); did you mean 'GPIO_PIN_12'?

296 | HAL_GPIO_TogglePin(GPIOB, GPIO_Pin_12); //Generated by cubeMX

enter image description here

0

There are 0 answers