cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-AI: "ValueError: Path for entry objcopy_binary_path does not exist" when validating.

cxf
Associate II

hi  , i want to use STM32Mx to validate  my model(.onnx) on target STM32N6570-DK board ,now STM32MX is 6.15.0 and Toolchain/IDE select STM32CUBEIDE,when i connect board to PC,and click the validate on target,it show me error like this:

 

 File "C:\Users\lenovo\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\10.1.0\scripts\N6_scripts\n6_utils_pkg\config_reader.py", line 100, in sanitize_config 
    check_path_entry_ok(self.data, k) 
  File "C:\Users\lenovo\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\10.1.0\scripts\N6_scripts\n6_utils_pkg\config_reader.py", line 74, in check_path_entry_ok 
    raise ValueError(f"Path for entry {key} does not exist: {rv}") 
ValueError: Path for entry objcopy_binary_path does not exist: C:/Users/foobar/TOOLS/gcc-arm-none-eabi/12.2 rel1/bin/arm-none-eabi-objcopy.exe 
Build error

 

please help me to slove this problem ,thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @cxf,

 

As @Andrew Neil pointed out, this error seems to be because of a bad configuration of X Cube AI. 

By default, the path to necessary tools are found automatically, but for some reason, it did not work for you.

 

Could you go to the X Cube AI repository folder: 

C:\Users\lenovo\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\10.1.0\scripts\N6_scripts\

 

