cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone faced this type of issue and got resolved

Snara.21
Senior

Starting AI validation on target with random data... 

C:/Users/Admin/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/7.0.0/Utilities/windows/stm32ai validate --name network_1627924896993 -m E:/Firmstart/Comtustec/Client_Software/model (1).h5 --type keras --compression 1 --verbosity 1 --workspace C:\Users\Admin\AppData\Local\Temp\mxAI_workspace17156337072000006269500876124151341 --output C:\Users\Admin\.stm32cubemx --mode stm32 --desc COM4:115200  

Neural Network Tools for STM32AI v1.5.1 (STM.ai v7.0.0-RC8) 

Setting validation data... 

 generating random data, size=10, seed=42, range=default 

 I[1]: (10, 30, 32, 1)/float32, min/max=[0.000, 1.000], mean/std=[0.494, 0.288], input_0 

 No output/reference samples are provided 

Running the STM AI c-model (AI RUNNER)...(name=network_1627924896993, mode=stm32) 

E200(ValidationError): stm32: Unable to bind the STM AI runtime with "network_1627924896993" c-model: [] 

 connection to "serial:COM4:115200"/"COM4:115200" run-time fails 

 E801(HwIOError): Invalid firmware - COM4:115200 

7 REPLIES 7
jean-michel.d
ST Employee

Hi,

After the flashing step, can you open a Tera Term like utility connected on the COM4 (115200/8b/none/1s) to check if the firmware is correctly flashed after a reset of the board.

Normally you must have in the console:

.... 
activations        : 1152 bytes (0x24001520)
 weights            : 10472 bytes (0x08013340)
 inputs/outputs     : 1/1
  I[0]  float32, 320 bytes, shape=(20,1,4) (USER domain)
  O[0]  float32, 4 bytes, shape=(1,1,1) (USER domain)
 
-------------------------------------------
| READY to receive a CMD from the HOST... |
-------------------------------------------
 
# Note: At this point, default ASCII-base terminal should be closed
# and a stm32com-base interface should be used
# (i.e. Python stm32com module). Protocol version = 2.2

br,

Jean-Michel

Snara.21
Senior

After flashing tried to open teraterm terminal it is opening

@jean-michel.d​  Kindly support on this, as I need to provide a few deliverables based on AI model

After flashing only the console detaisl are showna s above

jean-michel.d
ST Employee

Hi,

I don't know what will be your expected final flow.

However if in a Tera term you have this above log, this indicates that the firmware is normally correctly flashed. I suppose that the initial issue has been generated when you perform the "automatic" validation on target with your board. Once the board is flashed, through the UI, you can used the validation on target w/o the full generation of the STM32 project, un-check "Automatic compilation and download"). TeraTerm session should be closed before.

  • Is it OK in this case?
  • Is it possible to have more details about the used development board.

Other solution: It is also possible to use the CLI (stm32ai application) to perform the validation (see the embedded doc in the X-CUBE-AI pack: C:\Users\<user_name>\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\7.0.0\Documentation\index.html).

Note that the CLI can be also used to update the initial generated "Validation" STM32 project with the new generated c-model files (network.c/h/network_data.c/h) if the number of input/output of the model are the same.

# Validation on desktop (X86 mode)
$ stm32ai validate -m <model_file>
 
# Validation on target (board should flashed with a aiValidation firmware embedding the generated C-model)
$ stm32ai validate -m <model_file> --mode stm32 -d COMx:115200
 
# Update the STM32 project with a new generated model 
$ stm32ai generate -m <new_model_file> -o <stm32_prj_root>
... rebuild/flash the board
$ stm32ai validate -m <new_model_file> --mode stm32 -d COMx:115200

br,

Jean-Michel

You might want to change the title/summary of the thread to reflect the actual question, rather than the existential one

#AnyoneFacedFailureAndLived

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
darla14
Senior

@Snara.2​ 

If you are not seeing logs on console on reset probably your code is stuck somewhere as pointed by @jean-michel.d​ 

Is your board having ethernet which is not connected ?

 something like this MX_ETH_Init(); , then you should probably comment it and it wi work !

Best ,

D

MMary.11
Associate II

Hello,

Have you managed to find a solution to the problem, @SNara.2​ ? I'm facing a similar issue.

 (*) 'input'/'output' buffers can be used from the activations buffer 

Setting validation data... 

 generating random data, size=10, seed=42, range=(0, 1) 

 I[1]: (10, 120, 1, 6)/float32, min/max=[0.000, 1.000], mean/std=[0.497, 0.289], input_1 

 No output/reference samples are provided 

Running the STM AI c-model (AI RUNNER)...(name=cnn1dmodel, mode=stm32) 

E200(ValidationError): stm32: Unable to bind the STM AI runtime with "cnn1dmodel" c-model: [] 

 connection to "serial:115200"/"115200" run-time fails 

 E801(HwIOError): Invalid firmware - COM16:115200

Best regards,

Mary

aben118
Associate II

l am also facing the same error. did you find a solution?