cancel
Showing results for 
Search instead for 
Did you mean: 

error when analyzing the .onnx model in stm32cubeMX by stm32cube.AI

BHuan.3
Associate III

Hi, Thanks for your attention. I am analyzing the .onnx format model but an error occurs. I try to reinstall the stm32cubeMX but it doesn't help.

0693W00000QKl99QAD.pngThe part of architecture is:

0693W00000QKlBZQA1.png 

Here is the log information. Can you help me with this problem? @Romain LE DONGE​  @jean-michel.d​ @fauvarque.daniel​  Thanks very much!

2022-07-08 15:39:51,314 [INFO] BoardInfo:879 - No configuration file found for board P-NUCLEO-WB55
2022-07-08 15:39:51,316 [INFO] DbBoards:156 - Kit is not supported: P-NUCLEO-WB55
2022-07-08 15:39:51,319 [INFO] BoardInfo:879 - No configuration file found for board STEVAL-BFA001V1B
2022-07-08 15:39:51,320 [INFO] DbBoards:156 - Kit is not supported: STEVAL-BFA001V1B
2022-07-08 15:39:51,321 [INFO] BoardInfo:879 - No configuration file found for board STEVAL-BFA001V2B
2022-07-08 15:39:51,321 [INFO] DbBoards:156 - Kit is not supported: STEVAL-BFA001V2B
2022-07-08 15:39:51,404 [INFO] DbBoards:160 - Found 176 boards, 173 are supported
2022-07-08 15:39:51,408 [INFO] ApiDb:418 - Load user favorites file /Users/name/.stm32cubemx/favorites.boards.txt: 0 item(s)
2022-07-08 15:39:51,408 [INFO] ApiDb:422 - User favorites Boards=[]
2022-07-08 15:39:51,409 [INFO] DbBoards:189 - Set 0 / 0 favorites Boards
2022-07-08 15:39:56,930 [INFO] ExtendedFilter:65 - Artificial Intelligence: enable filter
2022-07-08 15:39:56,938 [INFO] McuExtendedFiltersManager:86 - Reset MCU extended filter: Artificial Intelligence
2022-07-08 15:40:11,418 [INFO] AInterface:235 - ModelName:network; files:[/Users/name/STM32Cube/test.onnx]; type:ONNX; compression:None
2022-07-08 15:40:11,434 [INFO] AInterface:515 - workspaceTempDir: /var/folders/y8/7c4vvzbj2l1dw7trnz05b52m0000gn/T/mxAI_workspace5038345178307913369027895421033696
2022-07-08 15:40:11,438 [INFO] AInterface:1065 - Setting Env: /Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac
2022-07-08 15:40:11,440 [INFO] AInterface:1122 - Custom PATH variable: /Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac:/bin:/usr/bin:/usr/sbin:/sbin:/Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac/node/bin
2022-07-08 15:40:11,500 [INFO] CmdLine:100 - Command: /Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac/stm32ai analyze --name network -m /Users/name/STM32Cube/test.onnx --type onnx --compression none --verbosity 1 --workspace /var/folders/y8/7c4vvzbj2l1dw7trnz05b52m0000gn/T/mxAI_workspace5038345178307913369027895421033696 --output /Users/name/.stm32cubemx/network_output --allocate-outputs
2022-07-08 15:40:12,022 [INFO] CmdLine:132 - stm32ai exit with status: 132
2022-07-08 15:40:12,025 [ERROR] CmdLine:135 - stm32ai return with an error

​

9 REPLIES 9
BHuan.3
Associate III

@VTOMA.1​ 

BHuan.3
Associate III

I have checked that all the layers in my .onnx model are supported.

Please refer to ..../STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Documentation/supported_ops_onnx.html

fauvarque.daniel
ST Employee

Do you have the same error when running the stm32ai command by hand in a terminal window ?

just type

/Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac/stm32ai analyze /Users/name/STM32Cube/test.onnx

Regards

Daniel

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

Dear fauvarque.daniel @fauvarque.daniel​ ,

Thanks for your quick reply. I try the follow exec command but get the error: illegal hardware instruction. I am using an M1 pro chip in Macbook pro 14inch.

/Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac/stm32ai analyze /Users/name/STM32Cube/test.onnx

There is the same question unsolved here.

https://community.st.com/s/question/0D53W00001dwl1GSAQ/stm32ai-illegal-hardware-instruction-on-mac-m1

Looking forward to your reply.

The current generation for Mac is done for x86 based mac assuming that Apple has implemented a backward compatibility with the x86 applications.

It doesn't seem to be the case, we'll have to investigate how to solve the issue (specific build for the M1 ?)

Regards

Daniel

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

Dear Daniel,

​

Thanks for your reply and help.

​

Yes, I think at present M1 can't work. M1 Mac needs a specific build.

There is another question related to this problem highly. Please refer to https://community.st.com/s/question/0D53W00001dwl1GSAQ/stm32ai-illegal-hardware-instruction-on-mac-m1

​

Looking forward to your solution. @fauvarque.daniel​ 

​

Best wishes,

Baichuan

Hi @BHuan.3​ 

I just replied the thread you mentioned,

Can you try enabling manually Apple's Rosetta 2 compatibility layer using the solution from this thread: https://github.com/nvm-sh/nvm/issues/2350#issuecomment-734132550

0693W00000QKq94QAD.pngThen try running again the stm32ai command line call

Hope it can help,

Regards,

Romain

@Romain LE DONGE​ 

Dear Romain,

Thanks for your quick and kind reply. I try it but fail.

That is sad news. Maybe we need a new build one for M1 specifically or use windows instead.

Best wishes,

Baichuan

eugenn
Associate

Hi @fauvarque.daniel, I have same issue on my macbook m2pro, are you planning to fix that issue?