cancel
Showing results for 
Search instead for 
Did you mean: 

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

mdeis
Associate II

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
hamitiya
ST Employee

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.

View solution in original post

5 REPLIES 5
hamitiya
ST Employee

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.

Hello Yanis,

 

I'm using the NUCLEO-U575ZI-Q.

The logs are attached.

Thanks!

 

--Mike

 

hamitiya
ST Employee

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.

Thank you, Yanis!

That solved it.

 

--Mike

 

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.