Skip to main content
Associate II
April 4, 2025
Question

ST Edge AI on STM32N6570-DK: Compilation Error (Unrecognized target)

  • April 4, 2025
  • 3 replies
  • 1427 views

Hello everyone,

I am currently testing STEdgeAI on the STM32N6570-DK and encountered an issue when running the following command:

 

stedgeai generate -m test_model/mobilenet_v2_0.35_224_fft_int8.tflite --target stm32n6 --st-neural-art 



While the network_generate_report.txt is generated, the terminal prints an error message:

>>> Shell execution has FAILED (returned code = 1)
$ arm-none-eabi-gcc -mthumb -mcpu=cortex-m55 -mtune=cortex-m55 -mfloat-abi=hard -Wall -Wextra -Wundef -Wstrict-prototypes -g3 -gdwarf-3 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -falign-functions=16 -Os -DUSE_FULL_LL_DRIVER -DLL_ATON_PLATFORM=LL_ATON_PLAT_SWEMUL -DLL_ATON_OSAL=LL_ATON_OSAL_BARE_METAL -DLL_ATON_RT_MODE=LL_ATON_RT_POLLING -DLL_ATON_SW_FALLBACK -I /usr/local/STMicroelectronics/STEdgeAI/2.0/Utilities/linux/st_ai_output -I /usr/local/STMicroelectronics/STEdgeAI/2.0/Middlewares/ST/AI/Inc -I /usr/local/STMicroelectronics/STEdgeAI/2.0/Middlewares/ST/AI/Npu/ll_aton -I /usr/local/STMicroelectronics/STEdgeAI/2.0/Middlewares/ST/AI/Npu/Devices/STM32N6XX -c /usr/local/STMicroelectronics/STEdgeAI/2.0/Utilities/linux/st_ai_output/network.c

arm-none-eabi-gcc: error: unrecognized -mcpu target: cortex-m55
arm-none-eabi-gcc: note: valid arguments are: arm8 arm810 strongarm strongarm110 fa526 fa626 arm7tdmi arm7tdmi-s arm710t arm720t arm740t arm9 arm9tdmi arm920t arm920 arm922t arm940t ep9312 arm10tdmi arm1020t arm9e arm946e-s arm966e-s arm968e-s arm10e arm1020e arm1022e xscale iwmmxt iwmmxt2 fa606te fa626te fmp626 fa726te arm926ej-s arm1026ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s mpcorenovfp mpcore arm1156t2-s arm1156t2f-s cortex-m1 cortex-m0 cortex-m0plus cortex-m1.small-multiply cortex-m0.small-multiply cortex-m0plus.small-multiply generic-armv7-a cortex-a5 cortex-a7 cortex-a8 cortex-a9 cortex-a12 cortex-a15 cortex-a17 cortex-r4 cortex-r4f cortex-r5 cortex-r7 cortex-r8 cortex-m7 cortex-m4 cortex-m3 marvell-pj4 cortex-a15.cortex-a7 cortex-a17.cortex-a7 cortex-a32 cortex-a35 cortex-a53 cortex-a57 cortex-a72 cortex-a73 exynos-m1 xgene1 cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a55 cortex-a75 cortex-a76 neoverse-n1 cortex-a75.cortex-a55 cortex-a76.cortex-a55 cortex-m23 cortex-m33 cortex-r52; did you mean 'cortex-a55'?
arm-none-eabi-gcc: error: missing argument to '-march='
<<<

It seems that cortex-m55 is not recognized as a valid -mpcu argument by arm-none-eabi-gcc.

 

To check my toolchain, I ran:

arm-none-eabi-gcc --version

and the output is :

arm-none-eabi-gcc (GNU Tools for STM32 13.3.rel1.20240926-1715) 13.3.1 20240614
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

Has anyone encountered this issue before?
Could it be a version incompatibility with the toolchain, or am I missing a configuration step?

Any guidance would be greatly appreciated!

Thanks in advance!




3 replies

Julian E.
Technical Moderator
April 4, 2025

Hello @diama13,

 

Thank you for posting the error.

 

First, this error is not critical, if you don't have any issue in your model, the generate will work.

 

Then, what's strange is that I have an older version than you and I don't get this error.

My version:  arm-none-eabi-gcc.exe (GNU Tools for STM32 12.3.rel1.20240926-1715) 12.3.1 20230626

 

We are looking at it internally, I'll let you know when we know more.

 

Have a good day,

Julian 

 

​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.
diama13Author
Associate II
April 4, 2025

Hi Julian,

I have continued with the testing, but indeed I would like to understand more about what the earlier error really means.

Now, I ran the following command:

stedgeai validate -m test_model/mobilenet_v2_0.35_224_fft_int8.tflite --mode target --target stm32n6 --st-neural-art


The terminal output shows in the end:

 

Running the TFlite model...
PASS: 91%|███████████████████████████████████████████████████▏ | 149/163 [00:07<00:00, 17.86it/s]INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Running the ST.AI c-model (AI RUNNER)...(name=network, mode=TARGET)
INTERNAL ERROR: E801(HwIOError): Invalid firmware - /dev/ttyACM0:115200

 

I’m not sure what the problem is. I’ve been trying all day yesterday to install all the prerequisites for the board, and still, the same issue arises.

Any suggestions on what might be causing this?

Thanks again for your help!




Julian E.
Technical Moderator
April 4, 2025

@diama13 ,

 

In this case, I think you get this error because the DK board uses a baudrate of 921600.

You should run a validate with one more argumnent like:

 

stedgeai validate -m mobilenet_v2_0.35_224_fft_int8.tflite --target stm32n6 --mode target -d serial:921600

 

Please follow the steps to validate a model as described here:

https://stedgeai-dc.st.com/assets/embedded-docs/stneuralart_getting_started.html

 

The steps are to:

  1. Generate your model with stedgeai generate
  2. Build and load a validation firmware with the n6_loader.py script (or X Cube AI)
  3. run the validate command

 

Let me know if it solved this issue or if it is something else :)

Julian

​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.
diama13Author
Associate II
April 4, 2025

@Julian E. 

Even if I add the argument related with the baud rate the same error arises.

Julian E.
Technical Moderator
April 4, 2025

@diama13 

In the documentation I linked, 3 steps are described:

  1. Generate your model with stedgeai generate
  2. Build and load a validation firmware with the n6_loader.py script (or X Cube AI)
  3. run the validate command

 

I think you did not do the second one.

 

You can follow the document and do it with the n6_loader.py or do it in CubeMX.

To do it in CubeMX:

  1. Select the board
  2. Activate X Cube AI
  3. Select the validation template

JulianE_0-1743767196849.png

  1. Import your model
  2. Click validate on target
  3. Set the baudrate to 921600
  4. Enable the automatic compilation and select STM32CubeIDE

JulianE_1-1743767272586.png

Make sure to set the boot pin of the DK board to the right before plugging it with a usbC to usbC cable

 

Have a good day,

Julian

​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.
diama13Author
Associate II
April 4, 2025

@Julian E. 

I think that most of my issues are related with the installation of the tools in linux. The rights, the paths and all this stuff. Is that possible?

Julian E.
Technical Moderator
April 7, 2025

Hello @diama13 ,

 

For the rights, yes, I am pretty sure that it is due to linux. For the rest, maybe.

Did you not succeed in doing a validate?

 

Have a good day,

Julian

​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.