Skip to main content
Senior
May 24, 2025
Question

How to deploy a custom PyTorch AI model on the STM32N6570?

  • May 24, 2025
  • 4 replies
  • 2396 views

I want to deploy a PyTorch AI model on the STM32N6570. I have already trained the model and converted it to an ONNX file. I’m looking for a quantization, compilation, and deployment example or tutorial. The speech enhancement example in the STM32 AI Model Zoo Services doesn't match my use case. Although the input shape is the same, my model does not require any pre-processing. I only want to feed input data into the model and observe the output. Also, I would like to know if it's possible to perform deployment without providing a dataset.

4 replies

Matthieu
ST Employee
May 25, 2025

Hello,

You can refer to the ST Edge AI Core documentation to have details on the quantization including some snippets examples:

https://stm32ai-cs.st.com/assets/embedded-docs/quantization.html

You will also find a Jupyter notebook to quantize and benchmark onnx computer vision models: https://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/tutorials/notebooks/stm32ai_quantize_onnx_benchmark.ipynb

For direct deployment with the model zoo scripts, you need to match the use case as the deployment is considering the pre and post processing for the given use case.

However, you can adapt the Getting Started package to your need. It is also possible to work in standalone mode for deployment of a new model even if more manual intervention is generally required than going through the deployment service of the model zoo.

For the audio getting started package, you can refer to https://github.com/STMicroelectronics/stm32ai-modelzoo-services/tree/main/application_code/audio/STM32N6#manual-deployment

Best Regards

 

llccAuthor
Senior
May 26, 2025
python D:\stm32edgeai\stedgeai\2.1\scripts\N6_scripts\n6_loader.py

 

I deployed the model following this tutorial https://stm32ai-cs.st.com/assets/embedded-docs/stneuralart_getting_started.html , and the command executed successfully afterward.

05/26/2025 03:09:42 PM __main__ -- Preparing compiler GCC
05/26/2025 03:09:42 PM __main__ -- Setting a breakpoint in main.c at line 125 (before the infinite loop)
05/26/2025 03:09:42 PM __main__ -- Copying network.c to project: -> D:\stm32edgeai\stedgeai\2.1\Projects\STM32N6570-DK\Applications\NPU_Validation\X-CUBE-AI\App\network.c
05/26/2025 03:09:42 PM __main__ -- Extracting information from the c-file
05/26/2025 03:09:42 PM __main__ -- Converting memory files in results/<model>/generation/ to Intel-hex with proper offsets
05/26/2025 03:09:42 PM __main__ -- arm-none-eabi-objcopy.exe --change-addresses 0x71000000 -Ibinary -Oihex network_atonbuf.xSPI2.raw network_atonbuf.xSPI2.hex
05/26/2025 03:09:43 PM __main__ -- Resetting the board...
05/26/2025 03:09:44 PM __main__ -- Flashing memory xSPI2 -- 14.625 kB
05/26/2025 03:09:46 PM __main__ -- Building project (conf= N6-DK)
05/26/2025 03:09:47 PM __main__ -- Loading internal memories & Running the program
05/26/2025 03:09:50 PM __main__ -- Start operation achieved successfully

However, when I run the following command, it keeps throwing an error.

python D:/stm32edgeai/stedgeai/2.1/scripts/ai_runner/examples/checker.py ^
More? -d serial:COM9:921600 ^
More? --input-file D:/stm32aibushu/input_data.npy ^
More? --perf-only -b 32
Creating AiRunner session with `Namespace(desc='serial:COM9:921600', batch=32, name=None, input_file='D:/stm32aibushu/input_data.npy', perf_only=True, io_only=False, with_data=False, show_tensors=False, verbosity=0, debug=False)`
ERR: No c-model available, use the --desc/-d option to specifiy a valid path/descriptor
 E801(HwIOError): Invalid firmware - COM9:921600

Would you happen to know how to fix this issue? Thanks!

 

SlothGrill
ST Employee
May 26, 2025

Hello
Is there a reason why you specify the com-port number ? 

# This should be enough if you do not have multiple ST-link connected, as a first step.
-d serial:921600

This may be the issue as the "n6_loader" does not seem to show other issues.


If this does not solve the issue, could you also post your "n6_loader.log" so we can check if there is an issue with other steps... 

SlothGrill
ST Employee
May 26, 2025

Okay thanks :)

