2021-08-30 03: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 01: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 02: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 02:10 AM
Is this issue solved? Its a problem in our production too
2023-03-20 03:06 AM
@Sara BEN HADJ YAHYA @Nawres GHARBI
Need bug fixes and an authoritative list of return codes.