cancel
Showing results for 
Search instead for 
Did you mean: 

Can't generate GPIO init code, also Mcaros for pin definitions missing in main.h

XXu.3
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
XXu.3
Associate II

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

View solution in original post

1 REPLY 1
XXu.3
Associate II

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