Skip to main content
Visitor II
August 30, 2021
Solved

Do STM32CubeProgrammer Command Line interface have return codes?

  • August 30, 2021
  • 4 replies
  • 7117 views

0693W00000Dlb59QAB.pngSince STM32 STLINK Utility Command Line Interface has return codes, why STM32Cube Programmer don't have?

    This topic has been closed for replies.
    Best answer by Guillaume K

    Please select my answer as Best to close the question.

    4 replies

    ST Employee
    August 30, 2021

    it seems that STM32CubeProgrammer returns 0 (zero) if no problem and a code different from zero in case of error. But it is not documented in the user manual as ST-LINK Utility.

    Example of error case: On a Windows PC, if no STM32 connected to the PC:

    STM32_Programmer_CLI.exe -c port=swd --list
     
     -------------------------------------------------------------------
     
     STM32CubeProgrammer v2.8.0
     
     -------------------------------------------------------------------
     
     
    Error: No debug probe detected.
     
     
    c:\>echo %ERRORLEVEL%
     
    1

    Are you using something else than a Windows PC ? (Linux ? Mac ?)

    YTan.3Author
    Visitor II
    September 4, 2021

    Hi Guillaume,

    I m using Windows. it does working.

    Thank you so much for your help.

    ST Employee
    September 6, 2021

    Please select my answer as Best to close the question.

    ST Employee
    September 7, 2021

    I backtrack a little: in current version of STM32CubeProgrammer (2.8.0) there are some cases where STM32CubeProgrammer returns 1 in case of error, but some other error cases it returns 0. There are ongoing actions to correct that in future versions.

    Graduate
    September 28, 2021

    0693W00000FAbGLQA1.pngHopefully 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.8.0)

    YTan.3Author
    Visitor II
    September 28, 2021

    Hi Fardi,

    Would you mind to share how to get "return value is 0"? Is there any special command?

    Thanks

    Visitor II
    March 20, 2023

    Is this issue solved? Its a problem in our production too

    Graduate II
    March 20, 2023

    @Sara BEN HADJ YAHYA​ @Nawres GHARBI​ 

    N​eed bug fixes and an authoritative list of return codes.

    Visitor II
    February 14, 2025

    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