And manually set the paths in config.json.

 

 
Here is what mine looks like for reference:
{
    "gdb_server_path": "C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.2.100.202501151542/tools/bin",
    "gcc_binary_path": "C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin",
    "objcopy_binary_path": "C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/arm-none-eabi-objcopy.exe",
    "cubeide_path": "C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE",
    "compiler_type": "gcc",
    "cubeProgrammerCLI_binary_path": "C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI.exe",
    "iar_binary_path": "C:/Users/foobar/TOOLS/IAR/IAR9.30.1/common/bin/"
}
(iar is not set as I don't use it)
 
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.

View solution in original post

9 REPLIES 9
Souhaib MAZHOUD
ST Employee

Hello @cxf 

Could you please add your .ioc file to check the issue?

KR,

Souhaib

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.

Andrew Neil
Super User

It's telling you that it can't find arm-none-eabi-objcopy.exe:

 

ValueError: Path for entry objcopy_binary_path does not exist: 
C:/Users/foobar/TOOLS/gcc-arm-none-eabi/12.2 rel1/bin/arm-none-eabi-objcopy.exe
Build error

 

So does that path actually exist on your PC?

Do you have access rights to it?

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Would a failure to find arm-none-eabi-objcopy.exe be related to the .ioc file?

Sounds more like an installation/configuration problem with the tools?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Hello @cxf,

 

As @Andrew Neil pointed out, this error seems to be because of a bad configuration of X Cube AI. 

By default, the path to necessary tools are found automatically, but for some reason, it did not work for you.

 

Could you go to the X Cube AI repository folder: 

C:\Users\lenovo\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\10.1.0\scripts\N6_scripts\

 

And manually set the paths in config.json.

 

 
Here is what mine looks like for reference:
{
    "gdb_server_path": "C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.2.100.202501151542/tools/bin",
    "gcc_binary_path": "C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin",
    "objcopy_binary_path": "C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/arm-none-eabi-objcopy.exe",
    "cubeide_path": "C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE",
    "compiler_type": "gcc",
    "cubeProgrammerCLI_binary_path": "C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI.exe",
    "iar_binary_path": "C:/Users/foobar/TOOLS/IAR/IAR9.30.1/common/bin/"
}
(iar is not set as I don't use it)
 
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.

First ,thanks very much to Julian E.,Andrew Neil and Souhaib MAZHOUD!!!

 

Now i have resolve this problem by the correct way:by generate code to STM32CubeIDE ,and debug to run ,in the uart  terminal

I see like this :

-------------------------------------------
| READY to receive a CMD from the HOST... |
-------------------------------------------

# Note: At this point, default ASCII-base terminal should be closed
# and a serial COM interface should be used
# (i.e. Python stm32com module). Protocol version = 3.1

 

Next ,i back to STM32CUBEMX, and click the Validate on target ,it outputs some information and errors like this:

 

target/series      :   stm32n6npu                                                                           
 workspace dir      :   C:\Users\lenovo\AppData\Local\Temp\mxAI_workspace53692928748004984312235906152141    
 output dir         :   C:\Users\lenovo\.stm32cubemx\network_output                                          
 model_fmt          :   float                                                                                
 model_name         :   ArcNN_Con_1d_9972                                                                    
 model_hash         :   0xdb2c7bac1fbfcba9b779298e29334601                                                   
 params #           :   45,896 items (179.28 KiB)                                                            
 ----------------------------------------------------------------------------------------------------------- 
 input 1/1          :   'input', f32(1x2x625), 4.88 KBytes, activations                                      
 output 1/2         :   'output', f32(1x3), 12 Bytes, activations                                            
 output 2/2         :   'node_139', f32(1x1), 4 Bytes, activations                                           
 outputs (total)    :   0 Bytes                                                                              
 macc               :   3,899,577                                                                            
 weights (ro)       :   184,040 B (179.73 KiB) (1 segment) / +456(+0.2%) vs float model                      
 activations (rw)   :   61,224 B (59.79 KiB) (1 segment) *                                                   
 ram (total)        :   61,224 B (59.79 KiB) = 61,224 + 0 + 0                                                
 ----------------------------------------------------------------------------------------------------------- 
 (*) 'input'/'output' buffers can be used from the activations buffer 
Running the ONNX model... 
Running the ST.AI c-model (AI RUNNER)...(name=network, mode=TARGET) 
E200(ValidationError): TARGET: Unable to bind the ST.AI runtime with "network" c-model: [] 
 E801(HwIOError): Invalid firmware - COM35:115200 
Validation ended

 

By this step, I have no idea to slove this problem, pleas help me ,thanks very much!

 

Hello @cxf,

 

Now that you corrected your objectcopy error, you can perform a validate on target in cubeMX.

To do so, make sure to put both pins on the right on your DK board (and reset the alimentation).

 

Then in cubeMX, click validate on target and use the config below:

JulianE_0-1752589252833.png

 

This should work.

 

I may have not understand exactly what you are doing. If you are trying to do anything else, please give me more detail about it.

 

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.
SlothGrill
ST Employee

Hello 
Just as an extra tip, if you have cubeIDE installed somewhere, you can reduce your configuration file to something like:

{
    "compiler_type": "gcc",
    "cubeide_path": "C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE"
}

Cheers.

Thank you all for your help and time investment,I really appreciate it!!!

problem 1: objcopy path error

solution: by Julian E's way,i change my  config.json as

cxf_0-1752722880827.png

and it never output this problem

problem 2:

E200(ValidationError): TARGET: Unable to bind the ST.AI runtime with "network" c-model: [] 
 E801(HwIOError): Invalid firmware - COM35:115200 

solution:it is the PLL and NPU CLK  reason, and i have set clk like this:

CPU=800MHZ,AXI =400MHZ,NPU=1GHZ,AXISRAM=900MHZ,HCLK=200MHZ

 

I hope these can help others,thanks!!

 

Now i can validate on taget ,but still have a small problem. 

I want to use STM32cubeMX to generate STM32cubeIDE project(.project),and hope that:there is a bsp function

(like BSP_XSPI_NOR_Init) in this project,but no matter how i try , i can not find this function in it .who knows to solve this problem?(Now I have to manually handle this issue  by copy this function from other .c,and this method is very inconvenient )

 

EDIT: you can find a new thread regarding this question here:

there is no bsp function in STM32cubeIDE project f... - STMicroelectronics Community

 

thanks!!!


@cxf wrote:

Now i can validate on taget ,but still have a small problem. 


That's a new question - please start a new thread for that.

Give a link here so that people can find it.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.