Skip to main content
Associate II
August 20, 2026
Question

Error during build of Neural-ART tutorial on STM32N6: undefined reference to MX_USART1_UART_Init

  • August 20, 2026
  • 5 replies
  • 78 views

Hello ST Community,

I am following the tutorial "How to deploy an AI model on STM32N6 – Neural-ART":

https://dev.st.com/edge-ai-docs/general/latest/en/docs/tutorials/how-to-deploy-ai-model-stm32n6-neural-art.html

I successfully completed all the steps, but when building the application in STM32CubeIDE, I get the following linker error:

 

arm-none-eabi-gcc -o "Test_inference_model_Appli.elf" @"objects.list" -l:NetworkRuntime1201_CM55_GCC.a -mcpu=cortex-m55 -T"C:\Users\ROMAINC\Test_inference_model\STM32CubeIDE\Appli\STM32N657X0HXQ_ROMxspi2.ld" --specs=nosys.specs -Wl,-Map="Test_inference_model_Appli.map" -Wl,--gc-sections -static -Wl,--cmse-implib -Wl,--out-implib=./secure_nsclib.o -L../Middlewares/ST/AI/Lib --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

C:/ST/STM32CubeIDE_2.1.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Application/User/Core/app_x-cube-ai.o: in function `STM32CubeAI_Studio_AI_Init':

C:/Users/ROMAINC/Test_inference_model/STM32CubeIDE/Appli/Debug/../Application/User/Core/app_x-cube-ai.c:222:(.text.STM32CubeAI_Studio_AI_Init+0x4): undefined reference to `MX_USART1_UART_Init'

C:/ST/STM32CubeIDE_2.1.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (MX_USART1_UART_Init): Unknown destination type (ARM/Thumb) in ./Application/User/Core/app_x-cube-ai.o

C:/Users/ROMAINC/Test_inference_model/STM32CubeIDE/Appli/Debug/../Application/User/Core/app_x-cube-ai.c:222:(.text.STM32CubeAI_Studio_AI_Init+0x4): dangerous relocation: unsupported relocation

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:71: Test_inference_model_Appli.elf] Error 1

"make -j32 all" terminated with exit code 2. Build might be incomplete.

 

From the error message, it seems that app_x-cube-ai.c is calling MX_USART1_UART_Init(), but the linker cannot find its implementation.

Has anyone encountered this issue while following the tutorial?

5 replies

Ghofrane GSOURI
ST Technical Moderator
August 21, 2026

Hello ​@Pepper 

The linker error happens because app_x-cube-ai.c calls MX_USART1_UART_Init(), but your project does not contain a generated implementation of that function, which usually means USART1 is not enabled in the CubeMX .ioc

Could you please share your IOC?

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.
PepperAuthor
Associate II
August 21, 2026

Hello ​@Ghofrane GSOURI 

Thanks for your answer.

Here is my .ioc file.

Thank you for taking a look at it. Any feedback on the configuration would be greatly appreciated.
 

 

Ghofrane GSOURI
ST Technical Moderator
August 21, 2026

Hello ​@Pepper 

You haven’t attached your IOC file yet. Could you please share it?

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.
PepperAuthor
Associate II
August 24, 2026

Hello  ​@Ghofrane GSOURI ,

Thank you for your message.

Please find my IOC file attached.

Let me know if you need any additional information.
Romain Chereau

PepperAuthor
Associate II
September 1, 2026

Hello ​@Ghofrane GSOURI,

I hope you are doing well.

Just following up on my previous message regarding the attached IOC file.

Could you please let me know if you had a chance to review it? If you need any additional information, I would be happy to provide it.

Thank you for your help.

Best regards,
Romain Chereau