Skip to main content
KnarfB
Super User
October 31, 2025
Solved

STM32CubeMX generates wrong code for Nucleo-G431KB

  • October 31, 2025
  • 1 reply
  • 194 views

In STM32CubeMX 6.15.0 / Win11 I generate a default CMake project for the Nucleo-G431KB board.

The generated cmake/stm32cubemx/CMakeLists.txt contains:

# STM32CubeMX generated symbols (macros)
set(MX_Defines_Syms 
	USE_NUCLEO_64 
	USE_HAL_DRIVER 
	STM32G431xx
 $<$<CONFIG:Debug>:DEBUG>
)

but the board is a Nucleo-32, not 64. As a consequence, pinout is wrong, like a wrong pin for the USER_LED is assumed.

hth

KnarfB

Best answer by Mahmoud Ben Romdhane

Hello @KnarfB ,

 

Let me thank you for bringing this issue to our attention.

An internal ticket is submitted to the development team (Ticket Number: 220991).

I will let you know as soon as the problem is solved.

 

Thanks.

Mahmoud

 

1 reply

Technical Moderator
October 31, 2025

Hello @KnarfB ,

 

Let me thank you for posting.

Your request is under investigation, and I will get back to you ASAP.

 

Thanks.

Mahmoud

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.
Technical Moderator
November 3, 2025

Hello @KnarfB ,

 

Let me thank you for bringing this issue to our attention.

An internal ticket is submitted to the development team (Ticket Number: 220991).

I will let you know as soon as the problem is solved.

 

Thanks.

Mahmoud

 

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.