So the "loader" seems to do its job.

 

Can you then try to launch this easier command, and provide the output of it:

 

python D:/stm32edgeai/stedgeai/2.1/scripts/ai_runner/examples/ai_checker.py -d serial:921600 --debug

Thanks.

 

+ could you check the UART baudrate in the sourcecode to be sure it says 921600 ? Thanks

llccAuthor
Senior
May 26, 2025
(stmaitorchn) D:\stm32aibushu>python D:/stm32edgeai/stedgeai/2.1/scripts/ai_runner/examples/ai_checker.py -d serial:921600 --debug
Running ai_checker v1.3.0..

Opening st.ai runtime "serial:921600" (AiRunner v3.2)..
[D:AiRunner] creating "AiRunner" object (v3.2)
[D:AiRunner] resolving('desc' parameter: 'serial:921600')..
[D:AiRunner] creating <stm_ai_runner.pb_mgr_drv.AiPbMsg object at 0x000001837C4F8A90> (v2.0)
[D:AiRunner] creating <stm_ai_runner.serial_hw_drv.SerialHwDriver object at 0x000001837C4F86D0>
[D:AiRunner] 'desc' parameter for 'AiPbMsg' driver: '921600'
[D:AiRunner] connecting..
[D:AiRunner] baud=921600 device=None timeout=0.1 io_hw_log=None
[D:AiRunner] 0: {'type': 'serial', 'device': 'COM9', 'desc': 'STMicroelectronics STLink Virtual COM Port (COM9)', 'hwid': 'USB VID:PID=0483:3754 SER=002700393433511930343835 LOCATION=1-1:x.1'}
[D:AiRunner] is_alive() STM32 - read timeout 609.0ms/500ms
[D:AiRunner] 1: {'type': 'serial', 'device': 'COM3', 'desc': '蓝牙链接上的标准串行 (COM3)', 'hwid': 'BTHENUM\\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\\7&1C6CEAEF&0&000000000000_00000000'}
SlothGrill
ST Employee
July 11, 2025

Hello
Can you share the `compilation.log` file ? 

llccAuthor
Senior
July 13, 2025
D:\msys2\msys2\usr\bin\make.exe all GCC_PATH=D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin BUILD_CONF=N6-DK

echo 

