[SOLVED] JLinkScript return value of customized action function

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] JLinkScript return value of customized action function

    Hi,

    Question about the return value of a customized action function in a JLinkScript file.

    In my script I have the "int SetupTarget(void)" function which is called when I run the following command:

    JLink.exe -CommanderScript <CommandScriptFilename> -JLinkScriptFile <JLinkScriptFilename>

    In my JLinkScript I want to return an error in case of a failure but no matter what code (-1, 1, -1000, 1000) I return in the SetupTarget() function I don't see any difference in the output.
    The following thread forum.segger.com/index.php/Thr…cript-file-documentation/ describes the same issue.

    Is it correct that the return code of the SetupTarget(void) function is ignored?
  • Hello,

    Thank you for your inquiry.
    We were able to reproduce the behaviour and are working on a fix. The return value for SetupTarget is indeed not being evaluated at the moment.
    Sorry for any inconvenience caused.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Joe,

    quick update.
    The latest J-Link software version should have fixed return values for SetupTarget.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.