Skip to main content
Visitor II
November 26, 2025
Question

problems with making generate code

  • November 26, 2025
  • 2 replies
  • 219 views

When I create a new GPIO port configured as OUTPUT in STM32CubeMX, the pin definitely exists on my board. However, after I click Generate Code, the new pin configuration does not appear in main.c (for example, I don’t see the initialization code for that pin in MX_GPIO_Init()).
Why does this happen? I tried to investigate but couldn't find the reason.
My STM32CubeIDE version is 1.19.0.
The MCU I am using is STM32G071RBT3, and the specific pin I am trying to add is GPIOD pin 3 — but I also don’t see any other newly added pins in the generated code. None of the new GPIO ports appear after code generation.

 

THANKS

2 replies

TDK
Super User
November 26, 2025

Please include the IOC you're having trouble with. Probably you are not generating code or using the code that is generated.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Ghofrane GSOURI
Technical Moderator
November 26, 2025

Hello @tal333 

As mentioned by @TDK  Please provide your IOC so that we can check what might have gone wrong.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.