D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/arm-none-eabi-gcc build/Applications/NPU_Validation/Core/Src/main.o build/Applications/NPU_Validation/Core/Src/stm32n6xx_it.o build/Applications/NPU_Validation/Core/Src/md5.o build/Applications/NPU_Validation/Core/Src/system_clock_config.o build/Applications/NPU_Validation/Core/Src/misc_toolbox.o build/Applications/NPU_Validation/Core/Src/npu_cache.o build/Applications/NPU_Validation/Core/Src/mcu_cache.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiPbIO.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiPbMemRWServices.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiPbMgr.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiTestHelper.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiTestUtility.o build/Applications/NPU_Validation/X-CUBE-AI/App/ai_device_adaptor.o build/Applications/NPU_Validation/X-CUBE-AI/App/lc_print.o build/Applications/NPU_Validation/X-CUBE-AI/App/pb_common.o build/Applications/NPU_Validation/X-CUBE-AI/App/pb_decode.o build/Applications/NPU_Validation/X-CUBE-AI/App/pb_encode.o build/Applications/NPU_Validation/X-CUBE-AI/App/stm32msg.pb.o build/Applications/NPU_Validation/X-CUBE-AI/App/network.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_cipher.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_dbgtrc.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_debug.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_lib.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_lib_sw_operators.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_rt_main.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_runtime.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_util.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_sw_float.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_sw_integer.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ecloader.o build/Applications/NPU_Validation/X-CUBE-AI/atonn/ai_wrapper_ATON.o build/Applications/NPU_Validation/X-CUBE-AI/atonn/aiValidation_ATON.o build/Applications/NPU_Validation/X-CUBE-AI/atonn/ai_io_buffers_ATON.o build/Applications/NPU_Validation/Drivers/BSP/Components/aps256xx/aps256xx.o build/Applications/NPU_Validation/Drivers/BSP/Components/mx66uw1g45g/mx66uw1g45g.o build/Applications/NPU_Validation/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.o build/Applications/NPU_Validation/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery_xspi.o build/Applications/NPU_Validation/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery_bus.o build/Applications/NPU_Validation/Drivers/CMSIS/Device/ST/STM32N6xx/Source/Templates/system_stm32n6xx_fsbl.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_bsec.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_cacheaxi.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_cortex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_gpio.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_i2c.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_i2c_ex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_pwr.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_pwr_ex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_rcc.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_rcc_ex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_rif.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_uart.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_xspi.o build/startup_stm32n657xx.o -mcpu=cortex-m55 -mcmse -mthumb -mfpu=auto -mfloat-abi=hard -specs=nano.specs -T./STM32N657xx.ld -L../../../Applications/NPU_Validation/../../../../Middlewares/ST/AI/Lib/GCC/ARMCortexM55 -lc -lm -lnosys -l:NetworkRuntime1010_CM55_GCC.a -Wl,--wrap=malloc --verbose -Wl,-Map=build/Project.map,--cref -Wl,--gc-sections -Wl,--print-memory-usage -o build/Project.elf
Using built-in specs.
Reading specs from D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/nano.specs
rename spec link to nano_link
rename spec link_gcc_c_sequence to nano_link_gcc_c_sequence
rename spec cpp_unique_options to nano_cpp_unique_options
COLLECT_GCC=D:\Stm32Cubbeide\STM32CubeIDE_1.16.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623\tools\bin\arm-none-eabi-gcc.exe
COLLECT_LTO_WRAPPER=D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/lto-wrapper.exe
Target: arm-none-eabi
Configured with: /build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/src/gcc/configure --build=x86_64-linux-gnu --host=x86_64-w64-mingw32 --target=arm-none-eabi --prefix=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/install-mingw --libexecdir=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/install-mingw/lib --infodir=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-mingw-wildcard --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/install-mingw/arm-none-eabi --with-libiconv-prefix=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/build-mingw/host-libs/usr --with-gmp=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/build-mingw/host-libs/usr --with-mpfr=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/build-mingw/host-libs/usr --with-mpc=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/build-mingw/host-libs/usr --with-isl=/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for STM32 12.3.rel1.20240612-1315' --with-multilib-list=rmprofile,aprofile
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 12.3.1 20230626 (GNU Tools for STM32 12.3.rel1.20240612-1315) 
COMPILER_PATH=D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/
LIBRARY_PATH=D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v8-m.main+dp/hard/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../arm-none-eabi/lib/thumb/v8-m.main+dp/hard/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/;D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../arm-none-eabi/lib/
COLLECT_GCC_OPTIONS='-mcpu=cortex-m55' '-mcmse' '-mthumb' '-mfpu=auto' '-mfloat-abi=hard' '-specs=nano.specs' '-T' './STM32N657xx.ld' '-L../../../Applications/NPU_Validation/../../../../Middlewares/ST/AI/Lib/GCC/ARMCortexM55' '-v' '-o' 'build/Project.elf' '-mlibarch=armv8.1-m.main+fp.dp+mve.fp' '-march=armv8.1-m.main+fp.dp+mve.fp' '-dumpdir' 'build/Project.elf.'
 D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/collect2.exe -plugin D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/liblto_plugin.dll -plugin-opt=D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\pil_1\AppData\Local\Temp\ccujNlfO.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc_nano -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc_nano --sysroot=D:\Stm32Cubbeide\STM32CubeIDE_1.16.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623\tools\bin\../arm-none-eabi -X -o build/Project.elf D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v8-m.main+dp/hard/crti.o D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v8-m.main+dp/hard/crtbegin.o D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard/crt0.o -L../../../Applications/NPU_Validation/../../../../Middlewares/ST/AI/Lib/GCC/ARMCortexM55 -LD:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v8-m.main+dp/hard -LD:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard -LD:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../arm-none-eabi/lib/thumb/v8-m.main+dp/hard -LD:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1 -LD:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc -LD:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib -LD:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../arm-none-eabi/lib build/Applications/NPU_Validation/Core/Src/main.o build/Applications/NPU_Validation/Core/Src/stm32n6xx_it.o build/Applications/NPU_Validation/Core/Src/md5.o build/Applications/NPU_Validation/Core/Src/system_clock_config.o build/Applications/NPU_Validation/Core/Src/misc_toolbox.o build/Applications/NPU_Validation/Core/Src/npu_cache.o build/Applications/NPU_Validation/Core/Src/mcu_cache.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiPbIO.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiPbMemRWServices.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiPbMgr.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiTestHelper.o build/Applications/NPU_Validation/X-CUBE-AI/App/aiTestUtility.o build/Applications/NPU_Validation/X-CUBE-AI/App/ai_device_adaptor.o build/Applications/NPU_Validation/X-CUBE-AI/App/lc_print.o build/Applications/NPU_Validation/X-CUBE-AI/App/pb_common.o build/Applications/NPU_Validation/X-CUBE-AI/App/pb_decode.o build/Applications/NPU_Validation/X-CUBE-AI/App/pb_encode.o build/Applications/NPU_Validation/X-CUBE-AI/App/stm32msg.pb.o build/Applications/NPU_Validation/X-CUBE-AI/App/network.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_cipher.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_dbgtrc.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_debug.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_lib.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_lib_sw_operators.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_rt_main.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_runtime.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_aton_util.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_sw_float.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ll_sw_integer.o build/Applications/NPU_Validation/../../../../Middlewares/ST/AI/Npu/ll_aton/ecloader.o build/Applications/NPU_Validation/X-CUBE-AI/atonn/ai_wrapper_ATON.o build/Applications/NPU_Validation/X-CUBE-AI/atonn/aiValidation_ATON.o build/Applications/NPU_Validation/X-CUBE-AI/atonn/ai_io_buffers_ATON.o build/Applications/NPU_Validation/Drivers/BSP/Components/aps256xx/aps256xx.o build/Applications/NPU_Validation/Drivers/BSP/Components/mx66uw1g45g/mx66uw1g45g.o build/Applications/NPU_Validation/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery.o build/Applications/NPU_Validation/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery_xspi.o build/Applications/NPU_Validation/Drivers/BSP/STM32N6570-DK/stm32n6570_discovery_bus.o build/Applications/NPU_Validation/Drivers/CMSIS/Device/ST/STM32N6xx/Source/Templates/system_stm32n6xx_fsbl.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_bsec.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_cacheaxi.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_cortex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_gpio.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_i2c.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_i2c_ex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_pwr.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_pwr_ex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_rcc.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_rcc_ex.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_rif.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_uart.o build/Applications/NPU_Validation/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_xspi.o build/startup_stm32n657xx.o -lc_nano -lm -lnosys -l:NetworkRuntime1010_CM55_GCC.a --wrap=malloc -Map=build/Project.map --cref --gc-sections --print-memory-usage --start-group -lgcc -lc_nano --end-group --start-group -lgcc -lc_nano --end-group D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v8-m.main+dp/hard/crtend.o D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/thumb/v8-m.main+dp/hard/crtn.o -T ./STM32N657xx.ld
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-closer.o): in function `_close_r':
(.text._close_r+0xc): warning: _close is not implemented and will always fail
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-fstatr.o): in function `_fstat_r':
(.text._fstat_r+0xe): warning: _fstat is not implemented and will always fail
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-signalr.o): in function `_getpid_r':
(.text._getpid_r+0x0): warning: _getpid is not implemented and will always fail
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-isattyr.o): in function `_isatty_r':
(.text._isatty_r+0xc): warning: _isatty is not implemented and will always fail
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-signalr.o): in function `_kill_r':
(.text._kill_r+0xe): warning: _kill is not implemented and will always fail
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':
(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v8-m.main+dp/hard\libc_nano.a(libc_a-readr.o): in function `_read_r':
(.text._read_r+0x10): warning: _read is not implemented and will always fail
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: build/Project.elf has a LOAD segment with RWX permissions
D:/Stm32Cubbeide/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: build/Applications/NPU_Validation/Core/Src/main.o: in function `main':
D:/stm32edgeai/stedgeai/2.1/Projects/STM32N6570-DK/Applications/NPU_Validation/armgcc/../../../Applications/NPU_Validation/Core/Src/main.c:134: undefined reference to `in_0'
Memory region Used Size Region Size %age Used
 AXISRAM1_S: 194512 B 1 MB 18.55%
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:276: build/Project.elf] Error 1
SlothGrill
ST Employee
July 15, 2025

The error message from the compiler is

Applications/NPU_Validation/Core/Src/main.c:134: undefined reference to `in_0'

This symbol is not in the original code (might be a part of code you added for debug purposes).

 

Could you fix the source code and retry ?