Skip to main content
Associate II
February 19, 2026
Solved

STM32Cube AI Studio fails to generate UART code despite UART being enabled

  • February 19, 2026
  • 2 replies
  • 260 views

I installed the latest STM32Cube AI Studio along with STM32CubeMX 6.16.0, STM32CubeProgrammer 2.21.0, and ST Edge AI Core.

CubeMX has STM32CubeU5 Firmware Package V1.8.0 / 04-June-2025 installed.

All attempts to run a neural network end with:

 

../../Middlewares/ST/AI/Misc/Inc/ai_device_adaptor.h:624:8: error: unknown type name 'UART_HandleTypeDef'

 

When AI Studio generates a project from any neural network, it disables the UART in stm32u5xx_hal_conf.h.

Even if I uncomment the #define of HAL_UART_MODULE_ENABLED, the app cannot be compiled because the stm32u5xx_hal_uart.h header was never generated.

If I click on the little gear at the upper right in Cube AI Studio, it shows me that the COM5 LPUART1 is configured.

So I'm stuck -- Cube AI Studio cannot be used with the stm32u5xx devices.

Any advice?

Thanks!

 

--Mike

 

 

Best answer by hamitiya

I reproduced the issue, it seems that STM32Cube AI Studio was not able to find the default VCP for this board. Also, the GUI shows values where they are only shown because they are "first" in the array.

 

Could you please try the following:

- Open your project in STM32Cube AI Studio

- Change the pins in the parameters to the following:

   - UART interface: USART1
   - RX PIN: PA10
   - TX PIN: PA9

We will fix this issue in the next release.

Best regards,

Yanis

2 replies

hamitiya
ST Employee
February 19, 2026

Hello,

Could you please share what is the MCU / Board you are working with?

Could you also share logs you had during the execution?

You can retrieve the logs in C:\users\<username>\.stm32cubeaistudio\logs

 

Best regards,

Yanis

​In order 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.
mdeisAuthor
Associate II
February 19, 2026

Hello Yanis,

 

I'm using the NUCLEO-U575ZI-Q.

The logs are attached.

Thanks!

 

--Mike

 

hamitiya
hamitiyaBest answer
ST Employee
February 19, 2026

I reproduced the issue, it seems that STM32Cube AI Studio was not able to find the default VCP for this board. Also, the GUI shows values where they are only shown because they are "first" in the array.

 

Could you please try the following:

- Open your project in STM32Cube AI Studio

- Change the pins in the parameters to the following:

   - UART interface: USART1
   - RX PIN: PA10
   - TX PIN: PA9

We will fix this issue in the next release.

Best regards,

Yanis

​In order 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.
mdeisAuthor
Associate II
February 19, 2026

Thank you, Yanis!

That solved it.

 

--Mike

 

hamitiya
ST Employee
February 20, 2026

Good news!

Have a good day.

Yanis

​In order 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.