cancel
Showing results for 
Search instead for 
Did you mean: 

deployment model zoo

emmanuel_
Associate III

Dear all,

 

I am currently deploying the image_classification application.

So, from stm32ai-modelzoo-services (in my case, it is in the directory stm32ai-modelzoo-services4), I am using the following command with my configuration file:

python .\stm32ai_main.py --config-path . --config-name .\user_deployment_n6_config.yaml

I added some code in /common/stm32ai_local/build.py to help diagnose the programming of the STM32N6570-DK board.

The programming process seems to complete correctly, but when I restart the kit (with BOOT0 and BOOT1 set to the left), the screen remains black.

However, if I launch STM32CubeIDE, import my application, perform a build, and then a Run As, the programming works correctly and the application runs perfectly.

I believe the original goal is, of course, to be able to program and run my application directly using the script:

python .\stm32ai_main.py --config-path . --config-name .\user_deployment_n6_config.yaml

Please find attached the execution log of the script.

Many thanks in advance for your help.

 

Emmanuel

 

1 ACCEPTED SOLUTION

Accepted Solutions
4 REPLIES 4
emmanuel_
Associate III

Hi again ,

 

Here my code  /common/stm32ai_local/build.py and the original file ( build_st.py ) 

 

cheers

Emmanuel

emmanuel_
Associate III

 

Hi,

I keep trying to make progress…

 

https://github.com/STMicroelectronics/STM32N6-GettingStarted-ObjectDetection

in the documentation : 

On STM32N6570-DK:

export DKEL="<STM32CubeProgrammer_N6 Install Folder>/bin/ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr"

# First Stage Boot Loader
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w FSBL/ai_fsbl.hex

# Adjust build path as needed
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w build/Application/STM32N6570-DK/Project_sign.bin 0x70100000

# Network parameters
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -el $DKEL -hardRst -w Model/STM32N6570-DK/network_data.hex

 

 

I write a code ( test_bat.bat , please rename test_bat.txt to test_bat.bat )  to program the kit :

 but without a succes....

 

cheers

 

Emmanuel

emmanuel_
Associate III

test_bat.bat

 

@Echo off
set PROG=C:\ST\STM32CubeIDE_1.18.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.300.202508131133\tools\bin\STM32_Programmer_CLI.exe
set EL=C:\ST\STM32CubeIDE_1.18.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.300.202508131133\tools\bin\ExternalLoader\MX66UW1G45G_STM32N6570-DK.stldr
set SN=0040003D3234511733353533

rem === FICHIERS GENERES PAR LE SCRIPT PYTHON (VOTRE MODELE) ===
set DEBUG=C:\Users\papam\PycharmProjects\stm32ai-modelzoo-services4\application_code\image_classification\STM32N6\Application\STM32N6570-DK\STM32CubeIDE\Debug
set FSBL=C:\Users\papam\PycharmProjects\stm32ai-modelzoo-services4\application_code\image_classification\STM32N6\FSBL
set MODEL=C:\Users\papam\PycharmProjects\stm32ai-modelzoo-services4\application_code\image_classification\STM32N6\Model\STM32N6570-DK

echo ================================================
echo STM32N6570-DK Flash - VOTRE modele custom
echo ================================================
echo.
echo ATTENTION : Carte doit etre en DEV MODE (BOOT0 gauche)
echo.
echo Fichiers utilises :
echo FSBL : %FSBL%\ai_fsbl.hex
echo Network : %MODEL%\network_atonbuf.xSPI2.bin
echo App : %DEBUG%\STM32N6570-DK_GettingStarted_ImageClassification_signed.bin
echo.
pause

echo === 1/3 Flash FSBL ===
"%PROG%" -c port=swd mode=HOTPLUG sn=%SN% --extload "%EL%" -hardRst -w "%FSBL%\ai_fsbl.hex"
if %errorlevel% neq 0 ( echo ERREUR Flash FSBL ! & pause & exit /b 1)
echo OK
echo.

echo === 2/3 Flash Application (VOTRE application) ===
"%PROG%" -c port=swd mode=HOTPLUG sn=%SN% --extload "%EL%" -hardRst -w "%DEBUG%\STM32N6570-DK_GettingStarted_ImageClassification_signed.bin" 0x70100000
if %errorlevel% neq 0 ( echo ERREUR Flash Application ! & pause & exit /b 1 )
echo OK
echo.

echo === 2/3 Flash Network Data (VOTRE modele) ===
"%PROG%" -c port=swd mode=HOTPLUG sn=%SN% --extload "%EL%" -hardRst -w "%MODEL%\network_data.hex"
if %errorlevel% neq 0 ( echo ERREUR Flash Network Data ! & pause & exit /b 1)
echo OK
echo.

 


echo ================================================
echo Flash termine avec succes !
echo.
echo ETAPES SUIVANTES :
echo 1. BOOT0 -> gauche (rester en DEV MODE)
echo 2. Eteignez completement le kit
echo 3. Rallumez -> VOTRE application demarre !
echo ================================================
pause

emmanuel_
Associate III