2026-02-12 7:11 PM - last edited on 2026-02-13 7:16 AM by Andrew Neil
Hi,
I am using CubeMX 6.16.1 to work on a STM32F777ZIT6 target. However, the generated code does not have the Macro definitions of the GPIO pins in main.h. The GPIO init part IN MX_GPIO_Init() is also empty, as follows:
/**
* @brief GPIO Initialization Function
* None
* @retval None
*/
static void MX_GPIO_Init(void)
{
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOF_CLK_ENABLE();
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}I also tried CubeIDE 1.19.0, have the same issue.
Did I do anything wrong? I think it is really important to get this function work, as it would be cumbersome to manually init the GPIO pins.
I attached the .ioc file, thanks in advance for your help.
Thanks,
Xiankun
Solved! Go to Solution.
2026-02-12 7:41 PM
Please ignore this post, in the .ioc file I actually didn't define any GPIO_input/output/analog pins.
I am a dumb. Sorry for wasting your time.
Regards,
Xiankun
2026-02-12 7:41 PM
Please ignore this post, in the .ioc file I actually didn't define any GPIO_input/output/analog pins.
I am a dumb. Sorry for wasting your time.
Regards,
Xiankun