Error during build of Neural-ART tutorial on STM32N6: undefined reference to MX_USART1_UART_Init
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?
