2021-08-30 3:52 AM
Since STM32 STLINK Utility Command Line Interface has return codes, why STM32Cube Programmer don't have?
Solved! Go to Solution.
2021-09-28 12:48 AM
With ST-link CLI: (it worked fine, just for comparison purpose)
@echo off
SET COMMAND=st-link_cli -c SWD FREQ=4000 UR
SET FILE=%1%
echo.
echo %FILE%
echo ===================================================================
echo SURE TO ERASE-PROGRAM-VERIFY? Press Ctrl+C to cancel
echo ===================================================================
echo.
pause
%COMMAND% -OB RDP=0 WPRMOD=0 WRP=0 -ME -P %FILE% -V
echo return value is %errorlevel%
if %errorlevel%== 0 echo Command executed successfully.
if %errorlevel%== 1 echo Command arguments error.
if %errorlevel%== 2 echo Connection problem.
if %errorlevel%== 3 echo Command not available for the connected target.
if %errorlevel%== 4 echo Error occurred while writing data to the specified memory address.
if %errorlevel%== 5 echo Cannot read memory from the specified memory address.
if %errorlevel%== 6 echo Cannot reset MCU.
if %errorlevel%== 7 echo Failed to run application.
if %errorlevel%== 8 echo Failed to halt the core.
if %errorlevel%== 9 echo Failed to perform a single instruction step.
if %errorlevel%== 10 echo Failed to set/clear a breakpoint.
if %errorlevel%== 11 echo Unable to erase one or more Flash memory sectors.
if %errorlevel%== 12 echo Flash memory programming/verification error.
if %errorlevel%== 13 echo Option bytes programming error.
if %errorlevel%== 14 echo Memory loader fails (internal Flash memory or external memory)
echo.
pause
2022-06-28 1:58 AM
Hopefully can be fixed soon. My product's manufacturing process depends on returned-code to detect failure in programming.
Now always return zero in any condition: STM32CubeProgrammer (2.10.0)
2022-06-28 2:04 AM
There is another issue in STM32CubeProgrammer CLI (2.10.0) (writing STM32G070), if you set RDP=1 and other option bytes in the same CLI command RDP is not written and MCU is not readout protected. If all option bytes (but RDP) are set in a CLI command and RDP=1 is set with another command, then MCU is protected.
2023-03-20 2:10 AM
Is this issue solved? Its a problem in our production too
2023-03-20 3:06 AM
@Sara BEN HADJ YAHYA @Nawres GHARBI
Need bug fixes and an authoritative list of return codes.
2025-02-14 12:23 AM
Hi to all
I know this is a old theread but are there any news about the return values from STM32CubProg CLI.
I observed that is retuning 0 for now error and if there is an error 1. Is there still no list of error codes to get the exact failure?
Best regards
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.