cancel
Showing results for 
Search instead for 
Did you mean: 

deploy.py from Model Zoo Github does not recognize board nor STM32AI installation

tobiasal
Associate

I have been able to follow all instructions on the ModelZoo Github page (https://github.com/STMicroelectronics/stm32ai-modelzoo) to successfully download the repository and download all requirements. However, I am getting 2 different errors when I run deploy.py.

For context, I was attempting to follow this tutorial: https://github.com/STMicroelectronics/stm32ai-modelzoo/blob/main/object_detection/scripts/deployment/README.md

When I set footprints_on_target to false on the user_config.yaml file in order to benchmark my model using the local download of STM32CubeAI, I get the following error:

tobiasal_1-1689693488672.png

I have followed every other instruction in the tutorial above, making sure that the paths to the model, cube IDE, and STM32CubeAI are correct. However, deploy.py is unable to recognize the STM32CubeAI despite being given the correct path to the executable. I followed the instructions in the tutorial to unzip both the .zip and .pack files that came with the STM32Cube.AI download. I then used STM32CubeMX to install STM32CubeAI onto my machine, alongside the OS-dependent part of STM32CubeAI. This however did not resolve the error.

Benchmarking and validating my model through Developer Cloud Services (by setting footprints_on_target to STM32H747I-DISCO) works, but when the script then attempts to flash the generated C code onto my board (connected via micro-USB from the ST-Link port), it produces the following error:

tobiasal_0-1689693329272.png

I was wondering how I could resolve both of these issues in the deploy.py script.

1 REPLY 1
Matthieu
ST Employee

Hello,

On some STM32H747 discovery boards, the name reported by the ST-LINK changed. It is causing the issue you observed.
The board is named “DISCO-H747XI”, whereas the conf file is expecting “STM32H747I-DISCO”. This causes deploy.py to fail.
Workaround: Change Line 5: "board" name to "DISCO-H747XI" in the file \stm32ai-modelzoo\object_detection\getting_started\stmaic_c_project.conf.

You may also have an issue with the LCD, on recent boards the LCD also changed:

The fix is available on GitHub :

https://github.com/STMicroelectronics/STM32CubeH7/commit/1c84713102f8509deb79ae14db8dbb104c17c45e#diff-8a5b12f7040dfb560c495dc0a1213725ba939bf19d531dd1e97067b6a1a79ec0

Actually, LCD DSI MB1166-A9 delivered with latest version of STM32H747I-DISCO/ boards come based on LCD FGRIDA FRD400B25025-A-CTK instead of FRD397B25009-D-CTK.

Now the firmware is updated in STM32CubeH7 package, you just need to enable the right hardware component as defined in stm32h747i_discovery_conf.h file and add the new component library (NT35510) in your project.

/* IMPORTANT: One of the following flags must be enabled in stm32h747i_discovery_conf.h file */

/* options in order to select the target daughter board revision connected on STM32H747I DISCOVERY : !!!!!!!!!! */

/* USE_LCD_CTRL_OTM8009A */ /* Applicable for all LCD daughter boards (MB1166) except for Rev -A09 */

/* USE_LCD_CTRL_NT35510 */ /* Applicable only for LCD daughter boards (MB1166) Rev -A09 */

We are currently adapting for the model zoo applications.