cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to run my project using X-CUBE-AI library and its throwing me this error. I am using B-U585I-IOT02A discovery kit. "/STM32CubeIDE_1.10.0/Major Project/Debug/../X-CUBE-AI/App/app_x-cube-ai.c:61: undefined reference to `MX_USART1_UART_Init' "

BFaru.1
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
fauvarque.daniel
ST Employee

If you look in the project I sent this function is defined in the main.c.

It means that you probably disabled in MX the USART1 that is needed to communicate back with the PC.

Just rectify your main.c and add the the USART/CRC/GPIO init from the ones I sent in the project.

Regards


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

4 REPLIES 4
fauvarque.daniel
ST Employee

Here is a System Performance project for the B-U585I-IOT02A as a reference.

Maybe your network was not understood by X-CUBE-AI that causes code generation issues.

Regards


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.

This is the code snippet in app_x-cube-ai.c file which is throwing an error. It says undefined reference to `MX_USART1_UART_Init'. Can you please explain how to solve it?

0693W00000bhPVmQAM.png

fauvarque.daniel
ST Employee

If you look in the project I sent this function is defined in the main.c.

It means that you probably disabled in MX the USART1 that is needed to communicate back with the PC.

Just rectify your main.c and add the the USART/CRC/GPIO init from the ones I sent in the project.

Regards


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.

same error with me , for some reason in the main.c the MX_USART1_UART_Init(void) function was declared as static , limiting its visibility to only the main.c file , so the app_x-cube-ai.c file cannot see it